diff options
author | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-06-18 15:36:26 +0200 |
---|---|---|
committer | Reinier Zwitserloot <r.zwitserloot@projectlombok.org> | 2019-06-18 15:37:58 +0200 |
commit | 927a6774f5713c2103563b56ba1b57b6fc09ceaa (patch) | |
tree | 6c39519fbbe122fc8e8be48dfe6efe7a1c8eb294 /src/delombok | |
parent | e33a2090227585301b95a368050e83dc4c5883e5 (diff) | |
download | lombok-927a6774f5713c2103563b56ba1b57b6fc09ceaa.tar.gz lombok-927a6774f5713c2103563b56ba1b57b6fc09ceaa.tar.bz2 lombok-927a6774f5713c2103563b56ba1b57b6fc09ceaa.zip |
[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.
Diffstat (limited to 'src/delombok')
-rw-r--r-- | src/delombok/lombok/delombok/PrettyPrinter.java | 3 |
1 files changed, 3 insertions, 0 deletions
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(">"); } |