From 4817e152e348663466dab0fa4c0c9366843e1f34 Mon Sep 17 00:00:00 2001 From: andreaTP Date: Mon, 3 Jan 2022 18:22:23 +0000 Subject: [PATCH] [ref: 8889] Annotation processor support for Java > 11 --- .../AbstractGenerateEntityImplementationsProcessor.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/model/build-processor/src/main/java/org/keycloak/models/map/processor/AbstractGenerateEntityImplementationsProcessor.java b/model/build-processor/src/main/java/org/keycloak/models/map/processor/AbstractGenerateEntityImplementationsProcessor.java index 0cb7778fce..1e9f24fb6d 100644 --- a/model/build-processor/src/main/java/org/keycloak/models/map/processor/AbstractGenerateEntityImplementationsProcessor.java +++ b/model/build-processor/src/main/java/org/keycloak/models/map/processor/AbstractGenerateEntityImplementationsProcessor.java @@ -26,6 +26,7 @@ import javax.lang.model.element.Modifier; import javax.lang.model.element.Name; import javax.lang.model.element.TypeElement; import javax.lang.model.type.NoType; +import javax.lang.model.type.TypeKind; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.Elements; import javax.lang.model.util.Types; @@ -119,7 +120,7 @@ public abstract class AbstractGenerateEntityImplementationsProcessor extends Abs protected Map> methodsPerAttributeMapping(TypeElement e) { Map> methodsPerAttribute = getAllAbstractMethods(e) .filter(Util::isNotIgnored) - .filter(ee -> ! (ee.getReceiverType() instanceof NoType)) + .filter(ee -> !(ee.getReceiverType() instanceof NoType && ee.getReceiverType().getKind() != TypeKind.NONE)) .collect(Collectors.toMap(this::determineAttributeFromMethodName, v -> new HashSet<>(Arrays.asList(v)), (a,b) -> { a.addAll(b); return a; })); // Merge plurals with singulars