Consistent equals/hashCode style (and related polishing)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2021 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -65,13 +65,8 @@ public class MatchAlwaysTransactionAttributeSource implements TransactionAttribu
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof MatchAlwaysTransactionAttributeSource otherTas)) {
|
||||
return false;
|
||||
}
|
||||
return ObjectUtils.nullSafeEquals(this.transactionAttribute, otherTas.transactionAttribute);
|
||||
return (this == other || (other instanceof MatchAlwaysTransactionAttributeSource that &&
|
||||
ObjectUtils.nullSafeEquals(this.transactionAttribute, that.transactionAttribute)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
* Copyright 2002-2023 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -180,13 +180,8 @@ public class RollbackRuleAttribute implements Serializable{
|
||||
|
||||
@Override
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof RollbackRuleAttribute rhs)) {
|
||||
return false;
|
||||
}
|
||||
return this.exceptionPattern.equals(rhs.exceptionPattern);
|
||||
return (this == other || (other instanceof RollbackRuleAttribute that &&
|
||||
this.exceptionPattern.equals(that.exceptionPattern)));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user