diff options
author | Rawi01 <Rawi01@users.noreply.github.com> | 2020-09-23 23:29:25 +0200 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2020-09-24 22:19:01 +0200 |
commit | f397c2b4825828b5ad8a29ad1bee934a23199527 (patch) | |
tree | 261b5b37f8f92a35351d0b1fd7813bfb834ed0c4 /src | |
parent | 25f91eb7b21ec0330db66ad962898d10b8da262d (diff) | |
download | lombok-f397c2b4825828b5ad8a29ad1bee934a23199527.tar.gz lombok-f397c2b4825828b5ad8a29ad1bee934a23199527.tar.bz2 lombok-f397c2b4825828b5ad8a29ad1bee934a23199527.zip |
[fixes #2586] Add Java 15 support for delombok
Diffstat (limited to 'src')
-rwxr-xr-x | src/delombok/lombok/delombok/Delombok.java | 8 | ||||
-rw-r--r-- | src/stubs/com/sun/tools/javac/main/Arguments.java | 3 |
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) {} } |