FINERACT-822 enable EqualsUnsafeCast error check
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
4b46f27253
commit
de20a987ae
@@ -318,8 +318,6 @@ tasks.withType(JavaCompile) {
|
||||
"StringSplitter",
|
||||
"MissingOverride",
|
||||
"ImmutableEnumChecker",
|
||||
"EqualsUnsafeCast",
|
||||
"BoxedPrimitiveEquality",
|
||||
"BadImport",
|
||||
"UnusedMethod",
|
||||
"ModifiedButNotUsed",
|
||||
@@ -355,6 +353,7 @@ tasks.withType(JavaCompile) {
|
||||
"ObjectToString",
|
||||
"AssertThrowsMultipleStatements",
|
||||
"BoxedPrimitiveConstructor",
|
||||
"BoxedPrimitiveEquality",
|
||||
"SynchronizeOnNonFinalField",
|
||||
"WildcardImport",
|
||||
"FutureReturnValueIgnored",
|
||||
@@ -373,6 +372,7 @@ tasks.withType(JavaCompile) {
|
||||
"ReferenceEquality",
|
||||
"OperatorPrecedence",
|
||||
"EqualsGetClass",
|
||||
"EqualsUnsafeCast",
|
||||
"JdkObsolete",
|
||||
"DoubleBraceInitialization",
|
||||
"InconsistentCapitalization",
|
||||
|
||||
+4
-1
@@ -229,6 +229,9 @@ public class ChargeData implements Comparable<ChargeData>, Serializable {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof ChargeData)) {
|
||||
return false;
|
||||
}
|
||||
final ChargeData chargeData = (ChargeData) obj;
|
||||
return this.id.equals(chargeData.id);
|
||||
}
|
||||
@@ -319,4 +322,4 @@ public class ChargeData implements Comparable<ChargeData>, Serializable {
|
||||
public CurrencyData getCurrency() {
|
||||
return currency;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -98,6 +98,9 @@ public class IndividualClientData {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof IndividualClientData)) {
|
||||
return false;
|
||||
}
|
||||
final IndividualClientData clientData = (IndividualClientData) obj;
|
||||
return clientData.clientId.compareTo(this.clientId) == 0;
|
||||
}
|
||||
@@ -106,4 +109,4 @@ public class IndividualClientData {
|
||||
public int hashCode() {
|
||||
return this.clientId.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -104,6 +104,9 @@ public class JLGClientData {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof JLGClientData)) {
|
||||
return false;
|
||||
}
|
||||
final JLGClientData clientData = (JLGClientData) obj;
|
||||
return clientData.clientId.compareTo(this.clientId) == 0;
|
||||
}
|
||||
@@ -112,4 +115,4 @@ public class JLGClientData {
|
||||
public int hashCode() {
|
||||
return this.clientId.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -88,6 +88,9 @@ public class JLGGroupData {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof JLGGroupData)) {
|
||||
return false;
|
||||
}
|
||||
final JLGGroupData groupData = (JLGGroupData) obj;
|
||||
return groupData.groupId.compareTo(this.groupId) == 0;
|
||||
}
|
||||
@@ -96,4 +99,4 @@ public class JLGGroupData {
|
||||
public int hashCode() {
|
||||
return this.groupId.hashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -67,6 +67,9 @@ public class LoanDisbursementDetails extends AbstractPersistableCustom {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof LoanDisbursementDetails)) {
|
||||
return false;
|
||||
}
|
||||
final LoanDisbursementDetails loanDisbursementDetails = (LoanDisbursementDetails) obj;
|
||||
if (loanDisbursementDetails.principal.equals(this.principal)
|
||||
&& loanDisbursementDetails.expectedDisbursementDate.equals(this.expectedDisbursementDate))
|
||||
@@ -136,4 +139,4 @@ public class LoanDisbursementDetails extends AbstractPersistableCustom {
|
||||
this.principal = principal;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1024,6 +1024,9 @@ public class LoanProductData implements Serializable {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof LoanProductData)) {
|
||||
return false;
|
||||
}
|
||||
final LoanProductData loanProductData = (LoanProductData) obj;
|
||||
return loanProductData.id.equals(this.id);
|
||||
}
|
||||
@@ -1258,4 +1261,4 @@ public class LoanProductData implements Serializable {
|
||||
public BigDecimal getMaxInterestRatePerPeriod() {
|
||||
return maxInterestRatePerPeriod;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -80,6 +80,9 @@ public class LoanProductBorrowerCycleVariations extends AbstractPersistableCusto
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof LoanProductBorrowerCycleVariations)) {
|
||||
return false;
|
||||
}
|
||||
final LoanProductBorrowerCycleVariations other = (LoanProductBorrowerCycleVariations) obj;
|
||||
return Objects.equals(loanProduct, other.loanProduct)
|
||||
&& Objects.equals(borrowerCycleNumber, other.borrowerCycleNumber)
|
||||
@@ -118,4 +121,4 @@ public class LoanProductBorrowerCycleVariations extends AbstractPersistableCusto
|
||||
public BigDecimal getDefaultValue() {
|
||||
return this.defaultValue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -425,6 +425,9 @@ public class SavingsProductData implements Serializable {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof SavingsProductData)) {
|
||||
return false;
|
||||
}
|
||||
final SavingsProductData productData = (SavingsProductData) obj;
|
||||
return productData.id.compareTo(this.id) == 0;
|
||||
}
|
||||
@@ -501,4 +504,4 @@ public class SavingsProductData implements Serializable {
|
||||
public boolean isWithdrawalFeeForTransfers() {
|
||||
return withdrawalFeeForTransfers;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -44,6 +44,9 @@ public class RoleData implements Serializable {
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object obj) {
|
||||
if (!(obj instanceof RoleData)) {
|
||||
return false;
|
||||
}
|
||||
final RoleData role = (RoleData) obj;
|
||||
return this.id.equals(role.id);
|
||||
}
|
||||
@@ -60,4 +63,4 @@ public class RoleData implements Serializable {
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user