You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicclassDemo {
privateintx;
publicintgetX() { x + 1; }
}
When the above code is refactored using Lombok > Default @data, the generated code does not correspond to the previous behavior:
Before, there was no setter for x.
Before, the getter for x returned a slight variation of x.
Since this Lombok > Default @data refactoring is the only obvious way I see to transform my code to Lombok, I am now unsure how to convert my code to the Lombok style.
Expected behavior
The refactoring preserves the current behavior of the code.
Existing getters are only removed if they conform to the standard form, which is:
public \S+ get(\w+)\(\) \{\s+return (?:this\.)?\1;\s+\}.
Short description
When the above code is refactored using Lombok > Default @data, the generated code does not correspond to the previous behavior:
x
.x
returned a slight variation ofx
.Since this Lombok > Default @data refactoring is the only obvious way I see to transform my code to Lombok, I am now unsure how to convert my code to the Lombok style.
Expected behavior
The refactoring preserves the current behavior of the code.
Existing getters are only removed if they conform to the standard form, which is:
Version information
See also
The text was updated successfully, but these errors were encountered: