Bug 213562

Summary: NetBeans 7.2 does not support UNC paths
Product: platform Reporter: Jesse Glick <jglick>
Component: FilesystemsAssignee: Jesse Glick <jglick>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P2 CC: anebuzelsky, apireviews, dkonecny, kAlvaro, kvaso, mmirilovic, tzezula
Version: 7.2Keywords: API, API_REVIEW_FAST
Target Milestone: 7.2   
Hardware: PC   
OS: Windows XP   
Whiteboard: jdk_bug_4723726
Issue Type: DEFECT Exception Report:
Bug Depends on: 207060, 209466, 212947, 214011, 214012, 214038, 214131, 214135, 214155    
Bug Blocks: 46813    
Attachments: Proposed patch
Updated patch

Description Jesse Glick 2012-06-04 19:13:24 UTC
Refiling from bug #46813 comment #90 at jtulach's request. Trivial to reproduce: open some nb.org project from a UNC path, start running tests, and there are various errors. All parts of the codebase which call File.toURI or new File(URI) need to be fixed, since these methods are known to be broken.
Comment 1 Jesse Glick 2012-06-06 21:01:56 UTC
*** Bug 213351 has been marked as a duplicate of this bug. ***
Comment 2 Jesse Glick 2012-06-06 21:03:29 UTC
*** Bug 213352 has been marked as a duplicate of this bug. ***
Comment 3 Jesse Glick 2012-06-06 21:26:04 UTC
Created attachment 120453 [details]
Proposed patch

API methods added to Utilities, plus usages. Still being tested.
Comment 4 Jesse Glick 2012-06-06 21:26:23 UTC
Please review.
Comment 5 Jesse Glick 2012-06-06 22:34:56 UTC
Also need to delete some old code in FileUtil which specifically prevented UNC paths from working in toFileObject.
Comment 6 Jesse Glick 2012-06-06 23:49:02 UTC
Created attachment 120455 [details]
Updated patch
Comment 7 Jesse Glick 2012-06-07 21:38:54 UTC
Probably need to have an accelerated review; otherwise this would be committed right before code freeze.
Comment 8 Tomas Zezula 2012-06-08 07:54:15 UTC
Seems good to me.
Maybe extending the Javadoc form:

* Unlike {@link File#toURI} the result works with {@link URI#normalize()}.

to:

* Unlike {@link File#toURI} the result works with {@link URI#normalize()} and {@link URI#resolve}.

The resolve calls normalize but it's more used. Not important.
Comment 9 Jesse Glick 2012-06-08 12:45:03 UTC
(In reply to comment #8)
> extend the Javadoc form

Will do.

I will aim to integrate Monday if there are no objections.
Comment 10 Jaroslav Tulach 2012-06-09 05:18:25 UTC
Y01 I don't understand why this method should be part of Utilities and not FileUtil? It deals with File, so keep it in FileUtil, if it has to exist at all. In other cases we are extracting methods from Utilities (like ImageUtilities), so adding new methods in there and changing whole code base to use them seems like a step backwards.
Comment 11 Jesse Glick 2012-06-09 09:52:35 UTC
Y01 - because it is used from o.n.bootstrap. Anyway it is more like a placeholder for JDK 7 core functionality (to be deprecated when switching to JDK 7 baseline) than a special Filesystems-related API.
Comment 12 David Konecny 2012-06-10 21:33:28 UTC
Looks OK to me too. Thanks.
Comment 13 Jesse Glick 2012-06-11 18:00:37 UTC
core-main #5951a50a6f9a
Comment 14 Jesse Glick 2012-06-13 14:22:36 UTC
*** Bug 213563 has been marked as a duplicate of this bug. ***
Comment 15 Quality Engineering 2012-06-14 06:11:10 UTC
Integrated into 'main-golden', will be available in build *201206140001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c7083da15ba5
User: Jesse Glick <jglick@netbeans.org>
Log: More Utilities.hint (#213562).
Comment 16 Jaroslav Tulach 2012-08-22 12:13:36 UTC
*** Bug 214906 has been marked as a duplicate of this bug. ***
Comment 17 Tomas Mysik 2012-08-22 12:25:05 UTC
*** Bug 216120 has been marked as a duplicate of this bug. ***
Comment 18 kAlvaro 2012-09-14 07:18:01 UTC
This ticket was closed as fixed months ago. Where can I get a compiled build to test? I got build 201209140001 at http://bits.netbeans.org/dev/nightly/ following comment 15 and there's still no trace of code intelligence if files are located in a UNC path :-?
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo