Skip to content

Commit 14b83c3

Browse files
jhoellerunknown
authored and
unknown
committed
Polishing
Issue: SPR-10609
1 parent ae6e84b commit 14b83c3

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassUtils.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2013 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,6 +20,7 @@
2020

2121
import org.apache.commons.logging.Log;
2222
import org.apache.commons.logging.LogFactory;
23+
2324
import org.springframework.beans.factory.config.BeanDefinition;
2425
import org.springframework.beans.factory.support.AbstractBeanDefinition;
2526
import org.springframework.core.Conventions;
@@ -37,14 +38,14 @@
3738
*/
3839
abstract class ConfigurationClassUtils {
3940

40-
private static final Log logger = LogFactory.getLog(ConfigurationClassUtils.class);
41-
4241
private static final String CONFIGURATION_CLASS_FULL = "full";
4342

4443
private static final String CONFIGURATION_CLASS_LITE = "lite";
4544

4645
private static final String CONFIGURATION_CLASS_ATTRIBUTE =
47-
Conventions.getQualifiedAttributeName(ConfigurationClassPostProcessor.class, "configurationClass");
46+
Conventions.getQualifiedAttributeName(ConfigurationClassPostProcessor.class, "configurationClass");
47+
48+
private static final Log logger = LogFactory.getLog(ConfigurationClassUtils.class);
4849

4950

5051
/**
@@ -93,20 +94,19 @@ else if (isLiteConfigurationCandidate(metadata)) {
9394
}
9495

9596
public static boolean isConfigurationCandidate(AnnotationMetadata metadata) {
96-
return isFullConfigurationCandidate(metadata) || isLiteConfigurationCandidate(metadata);
97+
return (isFullConfigurationCandidate(metadata) || isLiteConfigurationCandidate(metadata));
9798
}
9899

99100
public static boolean isFullConfigurationCandidate(AnnotationMetadata metadata) {
100101
return metadata.isAnnotated(Configuration.class.getName());
101102
}
102103

103104
public static boolean isLiteConfigurationCandidate(AnnotationMetadata metadata) {
104-
return !metadata.isInterface() && // not an interface or an annotation
105-
(metadata.isAnnotated(Component.class.getName()) ||
106-
metadata.hasAnnotatedMethods(Bean.class.getName()));
105+
// Do not consider an interface or an annotation...
106+
return (!metadata.isInterface() && (
107+
metadata.isAnnotated(Component.class.getName()) || metadata.hasAnnotatedMethods(Bean.class.getName())));
107108
}
108109

109-
110110
/**
111111
* Determine whether the given bean definition indicates a full @Configuration class.
112112
*/

0 commit comments

Comments
 (0)