Fix NPE in JAAS PropertiesLoader when in debug mode without baseDir

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

Branch: refs/heads/master
Commit: a3527869b4a90f4c9ee578c09d1ce9fc06bc1408
Parents: 6fbafc4
Author: Ville Skyttä <ville.sky...@iki.fi>
Authored: Thu Oct 13 00:25:08 2016 +0300
Committer: Ville Skyttä <ville.sky...@iki.fi>
Committed: Thu Oct 13 00:25:45 2016 +0300

----------------------------------------------------------------------
 .../activemq/artemis/spi/core/security/jaas/PropertiesLoader.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/a3527869/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
index 0a07658..616bb82 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
@@ -112,7 +112,7 @@ public class PropertiesLoader {
             }
          }
          if (debug) {
-            logger.debug("Using basedir=" + baseDir.getAbsolutePath());
+            logger.debug("Using basedir=" + (baseDir == null ? null : 
baseDir.getAbsolutePath()));
          }
          return baseDir;
       }

Reply via email to