From 150838bfc13a136ef0baf943e378a8ebb5f3549f Mon Sep 17 00:00:00 2001 From: Chris Beams Date: Tue, 15 Mar 2011 12:57:43 +0000 Subject: [PATCH] Remove TODOs related to profile logging Issue: SPR-8031, SPR-7508, SPR-8057 --- .../beans/factory/xml/DefaultBeanDefinitionDocumentReader.java | 3 +-- .../context/annotation/AnnotatedBeanDefinitionReader.java | 1 - .../ClassPathScanningCandidateComponentProvider.java | 1 - .../context/annotation/ConfigurationClassParser.java | 3 +-- .../org/springframework/core/env/MutablePropertySources.java | 1 - 5 files changed, 2 insertions(+), 7 deletions(-) diff --git a/org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java b/org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java index a0369a7894..4bcc94a22a 100644 --- a/org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java +++ b/org.springframework.beans/src/main/java/org/springframework/beans/factory/xml/DefaultBeanDefinitionDocumentReader.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -123,7 +123,6 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume Assert.state(this.environment != null, "environment property must not be null"); String[] specifiedProfiles = StringUtils.tokenizeToStringArray(profileSpec, BeanDefinitionParserDelegate.MULTI_VALUE_ATTRIBUTE_DELIMITERS); if (!this.environment.acceptsProfiles(specifiedProfiles)) { - // TODO SPR-7508: log that this bean is being rejected on profile mismatch return; } } diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotatedBeanDefinitionReader.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotatedBeanDefinitionReader.java index 334cc233f1..504dffb07d 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotatedBeanDefinitionReader.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/AnnotatedBeanDefinitionReader.java @@ -116,7 +116,6 @@ public class AnnotatedBeanDefinitionReader { if (ProfileHelper.isProfileAnnotationPresent(metadata)) { if (!this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata))) { - // TODO SPR-7508: log that this bean is being rejected on profile mismatch return; } } diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java index 459d7b271c..9c57ad4522 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ClassPathScanningCandidateComponentProvider.java @@ -300,7 +300,6 @@ public class ClassPathScanningCandidateComponentProvider implements EnvironmentC if (!ProfileHelper.isProfileAnnotationPresent(metadata)) { return true; } - // TODO SPR-7508: log that this bean is being rejected on profile mismatch return this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata)); } } diff --git a/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java index 2bb7b50df8..5507bee504 100644 --- a/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java +++ b/org.springframework.context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2010 the original author or authors. + * Copyright 2002-2011 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -104,7 +104,6 @@ class ConfigurationClassParser { AnnotationMetadata metadata = configClass.getMetadata(); if (this.environment != null && ProfileHelper.isProfileAnnotationPresent(metadata)) { if (!this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata))) { - // TODO SPR-7508: log that this bean is being rejected on profile mismatch return; } } diff --git a/org.springframework.core/src/main/java/org/springframework/core/env/MutablePropertySources.java b/org.springframework.core/src/main/java/org/springframework/core/env/MutablePropertySources.java index b05f78c1a6..a0a8ff1c80 100644 --- a/org.springframework.core/src/main/java/org/springframework/core/env/MutablePropertySources.java +++ b/org.springframework.core/src/main/java/org/springframework/core/env/MutablePropertySources.java @@ -160,7 +160,6 @@ public class MutablePropertySources implements PropertySources { */ protected void removeIfPresent(PropertySource propertySource) { if (this.propertySourceList.contains(propertySource)) { - // TODO SPR-7508: add logging this.propertySourceList.remove(propertySource); } }