[trivial] Fix for running lombok in a launched eclipse for debugging purposes. This has no effect on lombok running normally.

This commit is contained in:
Reinier Zwitserloot committed 2015-06-24 23:43:39 +02:00
1 parent 57f59074fc
commit b26ce8d2cc
1 file changed
+2 -1
@@ -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;
}
});