Browse Source

ConfigurationClassParser ignores unresolvable member classes

Issue: SPR-13115
pull/818/merge
Juergen Hoeller 10 years ago
parent
commit
1c01f575c2
  1. 11
      spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java

11
spring-context/src/main/java/org/springframework/context/annotation/ConfigurationClassParser.java

@ -779,7 +779,16 @@ class ConfigurationClassParser { @@ -779,7 +779,16 @@ class ConfigurationClassParser {
String[] memberClassNames = sourceReader.getClassMetadata().getMemberClassNames();
List<SourceClass> members = new ArrayList<SourceClass>(memberClassNames.length);
for (String memberClassName : memberClassNames) {
members.add(asSourceClass(memberClassName));
try {
members.add(asSourceClass(memberClassName));
}
catch (IOException ex) {
// Let's skip it if it's not resolvable - we're just looking for candidates
if (logger.isDebugEnabled()) {
logger.debug("Failed to resolve member class [" + memberClassName +
"] - not considering it as a configuration class candidate");
}
}
}
return members;
}

Loading…
Cancel
Save