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

problem found in getter and setter #2476

Closed
himanshujain475 opened this issue May 26, 2020 · 4 comments
Closed

problem found in getter and setter #2476

himanshujain475 opened this issue May 26, 2020 · 4 comments

Comments

@himanshujain475
Copy link

getter and setter not working for the field when the first letter is small and the second letter is capital.

@MichelMunoz
Copy link

MichelMunoz commented May 26, 2020

No problem with edge version:

@ToString
@Getter
@Setter
class SomeClass {
    private String sOmeField;
}

and test code:

SomeClass c = new SomeClass();
c.setSOmeField("value");
System.out.println(c.getSOmeField());
System.out.println(c.toString());

output :

value
SomeClass(sOmeField=value)

As expected.
(eclipse-java-2020-03-R-linux-gtk-x86_64 + OpenJDK14U-jdk_x64_linux_hotspot_14.0.1_7)

What do you mean by "getter and setter not working for the field when the first letter is small and the second letter is capital." ?

@Maaartinus
Copy link
Contributor

@himanshujain475 Duplicate of #2149 and ten others, isn't it?

@MichelMunoz
Copy link

MichelMunoz commented May 28, 2020

Ah, yes... the infamous (and ugly) bean "specification debt" stemming from the day someone thought it was a good idea to tweak a specification to accommodate the implementation of Introspector.decapitalize (that is arbitrary and not coherent with the more general principles of bean specification or CamelCasing).

@rzwitserloot
Copy link
Collaborator

Duplicate of #2693

@rzwitserloot rzwitserloot marked this as a duplicate of #2693 Jan 2, 2021
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

No branches or pull requests

5 participants