ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r829739 - /incubator/ace/trunk/server/src/org/apache/ace/deployment/provider/filebased/FileBasedProvider.java
Date Mon, 26 Oct 2009 09:39:00 GMT
Author: marrs
Date: Mon Oct 26 09:38:59 2009
New Revision: 829739

URL: http://svn.apache.org/viewvc?rev=829739&view=rev
Log:
Bugfix, NPE when the default directory was not specified, made a mistake in the checking code.

Modified:
    incubator/ace/trunk/server/src/org/apache/ace/deployment/provider/filebased/FileBasedProvider.java

Modified: incubator/ace/trunk/server/src/org/apache/ace/deployment/provider/filebased/FileBasedProvider.java
URL: http://svn.apache.org/viewvc/incubator/ace/trunk/server/src/org/apache/ace/deployment/provider/filebased/FileBasedProvider.java?rev=829739&r1=829738&r2=829739&view=diff
==============================================================================
--- incubator/ace/trunk/server/src/org/apache/ace/deployment/provider/filebased/FileBasedProvider.java
(original)
+++ incubator/ace/trunk/server/src/org/apache/ace/deployment/provider/filebased/FileBasedProvider.java
Mon Oct 26 09:38:59 2009
@@ -349,14 +349,15 @@
             m_baseDirectory = baseDirectory;
 
             String defaultDirectoryName = (String) settings.get(DEFAULT_DIRECTORY_NAME);
-            File defaultDirectory = new File(defaultDirectoryName);
-            if (!defaultDirectory.exists() || !defaultDirectory.isDirectory()) {
-                // fallback to using the base directory
-                m_defaultDirectory = baseDirectory;
-            }
-            else {
-                m_defaultDirectory = defaultDirectory;
+            if (defaultDirectoryName != null) {
+                File defaultDirectory = new File(defaultDirectoryName);
+                if (defaultDirectory.exists() && defaultDirectory.isDirectory())
{
+                    m_defaultDirectory = defaultDirectory;
+                    return;
+                }
             }
+            // fallback to using the base directory
+            m_defaultDirectory = baseDirectory;
         }
     }
 



Mime
View raw message