From f397c2b4825828b5ad8a29ad1bee934a23199527 Mon Sep 17 00:00:00 2001 From: Rawi01 Date: Wed, 23 Sep 2020 23:29:25 +0200 Subject: [fixes #2586] Add Java 15 support for delombok --- src/delombok/lombok/delombok/Delombok.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/delombok') 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 { -- cgit