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
This commit is contained in:
Robert Davies 2012-04-18 07:01:50 +00:00
parent 61fdb188c8
commit 3df43f5886
1 changed files with 2 additions and 1 deletions

View File

@ -1713,8 +1713,9 @@ public class BrokerService implements Service {
if (getPersistenceAdapter() != null) { if (getPersistenceAdapter() != null) {
PersistenceAdapter adapter = getPersistenceAdapter(); PersistenceAdapter adapter = getPersistenceAdapter();
File dir = adapter.getDirectory(); File dir = adapter.getDirectory();
String dirPath = dir.getAbsolutePath();
if (dir != null) { if (dir != null) {
String dirPath = dir.getAbsolutePath();
if (!dir.isAbsolute()) { if (!dir.isAbsolute()) {
dir = new File(dirPath); dir = new File(dirPath);
} }