[hg] main-silver: Prevent failure when workdir is on path with s...

  • From: Jiri Skrivanek < >
  • To:
  • Subject: [hg] main-silver: Prevent failure when workdir is on path with s...
  • Date: Fri, 18 Jan 2013 18:38:50 -0800

changeset ed34145855ec in main-silver ((none))
details: http://hg.netbeans.org/main-silver/rev/ed34145855ec
description:
        Prevent failure when workdir is on path with space.

diffstat:

 
parsing.api/test/unit/src/org/netbeans/modules/parsing/impl/indexing/RefreshWorkTest.java
 |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (34 lines):

diff --git 
a/parsing.api/test/unit/src/org/netbeans/modules/parsing/impl/indexing/RefreshWorkTest.java
 
b/parsing.api/test/unit/src/org/netbeans/modules/parsing/impl/indexing/RefreshWorkTest.java
--- 
a/parsing.api/test/unit/src/org/netbeans/modules/parsing/impl/indexing/RefreshWorkTest.java
+++ 
b/parsing.api/test/unit/src/org/netbeans/modules/parsing/impl/indexing/RefreshWorkTest.java
@@ -63,6 +63,7 @@
 import org.openide.filesystems.FileChangeAdapter;
 import org.openide.filesystems.FileObject;
 import org.openide.filesystems.FileUtil;
+import org.openide.util.Utilities;
 
 /**
  *
@@ -95,11 +96,11 @@
 
         File rootAFile = new File(outerFolder1, "rootA");
         rootAFile.mkdirs();
-        rootAUrl = rootAFile.toURL();
+        rootAUrl = Utilities.toURI(rootAFile).toURL();
         scannedRoots2Dependencies.put(rootAUrl, 
Collections.<URL>emptyList());
         File rootBFile = new File(outerFolder1, "rootB");
         rootBFile.mkdirs();
-        rootBUrl = rootBFile.toURL();
+        rootBUrl = Utilities.toURI(rootBFile).toURL();
         scannedRoots2Dependencies.put(rootBUrl, 
Collections.<URL>emptyList());
 
         File rootCFile = new File(outerFolder2, "rootC");
@@ -110,7 +111,7 @@
                 "org/pckg1/pckg2/file2.txt",
                 "org/pckg2/"
         );
-        rootCUrl = rootCFile.toURL();
+        rootCUrl = Utilities.toURI(rootCFile).toURL();
         scannedRoots2Dependencies.put(rootCUrl, 
Collections.<URL>emptyList());
 
         RepositoryUpdater.getDefault().rootsListeners.setListener(new 
FileChangeAdapter(), new FileChangeAdapter());

[hg] main-silver: Prevent failure when workdir is on path with s...

Jiri Skrivanek 01/19/2013

Project Features

About this Project

Editor was started in November 2009, is owned by Martin Ryzl, and has 147 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close