openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1817907 - /openwebbeans/meecrowave/trunk/meecrowave-core/src/main/java/org/apache/meecrowave/Meecrowave.java
Date Tue, 12 Dec 2017 12:16:59 GMT
Author: struberg
Date: Tue Dec 12 12:16:59 2017
New Revision: 1817907

URL: http://svn.apache.org/viewvc?rev=1817907&view=rev
Log:
MEECROWAVE-85 use the same tempdir as created during ct

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=1817907&r1=1817906&r2=1817907&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
Tue Dec 12 12:16:59 2017
@@ -105,6 +105,7 @@ import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import java.util.Objects;
+import java.util.Optional;
 import java.util.Properties;
 import java.util.ServiceLoader;
 import java.util.Set;
@@ -899,10 +900,15 @@ public class Meecrowave implements AutoC
             return dirFile.getAbsolutePath();
         }
 
-        file = new File(Stream.of(new File(System.getProperty("meecrowave.base", "."), "temp").getAbsolutePath(),
"target", "build", ".")
+        Optional<File> baseDir = Stream.of("target", "build")
                 .map(File::new)
                 .filter(File::isDirectory)
-                .findFirst().get(), "meecrowave-" + System.nanoTime());
+                .findFirst();
+        if (baseDir.isPresent()) {
+            file = new File(baseDir.get(), "meecrowave-" + System.nanoTime());
+        } else {
+            file = ownedTempDir;
+        }
         IO.mkdirs(file);
         return file.getAbsolutePath();
     }



Mime
View raw message