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.
Summary: | Permit FileSystem.Status to work on SFS from unit tests | ||
---|---|---|---|
Product: | platform | Reporter: | Jesse Glick <jglick> |
Component: | Filesystems | Assignee: | Jesse Glick <jglick> |
Status: | RESOLVED FIXED | ||
Severity: | blocker | CC: | jtulach |
Priority: | P3 | Keywords: | API_REVIEW_FAST |
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: | |
Attachments: | Proposed patch (missing apichanges) |
Description
Jesse Glick
2009-08-28 16:23:39 UTC
Created attachment 86798 [details]
Proposed patch (missing apichanges)
Please review. Y01 Put the implementation into non-public package. openide.filesystems and core.startup can use it and then you will not need to introduce the new public method at all. Y01 - that is what I considered first but core.startup has a regular dep on openide.filesystems and cannot use non-public packages. I definitely do not wish to introduce another impl dep when we should be cleaning the ones we already have. Imho, just change FileSystem.java to private static final DEFAULT_STATUS = new SFSStatus(); public Status getStatus() { return isDefault() ? DEFAULT_STATUS : STATUS_NONE; } and in core.startup don't override the getStatus method. That seems like the least disruptive API change. It is compatible inside NetBeans based application. Slightly incompatible for external use, but nobody shall really suffer from such change. Good idea, I think that would work. I am adding the API_REVIEW_FAST back, it is still a functional API change and I would recommend to document it in apichanges.xml. No need to wait with integration, imho. Some minor complications are caused by the fact that, due to jtulach's ADD_FS in 4701064c3bc5 and 43328c9c8232, new Repository(FileUtil.createMemoryFileSystem()).getDefaultFileSystem().isDefault() == false contrary to what one might expect, and changing isDefault to say return repository != null && this == repository.getDefaultFileSystem(); does not work either (because repository == null). This code is so convoluted I do not dare touch it. core-main #5cef92d30652 Integrated into 'main-golden', will be available in build *200909010201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/5cef92d30652 User: Jesse Glick <jglick@netbeans.org> Log: Issue #171092: use the same FileSystem.Status implementation for unit tests as in full platform. |