aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/eclipseAgent/lombok/launch/PatchFixesHider.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/eclipseAgent/lombok/launch/PatchFixesHider.java b/src/eclipseAgent/lombok/launch/PatchFixesHider.java
index c7bdbc31..5404ee1d 100755
--- a/src/eclipseAgent/lombok/launch/PatchFixesHider.java
+++ b/src/eclipseAgent/lombok/launch/PatchFixesHider.java
@@ -60,6 +60,8 @@ import org.eclipse.jdt.internal.core.dom.rewrite.TokenScanner;
import org.eclipse.jdt.internal.corext.refactoring.SearchResultGroup;
import org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor.IncomingMemberVisibilityAdjustment;
+import lombok.permit.Permit;
+
import static lombok.eclipse.EcjAugments.ASTNode_generatedBy;
/** These contain a mix of the following:
@@ -200,6 +202,13 @@ final class PatchFixesHider {
if (TRANSFORM != null) return;
Main.prependClassLoader(prepend);
+ try {
+ ClassLoader currentClassLoader = Transform.class.getClassLoader();
+ Method prependParentMethod = Permit.getMethod(currentClassLoader.getClass(), "prependParent", ClassLoader.class);
+ Permit.invoke(prependParentMethod, currentClassLoader, prepend);
+ } catch (Throwable t) {
+ // Ignore
+ }
Class<?> shadowed = Util.shadowLoadClass("lombok.eclipse.TransformEclipseAST");
TRANSFORM = Util.findMethodAnyArgs(shadowed, "transform");
TRANSFORM_SWAPPED = Util.findMethodAnyArgs(shadowed, "transform_swapped");