Fix NPE issue
authorMathieu Baudier <mbaudier@argeo.org>
Tue, 13 Dec 2011 16:26:51 +0000 (16:26 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Tue, 13 Dec 2011 16:26:51 +0000 (16:26 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@4947 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

osgi/runtime/org.argeo.osgi.boot/src/main/java/org/argeo/osgi/boot/OsgiBoot.java

index 94fccdcee2058cfa913c3f5f97194a8aaeb98175..276e13c79a0fe45cd9e19a4bdf86258ed354bbee 100644 (file)
@@ -636,10 +636,11 @@ public class OsgiBoot {
                        File baseDir = new File(base.replace('/', File.separatorChar));
                        File[] files = baseDir.listFiles();
 
-                       if (files == null && debug) {
-                               OsgiBootUtils.warn("Base dir " + baseDir
-                                               + " has no children, exists=" + baseDir.exists()
-                                               + ", isDirectory=" + baseDir.isDirectory());
+                       if (files == null) {
+                               if (debug)
+                                       OsgiBootUtils.warn("Base dir " + baseDir
+                                                       + " has no children, exists=" + baseDir.exists()
+                                                       + ", isDirectory=" + baseDir.isDirectory());
                                return;
                        }