From 927a6774f5713c2103563b56ba1b57b6fc09ceaa Mon Sep 17 00:00:00 2001 From: Reinier Zwitserloot Date: Tue, 18 Jun 2019 15:36:26 +0200 Subject: [fixes #2140] when pretty-printing (delombok) varargs, only turn array brackets into varargs for the actual top-level type, not for arrays inside the type, such as an array as generics component. --- src/delombok/lombok/delombok/PrettyPrinter.java | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/delombok/lombok') diff --git a/src/delombok/lombok/delombok/PrettyPrinter.java b/src/delombok/lombok/delombok/PrettyPrinter.java index 3477c51c..1532319f 100644 --- a/src/delombok/lombok/delombok/PrettyPrinter.java +++ b/src/delombok/lombok/delombok/PrettyPrinter.java @@ -692,7 +692,10 @@ public class PrettyPrinter extends JCTree.Visitor { @Override public void visitTypeApply(JCTypeApply tree) { print(tree.clazz); print("<"); + boolean temp = innermostArrayBracketsAreVarargs; + innermostArrayBracketsAreVarargs = false; print(tree.arguments, ", "); + innermostArrayBracketsAreVarargs = temp; print(">"); } -- cgit