FINERACT-822 enable EqualsGetClass error
This commit is contained in:
committed by
Michael Vorburger ⛑️
parent
a54c124449
commit
f226bbae6e
@@ -310,7 +310,6 @@ tasks.withType(JavaCompile) {
|
||||
"OperatorPrecedence",
|
||||
"MixedMutabilityReturnType",
|
||||
"SameNameButDifferent",
|
||||
"EqualsGetClass",
|
||||
"ReferenceEquality",
|
||||
"StringSplitter",
|
||||
"MissingOverride",
|
||||
@@ -368,6 +367,7 @@ tasks.withType(JavaCompile) {
|
||||
"NarrowingCompoundAssignment",
|
||||
"MissingCasesInEnumSwitch",
|
||||
"OperatorPrecedence",
|
||||
"EqualsGetClass",
|
||||
// "ReturnMissingNullable",
|
||||
// "InconsistentOverloads",
|
||||
// "MethodCanBeStatic",
|
||||
|
||||
+2
-2
@@ -97,7 +97,7 @@ public class TrialBalance extends AbstractPersistableCustom {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!obj.getClass().equals(getClass())) {
|
||||
if (!(obj instanceof TrialBalance)) {
|
||||
return false;
|
||||
}
|
||||
TrialBalance other = (TrialBalance) obj;
|
||||
@@ -113,4 +113,4 @@ public class TrialBalance extends AbstractPersistableCustom {
|
||||
public int hashCode() {
|
||||
return Objects.hash(officeId, glAccountId, amount, entryDate, transactionDate, closingBalance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -773,7 +773,7 @@ public class JournalEntryWritePlatformServiceJpaRepositoryImpl implements Journa
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!obj.getClass().equals(this.getClass())) {
|
||||
if (!(obj instanceof JournalEntryWritePlatformServiceJpaRepositoryImpl)) {
|
||||
return false;
|
||||
}
|
||||
OfficeCurrencyKey copy = (OfficeCurrencyKey) obj;
|
||||
|
||||
+1
-1
@@ -119,7 +119,7 @@ public class LoanProductProvisioningEntry extends AbstractPersistableCustom {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!obj.getClass().equals(getClass())) {
|
||||
if (!(obj instanceof LoanProductProvisioningEntry)) {
|
||||
return false;
|
||||
}
|
||||
LoanProductProvisioningEntry other = (LoanProductProvisioningEntry) obj;
|
||||
|
||||
+1
-1
@@ -98,7 +98,7 @@ public class CommandContext {
|
||||
if (obj == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != obj.getClass()) {
|
||||
if (!(obj instanceof CommandContext)) {
|
||||
return false;
|
||||
}
|
||||
CommandContext other = (CommandContext) obj;
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ public class EmailBusinessRulesData {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
if (o == null || !(o instanceof EmailBusinessRulesData)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ public class SmsBusinessRulesData {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
if (o == null || !(o instanceof SmsBusinessRulesData)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -58,7 +58,7 @@ public class ExternalServicePropertiesPK implements Serializable {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj.getClass() != getClass()) {
|
||||
if (!(obj instanceof ExternalServicePropertiesPK)) {
|
||||
return false;
|
||||
}
|
||||
final ExternalServicePropertiesPK rhs = (ExternalServicePropertiesPK) obj;
|
||||
|
||||
+2
-2
@@ -76,7 +76,7 @@ public class JobParameter extends AbstractPersistableCustom {
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (!obj.getClass().equals(getClass())) {
|
||||
if (!(obj instanceof JobParameter)) {
|
||||
return false;
|
||||
}
|
||||
JobParameter jobParameter = (JobParameter) obj;
|
||||
@@ -89,4 +89,4 @@ public class JobParameter extends AbstractPersistableCustom {
|
||||
public int hashCode() {
|
||||
return Objects.hash(jobId,parameterName,parameterValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -156,7 +156,7 @@ public class InteropIdentifier extends AbstractPersistableCustom {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
if (o == null || !(o instanceof InteropIdentifier)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public class ContextData {
|
||||
public boolean equals(final Object obj) {
|
||||
if (this == obj) { return true; }
|
||||
if (obj == null) { return false; }
|
||||
if (getClass() != obj.getClass()) { return false; }
|
||||
if (!(obj instanceof ContextData)) { return false; }
|
||||
final ContextData other = (ContextData) obj;
|
||||
if (this.dimension == null) {
|
||||
if (other.dimension != null) { return false; }
|
||||
@@ -69,4 +69,4 @@ public class ContextData {
|
||||
} else if (!this.periodType.equals(other.periodType)) { return false; }
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ public class ProvisioningCategory extends AbstractPersistableCustom {
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == null) { return false; }
|
||||
if (obj == this) { return true; }
|
||||
if (obj.getClass() != getClass()) { return false; }
|
||||
if (!(obj instanceof ProvisioningCategory)) { return false; }
|
||||
ProvisioningCategory pc = (ProvisioningCategory) obj;
|
||||
return pc.getCategoryName().equals(this.categoryName);
|
||||
}
|
||||
|
||||
+2
-2
@@ -89,7 +89,7 @@ public class PortfolioAccountData implements Serializable {
|
||||
|
||||
if (obj == null) { return false; }
|
||||
if (obj == this) { return true; }
|
||||
if (obj.getClass() != getClass()) { return false; }
|
||||
if (!(obj instanceof PortfolioAccountData)) { return false; }
|
||||
final PortfolioAccountData rhs = (PortfolioAccountData) obj;
|
||||
return new EqualsBuilder().append(this.id, rhs.id).append(this.accountNo, rhs.accountNo).append(this.productId, rhs.productId)
|
||||
.append(this.productName, rhs.productName).isEquals();
|
||||
@@ -120,4 +120,4 @@ public class PortfolioAccountData implements Serializable {
|
||||
public Long accountId() {
|
||||
return this.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -114,7 +114,7 @@ public class FloatingRateData implements Comparable<FloatingRateData> , Serializ
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj.getClass() != getClass()) {
|
||||
if (!(obj instanceof FloatingRateData)) {
|
||||
return false;
|
||||
}
|
||||
final FloatingRateData rhs = (FloatingRateData) obj;
|
||||
|
||||
+1
-1
@@ -113,7 +113,7 @@ public class FloatingRatePeriodData implements
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj.getClass() != getClass()) {
|
||||
if (!(obj instanceof FloatingRatePeriodData)) {
|
||||
return false;
|
||||
}
|
||||
final FloatingRatePeriodData rhs = (FloatingRatePeriodData) obj;
|
||||
|
||||
+2
-2
@@ -339,7 +339,7 @@ public class DepositAccountData {
|
||||
|
||||
if (obj == null) { return false; }
|
||||
if (obj == this) { return true; }
|
||||
if (obj.getClass() != getClass()) { return false; }
|
||||
if (!(obj instanceof DepositAccountData)) { return false; }
|
||||
final DepositAccountData rhs = (DepositAccountData) obj;
|
||||
return new EqualsBuilder().append(this.id, rhs.id).append(this.accountNo, rhs.accountNo).isEquals();
|
||||
}
|
||||
@@ -360,4 +360,4 @@ public class DepositAccountData {
|
||||
public String accountNo() {
|
||||
return accountNo;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -525,7 +525,7 @@ public class FixedDepositAccountData extends DepositAccountData {
|
||||
|
||||
if (obj == null) { return false; }
|
||||
if (obj == this) { return true; }
|
||||
if (obj.getClass() != getClass()) { return false; }
|
||||
if (!(obj instanceof FixedDepositAccountData)) { return false; }
|
||||
final FixedDepositAccountData rhs = (FixedDepositAccountData) obj;
|
||||
return new EqualsBuilder().append(this.id, rhs.id).append(this.accountNo, rhs.accountNo).isEquals();
|
||||
}
|
||||
@@ -548,4 +548,4 @@ public class FixedDepositAccountData extends DepositAccountData {
|
||||
public Long getTransferToSavingsId() {
|
||||
return transferToSavingsId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -592,7 +592,7 @@ public class RecurringDepositAccountData extends DepositAccountData {
|
||||
|
||||
if (obj == null) { return false; }
|
||||
if (obj == this) { return true; }
|
||||
if (obj.getClass() != getClass()) { return false; }
|
||||
if (!(obj instanceof RecurringDepositAccountData)) { return false; }
|
||||
final RecurringDepositAccountData rhs = (RecurringDepositAccountData) obj;
|
||||
return new EqualsBuilder().append(this.id, rhs.id).append(this.accountNo, rhs.accountNo).isEquals();
|
||||
}
|
||||
@@ -602,4 +602,4 @@ public class RecurringDepositAccountData extends DepositAccountData {
|
||||
return new HashCodeBuilder(17, 37).append(this.id).append(this.accountNo).toHashCode();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -775,7 +775,7 @@ public class SavingsAccountData implements Serializable {
|
||||
|
||||
if (obj == null) { return false; }
|
||||
if (obj == this) { return true; }
|
||||
if (obj.getClass() != getClass()) { return false; }
|
||||
if (!(obj instanceof SavingsAccountData)) { return false; }
|
||||
final SavingsAccountData rhs = (SavingsAccountData) obj;
|
||||
return new EqualsBuilder().append(this.id, rhs.id).append(this.accountNo, rhs.accountNo).isEquals();
|
||||
}
|
||||
@@ -792,4 +792,4 @@ public class SavingsAccountData implements Serializable {
|
||||
public void setDatatables(final List<DatatableData> datatables) {
|
||||
this.datatables = datatables;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -81,7 +81,7 @@ public class SelfAccountTemplateData implements
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (obj.getClass() != getClass()) {
|
||||
if (!(obj instanceof SelfAccountTemplateData)) {
|
||||
return false;
|
||||
}
|
||||
final SelfAccountTemplateData rhs = (SelfAccountTemplateData) obj;
|
||||
|
||||
+2
-2
@@ -146,7 +146,7 @@ public class AppUserData {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
if (o == null || !(o instanceof AppUserData)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -172,4 +172,4 @@ public class AppUserData {
|
||||
return this.isSelfServiceUser==null?false:this.isSelfServiceUser;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public class AppUserClientMapping extends AbstractPersistableCustom {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!getClass().equals(obj.getClass())) {
|
||||
if (!(obj instanceof AppUserClientMapping)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user