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: | FileObj.getFileObject(String name, String ext) should throw UnsupportedOperationException | ||
---|---|---|---|
Product: | platform | Reporter: | dragor |
Component: | Filesystems | Assignee: | Jaroslav Havlin <jhavlin> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 8.0 | ||
Hardware: | PC | ||
OS: | Linux | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
dragor
2015-02-17 19:06:47 UTC
I see, implementation FileObj.getFileObject(String, String) in module masterfs returns null, although it should throw IllegalArgumentException - JavaDoc says so. But some modules may depend on this incorrect behavior, so fixing this may break them. I'll need to evaluate possible impact of the fix. Thank you for reporting. (In reply to Jaroslav Havlin from comment #1) > I see, implementation FileObj.getFileObject(String, String) in module > masterfs returns null, although it should throw IllegalArgumentException - > JavaDoc says so. > > But some modules may depend on this incorrect behavior, so fixing this may > break them. I'll need to evaluate possible impact of the fix. > > Thank you for reporting. Thanks for your response. > some modules may depend on this incorrect behavior
Some implementations of FileObject support relative paths, so getFileObject() on regular file becomes valid.
For example (copied from one of our test cases):
fo1.getFileObject("../../x/y.java")
Throwing exception from FileObj.getFileObject() would break some modules, so we should stay with the current behavior.
Thank you very much for reporting. Your point is correct, but the fix would break backward compatibility.
|