aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse
diff options
context:
space:
mode:
authorMartin O'Connor <38929043+martinoconnor@users.noreply.github.com>2021-12-31 21:29:22 -0500
committerRoel Spilker <r.spilker@gmail.com>2022-01-07 04:13:31 +0100
commit1e40a199aaa1e626e9b36fc8f636289499d66fb5 (patch)
tree59577120b4aea86da162f9bd603945b8d1147448 /src/eclipseAgent/lombok/eclipse
parent3de5d0908a2bdf0af3ed3c06eaa4978d3bc778cf (diff)
downloadlombok-1e40a199aaa1e626e9b36fc8f636289499d66fb5.tar.gz
lombok-1e40a199aaa1e626e9b36fc8f636289499d66fb5.tar.bz2
lombok-1e40a199aaa1e626e9b36fc8f636289499d66fb5.zip
[fixes projectlombok/lombok#1036] Exclude the classloader for
jasperreports-plugin due to a classloader conflict with ECJ
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java5
1 files changed, 4 insertions, 1 deletions
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;