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.

Bug 44136 - Filesystem support has been broken under OS/2
Summary: Filesystem support has been broken under OS/2
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 4.x
Hardware: PC OS/2
: P4 blocker (vote)
Assignee: Jiri Skrivanek
URL:
Keywords:
Depends on:
Blocks: 42678
  Show dependency tree
 
Reported: 2004-06-02 08:25 UTC by lkishalmi
Modified: 2008-12-22 14:48 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Proposed patch to treat OS/2 as Windows (908 bytes, patch)
2004-06-02 08:39 UTC, lkishalmi
Details | Diff
Cleaner (however more complex) patch to treat OS/2 as OS/2 (13.16 KB, patch)
2004-09-19 14:01 UTC, lkishalmi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description lkishalmi 2004-06-02 08:25:22 UTC
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.
Comment 1 lkishalmi 2004-06-02 08:39:20 UTC
Created attachment 15411 [details]
Proposed patch to treat OS/2 as Windows
Comment 2 rmatous 2004-06-02 09:11:28 UTC
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
Comment 3 lkishalmi 2004-06-07 12:48:02 UTC
I've tested the patched version. It works perfectly.
Comment 4 lkishalmi 2004-09-19 13:43:25 UTC
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.
Comment 5 lkishalmi 2004-09-19 14:01:21 UTC
Created attachment 17736 [details]
Cleaner (however more complex) patch to treat OS/2 as OS/2
Comment 6 lkishalmi 2004-09-19 14:08:29 UTC
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.
Comment 7 lkishalmi 2004-09-22 17:32:38 UTC
Radek, could you review the patch?
Comment 8 rmatous 2004-09-22 19:23:24 UTC
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.

Comment 9 lkishalmi 2004-09-22 22:21:09 UTC
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.
Comment 10 lkishalmi 2004-10-14 16:43:41 UTC
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? 
Comment 11 rmatous 2004-10-29 14:37:00 UTC
*** Issue 50954 has been marked as a duplicate of this issue. ***
Comment 12 Antonin Nebuzelsky 2008-04-15 17:06:11 UTC
Reassigning to new module owner jskrivanek.
Comment 13 Jiri Skrivanek 2008-10-13 15:13:27 UTC
Probably fixe din issue 50954.