aboutsummaryrefslogtreecommitdiff
path: root/src/installer/lombok
diff options
context:
space:
mode:
Diffstat (limited to 'src/installer/lombok')
-rw-r--r--src/installer/lombok/installer/IdeLocation.java12
-rw-r--r--src/installer/lombok/installer/eclipse/EclipseProductLocation.java4
2 files changed, 3 insertions, 13 deletions
diff --git a/src/installer/lombok/installer/IdeLocation.java b/src/installer/lombok/installer/IdeLocation.java
index 6b9a94c6..7cba1e2a 100644
--- a/src/installer/lombok/installer/IdeLocation.java
+++ b/src/installer/lombok/installer/IdeLocation.java
@@ -64,16 +64,4 @@ public abstract class IdeLocation {
return x == null ? p.getPath() : x;
}
}
-
- private static final String LEGAL_PATH_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.-_/";
- private static final String LEGAL_PATH_CHARS_WINDOWS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.,/;'[]{}!@#$^&()-_+= :\\";
- public static String escapePath(String path) {
- StringBuilder out = new StringBuilder();
- String legalChars = OsUtils.getOS() == OsUtils.OS.UNIX ? LEGAL_PATH_CHARS : LEGAL_PATH_CHARS_WINDOWS;
- for (char c : path.toCharArray()) {
- if (legalChars.indexOf(c) == -1) out.append('\\');
- out.append(c);
- }
- return out.toString();
- }
}
diff --git a/src/installer/lombok/installer/eclipse/EclipseProductLocation.java b/src/installer/lombok/installer/eclipse/EclipseProductLocation.java
index 73f98a35..4cfd07f5 100644
--- a/src/installer/lombok/installer/eclipse/EclipseProductLocation.java
+++ b/src/installer/lombok/installer/eclipse/EclipseProductLocation.java
@@ -347,8 +347,10 @@ public final class EclipseProductLocation extends IdeLocation {
pathPrefix = pathToLombokJarPrefix;
}
+ // NB: You may be tempted to escape this, but don't; there is no possibility to escape this, but
+ // eclipse/java reads the string following the colon in 'raw' fashion. Spaces, colons - all works fine.
newContents.append(String.format(
- "-javaagent:%s", escapePath(pathPrefix + "lombok.jar"))).append(OS_NEWLINE);
+ "-javaagent:%s", pathPrefix + "lombok.jar")).append(OS_NEWLINE);
FileOutputStream fos = new FileOutputStream(eclipseIniPath);
try {