Repository: incubator-netbeans
Updated Branches:
  refs/heads/master f09879555 -> fdedb2518


Use getWorkDir() instead of manually getting the tmpdir

On macOS a Permission denied IOException previously happened because java 
cannot write on root (/)


Project: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-netbeans/commit/fdedb251
Tree: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/tree/fdedb251
Diff: http://git-wip-us.apache.org/repos/asf/incubator-netbeans/diff/fdedb251

Branch: refs/heads/master
Commit: fdedb2518d62830b58997e6c826875bc63d7fe69
Parents: f098795
Author: Emilian Bold <e...@apache.org>
Authored: Tue Sep 26 11:57:33 2017 +0300
Committer: Emilian Bold <e...@apache.org>
Committed: Sun Oct 1 09:06:40 2017 +0300

----------------------------------------------------------------------
 .../unit/src/org/openide/filesystems/FileChooserBuilderTest.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-netbeans/blob/fdedb251/openide.filesystems.nb/test/unit/src/org/openide/filesystems/FileChooserBuilderTest.java
----------------------------------------------------------------------
diff --git 
a/openide.filesystems.nb/test/unit/src/org/openide/filesystems/FileChooserBuilderTest.java
 
b/openide.filesystems.nb/test/unit/src/org/openide/filesystems/FileChooserBuilderTest.java
index 449d8c9..12a8737 100644
--- 
a/openide.filesystems.nb/test/unit/src/org/openide/filesystems/FileChooserBuilderTest.java
+++ 
b/openide.filesystems.nb/test/unit/src/org/openide/filesystems/FileChooserBuilderTest.java
@@ -171,9 +171,9 @@ public class FileChooserBuilderTest extends NbTestCase {
 
     public void testSetSelectionApprover() throws Exception {
         FileChooserBuilder instance = new FileChooserBuilder("i");
-        File tmp = new File(System.getProperty("java.io.tmpdir"));
+        File tmp = getWorkDir();
         assertTrue ("Environment is insane", tmp.exists() && 
tmp.isDirectory());
-        File sel = new File("tmp" + System.currentTimeMillis());
+        File sel = new File(tmp, "tmp" + System.currentTimeMillis());
         if (!sel.exists()) {
             assertTrue (sel.createNewFile());
         }

Reply via email to