Hardcoded default providers for asynchronous channel and file system

Jonathan Lu luchsh at linux.vnet.ibm.com
Fri Nov 4 01:26:13 PDT 2011

Hi nio-dev,

I found some hardcoded default providers in following two classes of nio 

On Unix platforms, these default providers will read the value of 
'os.name' and construct platform specific provider accordingly.
For example, sun.nio.fs.SolarisFileSystemProvider is created if os.name 
equals "SunOS".
So several lines have to be modified to these class files when I try to 
port OpenJDK onto a new platform other than Linux and Solaris.

So how about change this behavior to a more flexible approach? not 
depending on os.name.

I prefer to generating the providers during compiling time in makefile 
as what has been done for nio buffers and have already got a patch works 
in this way. Of course, there're also other ways to do this, such as use 
a predefined property or a configuration file.
Any other ideas?


More information about the nio-dev mailing list