Browse Source

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.
pull/42/merge
Thomas Darimont 12 years ago
parent
commit
55be70d911
  1. 2
      src/main/java/org/springframework/data/repository/config/AnnotationRepositoryConfigurationSource.java

2
src/main/java/org/springframework/data/repository/config/AnnotationRepositoryConfigurationSource.java

@ -231,6 +231,6 @@ public class AnnotationRepositoryConfigurationSource extends RepositoryConfigura @@ -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);
}
}

Loading…
Cancel
Save