Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4239752
Votes 1
Synopsis FileSystem should be a platform-specific class to avoid native code
Category java:classes_io
Reported Against kestrel
Release Fixed
State 3-Accepted, request for enhancement
Priority: 4-Low
Related Bugs 4125893
Submit Date 19-MAY-1999
Description
Subject: Re: FileSystem.getFileSystem()
   Date: Wed, 19 May 1999 15:09:40 -0700
   From: Mark Reinhold <  xxxxx@xxxxx  >
     To: Dean Long <  xxxxx@xxxxx  >

> Mark, is there any reason why this couldn't be a Java method that did
> Class.forName/newInstance on a "filesystem.class" property, similar
> to AWT's "awt.toolkit" and java.net's "impl.prefix"?  It would be one
> less native method.  If "impl.prefix" is not meant to be java.net only,
> then I suppose you could also use it as "java.io." + impl_prefix +
> "FileSystem" to get the filesystem class.

Actually we can do even better than that by having the platform-specific
filesystem class just be named java.io.FileSystem in the first place and doing
away with the indirection.  It's a pretty simple set of changes.  File an RFE
and I'll assign someone to do it for Kestrel fcs (it's too late for beta).

- Mark


  xxxxx@xxxxx   1999-05-19

If we make this class platform-specific, then I think that we can also
make all the methods static and avoid making an instance of it.

In addition, it would be nice if platform-specific class naming (java.*
vs. sun.*) and lookup (native method vs. property vs. Java file in
src/<platform>/classes) was handled consistently.  For example, consider
the different ways Runtime.execInternal gets a platform Process,
Toolkit.getDefaultToolkit() gets a platform Toolkit, InetAddress and
DatagramSocket get a InetAdressImpl and DatagramSocketImpl.
There are probably more examples, and they are probably all different.

  xxxxx@xxxxx   1999-05-21
Work Around
N/A
Evaluation
N/A
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang