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

Lombok getters for boolean values are named incorrectly #273

Closed
julgus opened this issue Sep 2, 2022 · 0 comments
Closed

Lombok getters for boolean values are named incorrectly #273

julgus opened this issue Sep 2, 2022 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@julgus
Copy link
Member

julgus commented Sep 2, 2022

When generating code from the entity below, the generated JPAStreamer code references a method getEnabled() which does not exist. In this case, Lombok automatically generates a getter titled isEnabled() as the type is a primitive boolean. However, for Boolean values, the getter will be given the standard name getEnabled().

public class User2  implements Serializable{
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seq_shared")
    @SequenceGenerator(name = "seq_shared", sequenceName = "seq_shared",allocationSize = 1)
    Long id;

    @NotEmpty
    private String username;

    @NotEmpty
    private String password;

    // Should generate isEnabled 
    private boolean enabled;
    
    // Should generate getActive 
    private Boolean active;
}
@julgus julgus closed this as completed Sep 2, 2022
@julgus julgus added this to the 1.1.0 milestone Sep 30, 2022
@julgus julgus added the bug Something isn't working label Sep 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant