openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1807006 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
Date Fri, 01 Sep 2017 21:02:21 GMT
Author: struberg
Date: Fri Sep  1 21:02:21 2017
New Revision: 1807006

URL: http://svn.apache.org/viewvc?rev=1807006&view=rev
Log:
MEECROWAVE-62 fix NPE on shutdown

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=1807006&r1=1807005&r2=1807006&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
Fri Sep  1 21:02:21 2017
@@ -779,8 +779,13 @@ public class Meecrowave implements AutoC
                 ofNullable(postTask).ifPresent(Runnable::run);
                 postTask = null;
                 try {
-                    IO.delete(base);
-                    IO.delete(ownedTempDir);
+                    if (base != null) {
+                        IO.delete(base);
+                    }
+
+                    if (ownedTempDir != null) {
+                        IO.delete(ownedTempDir);
+                    }
                 } catch (final IllegalArgumentException /*does not exist from the hook*/
e) {
                     // no-op
                 } finally {



Mime
View raw message