diff options
Diffstat (limited to 'src')
-rwxr-xr-x | src/delombok/lombok/delombok/Delombok.java | 1 | ||||
-rw-r--r-- | src/delombok/lombok/delombok/PrettyPrinter.java | 6 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/delombok/lombok/delombok/Delombok.java b/src/delombok/lombok/delombok/Delombok.java index 9582c3b8..8f4f99e5 100755 --- a/src/delombok/lombok/delombok/Delombok.java +++ b/src/delombok/lombok/delombok/Delombok.java @@ -753,6 +753,7 @@ public class Delombok { Object care = callAttributeMethodOnJavaCompiler(delegate, delegate.todo); callFlowMethodOnJavaCompiler(delegate, care); + FormatPreferences fps = new FormatPreferences(formatPrefs); for (JCCompilationUnit unit : roots) { DelombokResult result = new DelombokResult(catcher.getComments(unit), unit, force || options.isChanged(unit), fps); diff --git a/src/delombok/lombok/delombok/PrettyPrinter.java b/src/delombok/lombok/delombok/PrettyPrinter.java index 353bd753..832dbe0a 100644 --- a/src/delombok/lombok/delombok/PrettyPrinter.java +++ b/src/delombok/lombok/delombok/PrettyPrinter.java @@ -648,7 +648,11 @@ public class PrettyPrinter extends JCTree.Visitor { */ try { innermostArrayBracketsAreVarargs = varargs; - print(tree.vartype); + if (tree.vartype == null || tree.vartype.pos == -1) { + print("var"); + } else { + print(tree.vartype); + } } finally { innermostArrayBracketsAreVarargs = false; } |