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.
The new implementation of Filesystem API causes a lot of NullPointerException all over the IDE on OS/2. I've marked as P1 because it breaks near all functionality. Fortunately the solution is not that hard. The OS_OS2 needs to be added to the OS_WINDOWS_MASK in the org.openide.util.Utilities. (I will send a patch) This causes OS/2 will be recognised as Windows which is not bad as they are quite similar in many way.
Created attachment 15411 [details] Proposed patch to treat OS/2 as Windows
Although OS/2 isn't high priority issue for me I don't see any reason why to block this issue and don't apply such harmless patch. /cvs/openide/src/org/openide/util/Utilities.java new revision: 1.139; previous revision: 1.138
I've tested the patched version. It works perfectly.
Unfortunately it seems this patch cause major problems in modules which uses external applications, like extbrowser and VCS. I've created a new patch which removes OS_OS2 form the OS_WINDOWS_MASK, and add an isOS2() static function to the Utilities. I've checked each call of Utilities.isWindows() in openide and replaced it Utilities.isWindows()||Utilities.isOS2() whenever the windows dependent code also should be applied on OS/2.
Created attachment 17736 [details] Cleaner (however more complex) patch to treat OS/2 as OS/2
I'know that Utilities.isOS2() can be replaced as Utilities.getOperatingSystem() == Utilities.OS_OS2, but as OS/2 and eComStation (successor of OS/2) has been parted, it might happen that System.getProperty("os.name") will return "ecs" in the future.
Radek, could you review the patch?
I don't plan it for beta2. Moreover I don't like it very much even for NB4.0. I'd rather see some more general API methods than isOS2 (something like e.g. isCaseSensitive - that would naturally return false also for OS2). But it deserves to analyse it and suggest appropriate API methods (isCaseSensitive won't be definitely the only one). In addition if these methods will be suggested, all these changes must go through API review and must be aproved which takes time. But I think its feasible to NB4.0 and all your suggestions and patches are welcomed.
The cleaner API would be welcomed, if it is feasible in NB 4.0 timeframe! I'll look at the FS API implementation and trly to do some analysis on it regarding Platform dependent issues on weekend.
I've started the investigation and found the following: I've creates a final helper class called PlatformFS in the org.openide.filesystems. I've placed a number of public static method in there. Like isCaseInsensitive, hasMultiRoots, supportSymlinks, etc. It seems that sometimes NB doesn't respect the platform filesystem correctly. Like windows and MAC are hanled as case insensitive in one place then windows and VMS handled as case insensitive in the other (sometimes windows only). So far it seems collecting platform dependent information to one place is possible and a good idea. One drawback that it affects many module inside the openide. Shall I continue my research and create a possible implementation of this?
*** Issue 50954 has been marked as a duplicate of this issue. ***
Reassigning to new module owner jskrivanek.
Probably fixe din issue 50954.