aboutsummaryrefslogtreecommitdiff
path: root/src/core/lombok/javac
diff options
context:
space:
mode:
authorReinier Zwitserloot <r.zwitserloot@projectlombok.org>2023-01-12 02:05:31 +0100
committerGitHub <noreply@github.com>2023-01-12 02:05:31 +0100
commit5ed4d0f37f9ab401e2bf4c3bec3fbf8d7c25f014 (patch)
treeb73b4a0a55f5c643d1722b138dd0fe89be71d4c4 /src/core/lombok/javac
parent9e6f66c557205bff3c87eefb4c7a7631d0b89ff0 (diff)
parent5f0582baeff8e0b69848c895454cb0684ae14a4c (diff)
downloadlombok-5ed4d0f37f9ab401e2bf4c3bec3fbf8d7c25f014.tar.gz
lombok-5ed4d0f37f9ab401e2bf4c3bec3fbf8d7c25f014.tar.bz2
lombok-5ed4d0f37f9ab401e2bf4c3bec3fbf8d7c25f014.zip
Merge pull request #3326 from Rawi01/utilityclass-npe
Reset erasure_field of symbol
Diffstat (limited to 'src/core/lombok/javac')
-rw-r--r--src/core/lombok/javac/handlers/HandleUtilityClass.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/lombok/javac/handlers/HandleUtilityClass.java b/src/core/lombok/javac/handlers/HandleUtilityClass.java
index 716d6d63..b20aee3a 100644
--- a/src/core/lombok/javac/handlers/HandleUtilityClass.java
+++ b/src/core/lombok/javac/handlers/HandleUtilityClass.java
@@ -128,8 +128,11 @@ public class HandleUtilityClass extends JavacAnnotationHandler<UtilityClass> {
JCClassDecl innerClassDecl = (JCClassDecl) element.get();
innerClassDecl.mods.flags |= Flags.STATIC;
ClassSymbol innerClassSymbol = innerClassDecl.sym;
- if (innerClassSymbol != null && innerClassSymbol.type instanceof ClassType) {
- ((ClassType) innerClassSymbol.type).setEnclosingType(Type.noType);
+ if (innerClassSymbol != null) {
+ if (innerClassSymbol.type instanceof ClassType) {
+ ((ClassType) innerClassSymbol.type).setEnclosingType(Type.noType);
+ }
+ innerClassSymbol.erasure_field = null;
}
}
}