Annotate Object#equals parameter with @Nullable
Closes gh-23093
This commit is contained in:
@@ -246,7 +246,7 @@ public class SpringContextResourceAdapter implements ResourceAdapter {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return (this == other || (other instanceof SpringContextResourceAdapter &&
|
||||
ObjectUtils.nullSafeEquals(getContextConfigLocation(),
|
||||
((SpringContextResourceAdapter) other).getContextConfigLocation())));
|
||||
|
||||
@@ -190,7 +190,7 @@ public class AnnotationTransactionAttributeSource extends AbstractFallbackTransa
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ public class Ejb3TransactionAnnotationParser implements TransactionAnnotationPar
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return (this == other || other instanceof Ejb3TransactionAnnotationParser);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ public class JtaTransactionAnnotationParser implements TransactionAnnotationPars
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return (this == other || other instanceof JtaTransactionAnnotationParser);
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ public class SpringTransactionAnnotationParser implements TransactionAnnotationP
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return (this == other || other instanceof SpringTransactionAnnotationParser);
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ public class MatchAlwaysTransactionAttributeSource implements TransactionAttribu
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -225,7 +225,7 @@ public class MethodMapTransactionAttributeSource
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ public class NameMatchTransactionAttributeSource implements TransactionAttribute
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@ package org.springframework.transaction.interceptor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
@@ -124,7 +125,7 @@ public class RollbackRuleAttribute implements Serializable{
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ abstract class TransactionAttributeSourcePointcut extends StaticMethodMatcherPoi
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.transaction.ReactiveTransaction;
|
||||
import org.springframework.transaction.ReactiveTransactionManager;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
@@ -107,7 +108,7 @@ final class TransactionalOperatorImpl implements TransactionalOperator {
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return (this == other || (super.equals(other) && (!(other instanceof TransactionalOperatorImpl) ||
|
||||
getTransactionManager() == ((TransactionalOperatorImpl) other).getTransactionManager())));
|
||||
}
|
||||
|
||||
@@ -258,7 +258,7 @@ public class DefaultTransactionDefinition implements TransactionDefinition, Seri
|
||||
* @see #toString()
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return (this == other || (other instanceof TransactionDefinition && toString().equals(other.toString())));
|
||||
}
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ public abstract class DelegatingTransactionDefinition implements TransactionDefi
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return this.targetDefinition.equals(other);
|
||||
}
|
||||
|
||||
|
||||
@@ -180,7 +180,7 @@ public class TransactionTemplate extends DefaultTransactionDefinition
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other) {
|
||||
public boolean equals(@Nullable Object other) {
|
||||
return (this == other || (super.equals(other) && (!(other instanceof TransactionTemplate) ||
|
||||
getTransactionManager() == ((TransactionTemplate) other).getTransactionManager())));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user