DATACMNS-1201 - Support generated property accessors for types in default packages.

We now support generated property accessors for types that reside in the default package.

Original pull request: #256.
This commit is contained in:
Mark Paluch
2017-10-24 16:31:06 +02:00
committed by Oliver Gierke
parent 4bd8a3cfc3
commit a13fc238d3
2 changed files with 20 additions and 3 deletions

View File

@@ -133,7 +133,10 @@ public class ClassGeneratingPropertyAccessorFactory implements PersistentPropert
}
private static boolean isTypeInjectable(PersistentEntity<?, ?> entity) {
return entity.getType().getClassLoader() != null && !entity.getType().getPackage().getName().startsWith("java");
Class<?> type = entity.getType();
return type.getClassLoader() != null
&& (type.getPackage() == null || !type.getPackage().getName().startsWith("java"));
}
private boolean hasUniquePropertyHashCodes(PersistentEntity<?, ?> entity) {