mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-15 04:18:44 +00:00
Potential fix for #2412
This commit is contained in:
1 parent
625acfa2a4
commit
f2b2555045
1 file changed
+6
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user