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] Jandex "Not a parameterized type" with @Data pojo #2189

Closed
chonton opened this issue Jul 25, 2019 · 0 comments · Fixed by #2201
Closed

[BUG] Jandex "Not a parameterized type" with @Data pojo #2189

chonton opened this issue Jul 25, 2019 · 0 comments · Fixed by #2201

Comments

@chonton
Copy link

chonton commented Jul 25, 2019

Describe the bug
I've got two simple pojos -

@Data
public class Entity {
  private List<@Valid User> users;
}

and

@Data
public class User {
  private @NotBlank @NotNull String users;
}

When I run jandex over these pojos, I get a 'Not a parameterized type' failure

To Reproduce
See wildfly/jandex project for a reproducer

Expected behavior
No Exceptions

Version info (please complete the following information):

  • Lombok 1.18.6
  • javac 11.0.1

Additional context
If I remove the lombok generated setter by adding following setter, there is no exception. This leads me to believe there is a subtle difference in the generated code.

  public void setUsers(List<@Valid User> users) {
    this.users = users;
  }

Using javap to view the byte, I see the following significant difference

in lombok generated code the setter annotation is

      0: #20(): FIELD, location=[TYPE_ARGUMENT(0)]
        javax.validation.Valid

in hand written, javac generated code the setter annotation is

      0: #20(): METHOD_FORMAL_PARAMETER, param_index=0, location=[TYPE_ARGUMENT(0)]
        javax.validation.Valid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant