aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRawi01 <Rawi01@users.noreply.github.com>2020-09-23 23:29:25 +0200
committerRoel Spilker <r.spilker@gmail.com>2020-09-24 22:19:01 +0200
commitf397c2b4825828b5ad8a29ad1bee934a23199527 (patch)
tree261b5b37f8f92a35351d0b1fd7813bfb834ed0c4 /src
parent25f91eb7b21ec0330db66ad962898d10b8da262d (diff)
downloadlombok-f397c2b4825828b5ad8a29ad1bee934a23199527.tar.gz
lombok-f397c2b4825828b5ad8a29ad1bee934a23199527.tar.bz2
lombok-f397c2b4825828b5ad8a29ad1bee934a23199527.zip
[fixes #2586] Add Java 15 support for delombok
Diffstat (limited to 'src')
-rwxr-xr-xsrc/delombok/lombok/delombok/Delombok.java8
-rw-r--r--src/stubs/com/sun/tools/javac/main/Arguments.java3
2 files changed, 9 insertions, 2 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java
index a1fd0e56..6c15068a 100755
--- a/src/delombok/lombok/delombok/Delombok.java
+++ b/src/delombok/lombok/delombok/Delombok.java
@@ -701,8 +701,12 @@ public class Delombok {
if (!disablePreview && Javac.getJavaCompilerVersion() >= 11) argsList.add("--enable-preview");
- String[] argv = argsList.toArray(new String[0]);
- args.init("javac", argv);
+ if (Javac.getJavaCompilerVersion() < 15) {
+ String[] argv = argsList.toArray(new String[0]);
+ args.init("javac", argv);
+ } else {
+ args.init("javac", argsList);
+ }
options.put("diags.legacy", "TRUE");
options.put("allowStringFolding", "FALSE");
} else {
diff --git a/src/stubs/com/sun/tools/javac/main/Arguments.java b/src/stubs/com/sun/tools/javac/main/Arguments.java
index ea866b6e..3d91734c 100644
--- a/src/stubs/com/sun/tools/javac/main/Arguments.java
+++ b/src/stubs/com/sun/tools/javac/main/Arguments.java
@@ -10,4 +10,7 @@ public class Arguments {
public void init(String ownName, String... argv) {}
public Map<Option, String> getDeferredFileManagerOptions() { return null; }
public boolean validate() { return false; }
+
+ // JDK15
+ public void init(String ownName, Iterable<String> args) {}
}