Fix NPE issue
[lgpl/argeo-commons.git] / 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;
                        }