This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 244319 - replace VCSProxy with nio.Path
Summary: replace VCSProxy with nio.Path
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Ondrej Vrabec
Depends on: 198982
  Show dependency tree
Reported: 2014-05-06 06:58 UTC by Ondrej Vrabec
Modified: 2014-11-06 14:10 UTC (History)
6 users (show)

See Also:
Issue Type: TASK
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description Ondrej Vrabec 2014-05-06 06:58:13 UTC
In order for the VCS core to potentially go into TW, VCSProxy should be replaced with java.nio.Path now that we're on JDK7.
VCSProxy is slow in some situations because it requires conversions from FileObjecs -> Files which touches disk and slows down the process. It is a standardized interface so everything can be hidden behind it. In future NB FileObjects might have a native conversions directly to Paths (similar to the current converts to Files) so the VCSProxy will be obsolete.
Comment 1 Ondrej Vrabec 2014-05-06 06:59:19 UTC
i will play with it and hopefully later provide a patch to review
Comment 2 Ondrej Vrabec 2014-05-06 15:02:59 UTC
I didn't get too far. I am stuck on converting a FileObject to java.nio.Path. There is no method that converts it directly so the only way is probably Paths.get(FO.getPath()) which probably works only for FOs based on The method delegates to FileSystems.getDefault().getPath(first, more) which most likely ends with an Exception because it probably accepts only standard paths (/home/...) and would not work for jar filesystems, layer FS etc. and i doubt it knows how to convert a remote FO.
I guess there needs to be a FO.toPath method or FileUtil.toPath(FO).
Comment 3 Jaroslav Tulach 2014-05-06 19:10:56 UTC
Please get in touch with Jarda Havlín, he could introduce FileObject.toPath while working on issue 198982.