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.
FileURL.encodeFileObject(FileSystem fs, FileObject fo) breakes the public contract of java.net.URL by setting the hostname as null value. Even if the URL constructor implementation permits passing null value the javadoc does not. It has fatal impact on comparisons of URL objects then (see URLStreamHandler.hostsEqual). Following code always fails FileObject fo = lfs.findResource(...); URL u = fo.getURL; assertEquals(u, new URL(u.toExternalForm()));
fixed in /cvs/openide/src/org/openide/filesystems/FileURL.java,v <-- FileURL.java new revision: 1.17; previous revision: 1.16
verified, created testURLContract qa-unit test