mirror of https://github.com/apache/activemq.git
Generating a new equals method in TypeConversionSupport so the proper null checks exist
This commit is contained in:
parent
f25e7ab47f
commit
2b99ffcc22
|
@ -50,9 +50,25 @@ public final class TypeConversionSupport {
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
ConversionKey x = (ConversionKey)o;
|
||||
return x.from == from && x.to == to;
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
ConversionKey other = (ConversionKey) obj;
|
||||
if (from == null) {
|
||||
if (other.from != null)
|
||||
return false;
|
||||
} else if (!from.equals(other.from))
|
||||
return false;
|
||||
if (to == null) {
|
||||
if (other.to != null)
|
||||
return false;
|
||||
} else if (!to.equals(other.to))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue