From 9acdec2468aa89cf6dfd99323f87c5c1a351bd0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Andr=C3=A9=20Pearce?= Date: Fri, 2 Feb 2018 09:52:38 +0000 Subject: [PATCH] ARTEMIS-1655 Fix TransportConfiguration encode failing Check for null on isMaskPassword, seems this regressed in bb84f679363f62e8b2663f63bf23f04133de481d change for ARTEMIS-1600 --- .../core/deployers/impl/FileConfigurationParser.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java index 14b002501b..8eee4dc86d 100644 --- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java +++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/deployers/impl/FileConfigurationParser.java @@ -1159,7 +1159,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { Map params = configurations.get(0).getParams(); - params.put(ActiveMQDefaultConfiguration.getPropMaskPassword(), mainConfig.isMaskPassword()); + if (mainConfig.isMaskPassword() != null) { + params.put(ActiveMQDefaultConfiguration.getPropMaskPassword(), mainConfig.isMaskPassword()); + } if (mainConfig.getPasswordCodec() != null) { params.put(ActiveMQDefaultConfiguration.getPropPasswordCodec(), mainConfig.getPasswordCodec()); @@ -1180,7 +1182,9 @@ public final class FileConfigurationParser extends XMLConfigurationUtil { Map params = configurations.get(0).getParams(); - params.put(ActiveMQDefaultConfiguration.getPropMaskPassword(), mainConfig.isMaskPassword()); + if (mainConfig.isMaskPassword() != null) { + params.put(ActiveMQDefaultConfiguration.getPropMaskPassword(), mainConfig.isMaskPassword()); + } if (mainConfig.getPasswordCodec() != null) { params.put(ActiveMQDefaultConfiguration.getPropPasswordCodec(), mainConfig.getPasswordCodec());