ARTEMIS-3586 - fix ActiveMQActivationSpec equals field verification switch

The equals method on ActiveMQActivationSpec has a switched
null pointer verification for singleConnection and useJNDI fields. 
Since both fields are initialized with a value by default it should
not be a problem but if one of these fields are set as null at some
point and then equals is called it throws a NPE.
This commit is contained in:
Tiago Bueno 2021-11-18 15:05:39 -03:00 committed by clebertsuconic
parent fcd512f9de
commit f2ab5f7fed
1 changed files with 2 additions and 2 deletions

View File

@ -887,11 +887,11 @@ public class ActiveMQActivationSpec extends ConnectionFactoryProperties implemen
return false;
if (maxSession != null ? !maxSession.equals(that.maxSession) : that.maxSession != null)
return false;
if (singleConnection != null ? !useJNDI.equals(that.useJNDI) : that.useJNDI != null)
if (useJNDI != null ? !useJNDI.equals(that.useJNDI) : that.useJNDI != null)
return false;
if (transactionTimeout != null ? !transactionTimeout.equals(that.transactionTimeout) : that.transactionTimeout != null)
return false;
if (useJNDI != null ? !singleConnection.equals(that.singleConnection) : that.singleConnection != null)
if (singleConnection != null ? !singleConnection.equals(that.singleConnection) : that.singleConnection != null)
return false;
if (jndiParams != null ? !jndiParams.equals(that.jndiParams) : that.jndiParams != null)
return false;