activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clebertsuco...@apache.org
Subject [1/3] activemq-artemis git commit: ARTEMIS-1914 Fix NPE on ConfigurationImpl.hashCode() [Forced Update!]
Date Wed, 06 Jun 2018 20:14:39 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/2.6.x 7580650b5 -> 9fd43a6b7 (forced update)


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/3acfee42
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/3acfee42
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/3acfee42

Branch: refs/heads/2.6.x
Commit: 3acfee42091812f0b962d0fc3753090c80c2a5f3
Parents: 7a1f931
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 16:14:29 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/3acfee42/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/3acfee42/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