Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2019 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.
|
||||
@@ -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
|
||||
@@ -577,6 +578,9 @@ public class CachingConnectionFactory extends SingleConnectionFactory {
|
||||
if (this == other) {
|
||||
return true;
|
||||
}
|
||||
if (!(other instanceof ConsumerCacheKey)) {
|
||||
return false;
|
||||
}
|
||||
ConsumerCacheKey otherKey = (ConsumerCacheKey) other;
|
||||
return (destinationEquals(otherKey) &&
|
||||
ObjectUtils.nullSafeEquals(this.selector, otherKey.selector) &&
|
||||
|
||||
Reference in New Issue
Block a user