From 1e40a199aaa1e626e9b36fc8f636289499d66fb5 Mon Sep 17 00:00:00 2001 From: Martin O'Connor <38929043+martinoconnor@users.noreply.github.com> Date: Fri, 31 Dec 2021 21:29:22 -0500 Subject: [fixes projectlombok/lombok#1036] Exclude the classloader for jasperreports-plugin due to a classloader conflict with ECJ --- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java') diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 76a65e16..2e35cf57 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -59,7 +59,10 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { sm.registerTransformer(instrumentation); sm.setFilter(new Filter() { @Override public boolean shouldTransform(ClassLoader loader, String className, Class classBeingDefined, ProtectionDomain protectionDomain, byte[] classfileBuffer) { - if (loader != null && loader.getClass().getName().startsWith("org.sonar.classloader.")) return false; // Relevant to bug #2351 + if (loader != null) { + if (loader.getClass().getName().startsWith("org.sonar.classloader.")) return false; // Relevant to bug #2351 + if (loader.toString().contains("com.alexnederlof:jasperreports-plugin")) return false; //Relevant to bug #1036 + } if (!(loader instanceof URLClassLoader)) return true; ClassLoader parent = loader.getParent(); if (parent == null) return true; -- cgit