diff options
-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) {} } |