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 | |
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.
-rw-r--r-- | doc/changelog.markdown | 1 | ||||
-rw-r--r-- | src/delombok/lombok/delombok/PrettyPrinter.java | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/doc/changelog.markdown b/doc/changelog.markdown index 7f1efb94..e9564eb0 100644 --- a/doc/changelog.markdown +++ b/doc/changelog.markdown @@ -4,6 +4,7 @@ Lombok Changelog ### v1.18.9 "Edgy Guinea Pig" * ENHANCEMENT: Thanks to Mark Haynes, the `staticConstructor` will now also be generated if a (private) constructor already exists. [Issue #2100](https://github.com/rzwitserloot/lombok/issues/2100) * ENHANCEMENT: `val` is now capable of decoding the type of convoluted expressions (particularly if the right hand side involves lambdas and conditional (ternary) expressions). [Pull Request #2109](https://github.com/rzwitserloot/lombok/pull/2109) with thanks to Alexander Bulgakov. +* BUGFIX: Delombok would turn something like `List<byte[]>...` in a method parameter to `List<byte...>...` [Issue #2140](https://github.com/rzwitserloot/lombok/issues/2140) ### v1.18.8 (May 7th, 2019) * FEATURE: You can now configure `@FieldNameConstants` to `CONSTANT_CASE` the generated constants, using a `lombok.config` option. See the [FieldNameConstants documentation](https://projectlombok.org/features/experimental/FieldNameConstants). [Issue #2092](https://github.com/rzwitserloot/lombok/issues/2092). 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(">"); } |