[bughunt] [issue #2351] wild-stab try to fix issue 2351, without reproduction - this time for realsies, whoops.

This commit is contained in:
Reinier Zwitserloot committed 2020-01-30 20:49:48 +01:00
1 parent 28f0c4c4b0
commit d1e9a8e5ab
1 file changed
+1 -1
@@ -81,7 +81,7 @@ 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().toString().startsWith("org.sonar.classloader")) return false; // Relevant to bug #2351
if (loader != null && loader.getClass().getName().startsWith("org.sonar.classloader.")) return false; // Relevant to bug #2351
if (!(loader instanceof URLClassLoader)) return true;
ClassLoader parent = loader.getParent();
if (parent == null) return true;