Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Delombok causes syntax error for varargs method parameter of a Array-parametrized type #2140

Closed
mp911de opened this issue May 28, 2019 · 2 comments
Labels
accepted The issue/enhancement is valid, sensible, and explained in sufficient detail

Comments

@mp911de
Copy link

mp911de commented May 28, 2019

Describe the bug
Calling delombok for code that contains a method signature using varargs results in code that contains syntax errors. This happens only if the vararg param is a parametrized type with an array parameter (e.g. Foo<byte[]> ...).

To Reproduce

Original code:

Class with @RequiredArgsConstructor and a method signature:

public List<ByteRecord> xReadGroup(Consumer consumer, StreamReadOptions readOptions, StreamOffset<byte[]>... streams)

(link to full code)

After delombok:

public List<ByteRecord> xReadGroup(Consumer consumer, StreamReadOptions readOptions, StreamOffset<byte...>... streams)

Expected behavior
No change of that method.

Version info (please complete the following information):

  • Lombok version: 1.18.6 via Lombok Maven Plugin 1.18.6.0.
  • Platform Javac, java version "1.8.0_201"

Additional context
Can be reproduced using https://github.com/spring-projects/spring-data-redis by forcing Lombok plugin version to a newer version than 1.18.4.0 and mvn clean install -DskipTests -Pci

@Maaartinus
Copy link
Contributor

@mp911de Just to be sure: StreamOffset<[]>... streams should be StreamOffset<byte[]>... streams, right?

@mp911de
Copy link
Author

mp911de commented May 28, 2019

Yes. Updated the description accordingly.

rzwitserloot added a commit that referenced this issue Jun 17, 2019
…a signature like: `List<byte[]>... arg`, the array brackets are replaced by dots in the delomboked output, which isn’t valid java.
@rzwitserloot rzwitserloot added the accepted The issue/enhancement is valid, sensible, and explained in sufficient detail label Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted The issue/enhancement is valid, sensible, and explained in sufficient detail
Projects
None yet
Development

No branches or pull requests

3 participants