This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new f2ab5f7 ARTEMIS-3586 - fix ActiveMQActivationSpec equals field
verification switch
f2ab5f7 is described below
commit f2ab5f7feddb0df324b574d94a463da4bc314d9d
Author: Tiago Bueno <[email protected]>
AuthorDate: Thu Nov 18 15:05:39 2021 -0300
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.
---
.../org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
index 215775b..9b531c0 100644
---
a/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
+++
b/artemis-ra/src/main/java/org/apache/activemq/artemis/ra/inflow/ActiveMQActivationSpec.java
@@ -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;