activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject activemq-artemis git commit: ARTEMIS-1914 Fix NPE on ConfigurationImpl.hashCode()
Date Wed, 06 Jun 2018 19:33:54 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/2.6.x 0b460ea54 -> 0db8353a3


ARTEMIS-1914 Fix NPE on ConfigurationImpl.hashCode()

(cherry picked from commit 1d89bc7dd279b6741b7ff276f2230aaab60f0db8)


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/0db8353a
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/0db8353a
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/0db8353a

Branch: refs/heads/2.6.x
Commit: 0db8353a3e667db845ba5c5921f6b161b64a8077
Parents: 0b460ea
Author: Andrey Arkaev <aarkaev@naumen.ru>
Authored: Wed Jun 6 18:08:15 2018 +0500
Committer: Clebert Suconic <clebertsuconic@apache.org>
Committed: Wed Jun 6 15:33:35 2018 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/config/impl/ConfigurationImpl.java  | 2 +-
 .../artemis/core/config/impl/ConfigurationImplTest.java       | 7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0db8353a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
index ae02dcd..ae4a25f 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImpl.java
@@ -1635,7 +1635,7 @@ public class ConfigurationImpl implements Configuration, Serializable
{
       result = prime * result + (logJournalWriteRate ? 1231 : 1237);
       result = prime * result + ((managementAddress == null) ? 0 : managementAddress.hashCode());
       result = prime * result + ((managementNotificationAddress == null) ? 0 : managementNotificationAddress.hashCode());
-      result = prime * result + (maskPassword ? 1231 : 1237);
+      result = prime * result + (maskPassword == null ? 0 : maskPassword.hashCode());
       result = prime * result + maxConcurrentPageIO;
       result = prime * result + (int) (memoryMeasureInterval ^ (memoryMeasureInterval >>>
32));
       result = prime * result + memoryWarningThreshold;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/0db8353a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
index 58283b3..ca28e35 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
@@ -89,6 +89,13 @@ public class ConfigurationImplTest extends ActiveMQTestBase {
    }
 
    @Test
+   public void testNullMaskPassword() {
+      ConfigurationImpl impl = new ConfigurationImpl();
+      impl.setMaskPassword(null);
+      impl.hashCode();
+   }
+
+   @Test
    public void testSetGetAttributes() throws Exception {
       for (int j = 0; j < 100; j++) {
          int i = RandomUtil.randomInt();


Mime
View raw message