From b26ce8d2cca85af514edd1b7b04a686305016313 Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Wed, 24 Jun 2015 23:43:39 +0200 Subject: [trivial] Fix for running lombok in a launched eclipse for debugging purposes. This has no effect on lombok running normally. --- src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java | 3 ++- 1 file changed, 2 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 6e5871e6..b7aa0124 100644 --- a/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java +++ b/src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java @@ -74,9 +74,10 @@ public class EclipsePatcher implements AgentLauncher.AgentLaunchable { private static void registerPatchScripts(Instrumentation instrumentation, boolean reloadExistingClasses, boolean ecjOnly, Class launchingContext) { ScriptManager sm = new ScriptManager(); sm.registerTransformer(instrumentation); + final boolean forceBaseResourceNames = !"".equals(System.getProperty("shadow.override.lombok", "")); sm.setTransplantMapper(new TransplantMapper() { public String mapResourceName(int classFileFormatVersion, String resourceName) { - if (classFileFormatVersion < 50) return resourceName; + if (classFileFormatVersion < 50 || forceBaseResourceNames) return resourceName; return "Class50/" + resourceName; } }); -- cgit