提交 150838bf 编写于 作者: C Chris Beams

Remove TODOs related to profile logging

Issue: SPR-8031, SPR-7508, SPR-8057
上级 b50ac748
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -123,7 +123,6 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume ...@@ -123,7 +123,6 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume
Assert.state(this.environment != null, "environment property must not be null"); Assert.state(this.environment != null, "environment property must not be null");
String[] specifiedProfiles = StringUtils.tokenizeToStringArray(profileSpec, BeanDefinitionParserDelegate.MULTI_VALUE_ATTRIBUTE_DELIMITERS); String[] specifiedProfiles = StringUtils.tokenizeToStringArray(profileSpec, BeanDefinitionParserDelegate.MULTI_VALUE_ATTRIBUTE_DELIMITERS);
if (!this.environment.acceptsProfiles(specifiedProfiles)) { if (!this.environment.acceptsProfiles(specifiedProfiles)) {
// TODO SPR-7508: log that this bean is being rejected on profile mismatch
return; return;
} }
} }
......
...@@ -116,7 +116,6 @@ public class AnnotatedBeanDefinitionReader { ...@@ -116,7 +116,6 @@ public class AnnotatedBeanDefinitionReader {
if (ProfileHelper.isProfileAnnotationPresent(metadata)) { if (ProfileHelper.isProfileAnnotationPresent(metadata)) {
if (!this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata))) { if (!this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata))) {
// TODO SPR-7508: log that this bean is being rejected on profile mismatch
return; return;
} }
} }
......
...@@ -300,7 +300,6 @@ public class ClassPathScanningCandidateComponentProvider implements EnvironmentC ...@@ -300,7 +300,6 @@ public class ClassPathScanningCandidateComponentProvider implements EnvironmentC
if (!ProfileHelper.isProfileAnnotationPresent(metadata)) { if (!ProfileHelper.isProfileAnnotationPresent(metadata)) {
return true; return true;
} }
// TODO SPR-7508: log that this bean is being rejected on profile mismatch
return this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata)); return this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata));
} }
} }
......
/* /*
* 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -104,7 +104,6 @@ class ConfigurationClassParser { ...@@ -104,7 +104,6 @@ class ConfigurationClassParser {
AnnotationMetadata metadata = configClass.getMetadata(); AnnotationMetadata metadata = configClass.getMetadata();
if (this.environment != null && ProfileHelper.isProfileAnnotationPresent(metadata)) { if (this.environment != null && ProfileHelper.isProfileAnnotationPresent(metadata)) {
if (!this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata))) { if (!this.environment.acceptsProfiles(ProfileHelper.getCandidateProfiles(metadata))) {
// TODO SPR-7508: log that this bean is being rejected on profile mismatch
return; return;
} }
} }
......
...@@ -160,7 +160,6 @@ public class MutablePropertySources implements PropertySources { ...@@ -160,7 +160,6 @@ public class MutablePropertySources implements PropertySources {
*/ */
protected void removeIfPresent(PropertySource<?> propertySource) { protected void removeIfPresent(PropertySource<?> propertySource) {
if (this.propertySourceList.contains(propertySource)) { if (this.propertySourceList.contains(propertySource)) {
// TODO SPR-7508: add logging
this.propertySourceList.remove(propertySource); this.propertySourceList.remove(propertySource);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册