-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Adjust lombok annotations to reduce build warnings #5021
Conversation
This change fixes the underlying problems behind five compiler warnings: "Generating equals/hashCode implementation but without a call to superclass". Some core classes use @value and @DaTa annotations where not necessary, for example, where equals, hashCode, and toString are implemented by the developer, and where final class and field modifiers are defined by the developer. From lombok classes and documents for the shortcut annotations @value https://projectlombok.org/features/Value and @DaTa https://projectlombok.org/features/Data, we find some implicit annotations applied by these shortcuts are not needed. Adjustments are described below. - Tx Replace @value with @Getter. - TxOutput Replace @DaTa with @Getter and @Setter. - ChangeParamProposal Replace @value with @Getter. - GetInventoryRequest, GetInventoryResponse An @EqualsAndHashCode(callSuper = false) is added to supress build warnings.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes me nervous changing this magic annotations in the DAO module. It compiles nicely and seems to work fine.
This is the typical case where @ManfredKarrer has to review to make sure this is not breaking some hashes we rely on in the DAO.
core/src/main/java/bisq/core/dao/state/model/blockchain/TxOutput.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/network/p2p/inventory/messages/GetInventoryRequest.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/network/p2p/inventory/messages/GetInventoryResponse.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/network/p2p/inventory/messages/GetInventoryRequest.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/network/p2p/inventory/messages/GetInventoryResponse.java
Outdated
Show resolved
Hide resolved
core/src/main/java/bisq/core/network/p2p/inventory/messages/GetInventoryRequest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
This change fixes the underlying problems behind five compiler warnings:
Generating equals/hashCode implementation but without a call to superclass
.Some core classes use
@Value
and@Data
annotations where not necessary, for example, whereequals
,hashCode
, andtoString
methods, andfinal
class and field modifiers are defined by a developer.From lombok classes and documents for the shortcut annotations
@Value
and@Data
, we find some implicit annotations applied by these shortcuts are not needed. Adjustments are described below.Tx
Replace@Value
with@Getter
.TxOutput
Replace@Data
with@Getter
and@Setter
.ChangeParamProposal
Replace@Value
with@Getter
.GetInventoryRequest
,GetInventoryResponse
An@EqualsAndHashCode(callSuper = false)
is added to supress build warnings.