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 ae02dcd71c..ae4a25f5d2 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; 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 58283b35e7..ca28e356cc 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 @@ -88,6 +88,13 @@ public class ConfigurationImplTest extends ActiveMQTestBase { Assert.assertEquals(ActiveMQDefaultConfiguration.getDefaultMemoryMeasureInterval(), conf.getMemoryMeasureInterval()); } + @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++) {