mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-16 16:15:06 +00:00
HHH-18505 fix npe occurring while processing module descriptor
Signed-off-by: Gavin King <gavin@hibernate.org>
This commit is contained in:
parent
5d45d19005
commit
f99bdd4b8d
@ -367,7 +367,7 @@ private void processClasses(RoundEnvironment roundEnvironment) {
|
||||
try {
|
||||
if ( !included( element )
|
||||
|| hasAnnotation( element, Constants.EXCLUDE )
|
||||
|| hasAnnotation( context.getElementUtils().getPackageOf(element), Constants.EXCLUDE ) ) {
|
||||
|| hasPackageAnnotation( element, Constants.EXCLUDE ) ) {
|
||||
// skip it completely
|
||||
}
|
||||
else if ( isEntityOrEmbeddable( element ) ) {
|
||||
@ -420,6 +420,11 @@ else if ( element instanceof TypeElement ) {
|
||||
}
|
||||
}
|
||||
|
||||
private boolean hasPackageAnnotation(Element element, String annotation) {
|
||||
final PackageElement pack = context.getElementUtils().getPackageOf( element ); // null for module descriptor
|
||||
return pack != null && hasAnnotation( pack, annotation );
|
||||
}
|
||||
|
||||
private void createMetaModelClasses() {
|
||||
|
||||
for ( Metamodel aux : context.getMetaAuxiliaries() ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user