diff options
author | Roel Spilker <r.spilker@gmail.com> | 2020-06-26 00:06:37 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-06-26 00:06:50 +0200 |
commit | f2b25550457628650213a3bfcac6a28a30648e6c (patch) | |
tree | c83debd4b65c3feeb2a5cce76b140f607aabb9a6 | |
parent | 625acfa2a4ce49863ea562dd676500b5bb7898fc (diff) | |
download | lombok-f2b25550457628650213a3bfcac6a28a30648e6c.tar.gz lombok-f2b25550457628650213a3bfcac6a28a30648e6c.tar.bz2 lombok-f2b25550457628650213a3bfcac6a28a30648e6c.zip |
Potential fix for #2412
-rw-r--r-- | src/core/lombok/core/AnnotationProcessor.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/lombok/core/AnnotationProcessor.java b/src/core/lombok/core/AnnotationProcessor.java index ce93a069..d4a92408 100644 --- a/src/core/lombok/core/AnnotationProcessor.java +++ b/src/core/lombok/core/AnnotationProcessor.java @@ -83,7 +83,12 @@ public class AnnotationProcessor extends AbstractProcessor { for (Class<?> procEnvClass = procEnv.getClass(); procEnvClass != null; procEnvClass = procEnvClass.getSuperclass()) { try { - Field field = Permit.getField(procEnvClass, "delegate"); + Field field; + try { + field = Permit.getField(procEnvClass, "delegate"); + } catch (NoSuchFieldException e) { + field = Permit.getField(procEnvClass, "processingEnv"); + } Object delegate = field.get(procEnv); return tryRecursivelyObtainJavacProcessingEnvironment((ProcessingEnvironment) delegate); |