openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1797587 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
Date Sun, 04 Jun 2017 16:24:15 GMT
Author: rmannibucau
Date: Sun Jun  4 16:24:15 2017
New Revision: 1797587

URL: http://svn.apache.org/viewvc?rev=1797587&view=rev
Log:
MEECROWAVE-34 avoid NPE if pid file is not absolute

Modified:
    openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java

Modified: openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
URL: http://svn.apache.org/viewvc/openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java?rev=1797587&r1=1797586&r2=1797587&view=diff
==============================================================================
--- openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
(original)
+++ openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
Sun Jun  4 16:24:15 2017
@@ -606,7 +606,7 @@ public class Meecrowave implements AutoC
             throw new IllegalStateException(e);
         }
         ofNullable(configuration.getPidFile()).ifPresent(pidFile -> {
-            if (!pidFile.getParentFile().isDirectory() && !pidFile.getParentFile().mkdirs())
{
+            if (pidFile.getParentFile() != null && !pidFile.getParentFile().isDirectory()
&& !pidFile.getParentFile().mkdirs()) {
                 throw new IllegalArgumentException("Can't create " + pidFile);
             }
             final String pid = ManagementFactory.getRuntimeMXBean().getName();



Mime
View raw message