aboutsummaryrefslogtreecommitdiff
path: root/src/eclipseAgent/lombok/eclipse
diff options
context:
space:
mode:
authorReinier Zwitserloot <reinier@zwitserloot.com>2015-06-24 23:43:39 +0200
committerReinier Zwitserloot <reinier@zwitserloot.com>2015-06-24 23:43:39 +0200
commitb26ce8d2cca85af514edd1b7b04a686305016313 (patch)
treea75417a8c683ddd89b6d24bca43b2ab9907c36e2 /src/eclipseAgent/lombok/eclipse
parent57f59074fc14a6e0d1e1744cc46f969fd4f4a589 (diff)
downloadlombok-b26ce8d2cca85af514edd1b7b04a686305016313.tar.gz
lombok-b26ce8d2cca85af514edd1b7b04a686305016313.tar.bz2
lombok-b26ce8d2cca85af514edd1b7b04a686305016313.zip
[trivial] Fix for running lombok in a launched eclipse for debugging purposes. This has no effect on lombok running normally.
Diffstat (limited to 'src/eclipseAgent/lombok/eclipse')
-rw-r--r--src/eclipseAgent/lombok/eclipse/agent/EclipsePatcher.java3
1 files changed, 2 insertions, 1 deletions
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;
}
});