DATACMNS-90 - Support old EnableXXXRepository annotations that do not yet allow to configure the handling of nested repositories.

Previously a call to attributes.getBoolean(…) resulted in a NPE if a EnableXXXRepository annotation of a store (Neo4J in that case ) did not have the required property yet. With the added check we are safe again.
This commit is contained in:
Thomas Darimont
2013-10-23 01:34:12 +02:00
parent 1dfe235a87
commit 55be70d911

View File

@@ -231,6 +231,6 @@ public class AnnotationRepositoryConfigurationSource extends RepositoryConfigura
*/
@Override
public boolean shouldConsiderNestedRepositories() {
return attributes.getBoolean(CONSIDER_NESTED_REPOSITORIES);
return attributes.containsKey(CONSIDER_NESTED_REPOSITORIES) && attributes.getBoolean(CONSIDER_NESTED_REPOSITORIES);
}
}