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.
If a FileObject isn't found by ClassPath.getClassPath(), it returns null. An "empty" path object (aka Null Object pattern) would eliminate the need for clients to check the return value from ClassPath.getClassPath(). This empty path would return null from methods such as getResourceName(), just like normal ClassPaths do today, so other client code shouldn't be affected by this enhancement.
I agree that returning an empty classpath should be better then null. The change needs an API review, it is an incompatible semantic change, but it should not cause any problems since clients should not rely on the (non) existence of ClassPathProvider and currently the IDE returns classpath for any file if the j2seplatform module (DefaultClassPathProvider) is installed.