diff options
Diffstat (limited to 'src/eclipseAgent')
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/EclipseLoaderPatcherTransplants.java | 8 | ||||
-rw-r--r-- | src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 5 |
2 files changed, 8 insertions, 5 deletions
diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipseLoaderPatcherTransplants.java b/src/eclipseAgent/lombok/eclipse/agent/EclipseLoaderPatcherTransplants.java index b1327216..ea72f56a 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipseLoaderPatcherTransplants.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipseLoaderPatcherTransplants.java @@ -26,6 +26,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; +import java.util.Arrays; import java.util.jar.JarFile; import java.util.zip.ZipEntry; @@ -92,14 +93,15 @@ public class EclipseLoaderPatcherTransplants { jf.close(); } } - Class[] paramTypes = new Class[4]; + Class[] paramTypes = new Class[5]; paramTypes[0] = classLoaderClass; paramTypes[1] = "".getClass(); paramTypes[2] = paramTypes[1]; - paramTypes[3] = new String[0].getClass(); + paramTypes[3] = Class.forName("java.util.List"); + paramTypes[4] = paramTypes[3]; Constructor constructor = shadowClassLoaderClass.getDeclaredConstructor(paramTypes); constructor.setAccessible(true); - shadowLoader = (ClassLoader) constructor.newInstance(new Object[] {original, "lombok", jarLoc, new String[] {"lombok."}}); + shadowLoader = (ClassLoader) constructor.newInstance(new Object[] {original, "lombok", jarLoc, Arrays.asList(new Object[] {"lombok."}), Arrays.asList(new Object[] {"lombok.patcher.Symbols"})}); shadowLoaderField.set(original, shadowLoader); } } diff --git a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java index 28e8d0c1..6e5871e6 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -75,8 +75,9 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { ScriptManager sm = new ScriptManager(); sm.registerTransformer(instrumentation); sm.setTransplantMapper(new TransplantMapper() { - public String getPrefixFor(int classFileFormatVersion) { - return classFileFormatVersion > 49 ? "Class50/" : ""; + public String mapResourceName(int classFileFormatVersion, String resourceName) { + if (classFileFormatVersion < 50) return resourceName; + return "Class50/" + resourceName; } }); |