From 3df43f58866ea4c400629a7831dee3b7a073e423 Mon Sep 17 00:00:00 2001 From: Robert Davies Date: Wed, 18 Apr 2012 07:01:50 +0000 Subject: [PATCH] For https://issues.apache.org/jira/browse/AMQ-3573 In junit tests - fixed null pointer if the directory doesn't exist git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1327388 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/broker/BrokerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index 87f4b14459..34a6bc5b8a 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -1713,8 +1713,9 @@ public class BrokerService implements Service { if (getPersistenceAdapter() != null) { PersistenceAdapter adapter = getPersistenceAdapter(); File dir = adapter.getDirectory(); - String dirPath = dir.getAbsolutePath(); + if (dir != null) { + String dirPath = dir.getAbsolutePath(); if (!dir.isAbsolute()) { dir = new File(dirPath); }