diff options
Diffstat (limited to 'src/delombok/lombok')
-rw-r--r-- | src/delombok/lombok/delombok/PrettyPrinter.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/delombok/lombok/delombok/PrettyPrinter.java b/src/delombok/lombok/delombok/PrettyPrinter.java index 611055e0..4261a558 100644 --- a/src/delombok/lombok/delombok/PrettyPrinter.java +++ b/src/delombok/lombok/delombok/PrettyPrinter.java @@ -813,6 +813,11 @@ public class PrettyPrinter extends JCTree.Visitor { print(tree.encl); print("."); } + boolean moveFirstParameter = tree.args.nonEmpty() && tree.args.head instanceof JCUnary && tree.args.head.toString().startsWith("<*nullchk*>"); + if (moveFirstParameter) { + print(((JCUnary) tree.args.head).arg); + print("."); + } print("new "); if (!tree.typeargs.isEmpty()) { @@ -822,12 +827,10 @@ public class PrettyPrinter extends JCTree.Visitor { } print(tree.clazz); print("("); - if (tree.args.nonEmpty()) { - if (tree.args.head instanceof JCIdent) { - print(tree.args, ", "); - } else { - print(tree.args.tail, ", "); - } + if (moveFirstParameter) { + print(tree.args.tail, ", "); + } else { + print(tree.args, ", "); } print(")"); if (tree.def != null) { |