Polishing

This commit is contained in:
Juergen Hoeller
2019-07-30 16:59:01 +02:00
parent 74658789ee
commit 215caedd30
11 changed files with 145 additions and 137 deletions

View File

@@ -522,7 +522,8 @@ public class CachingConnectionFactory extends SingleConnectionFactory {
public boolean equals(Object other) {
// Effectively checking object equality as well as toString equality.
// On WebSphere MQ, Destination objects do not implement equals...
return (this == other || destinationEquals((DestinationCacheKey) other));
return (this == other || (other instanceof DestinationCacheKey &&
destinationEquals((DestinationCacheKey) other)));
}
@Override
@@ -590,7 +591,7 @@ public class CachingConnectionFactory extends SingleConnectionFactory {
@Override
public int hashCode() {
return 31 * super.hashCode() + ObjectUtils.nullSafeHashCode(this.selector);
return (31 * super.hashCode() + ObjectUtils.nullSafeHashCode(this.selector));
}
@Override