Hardcoded default providers for asynchronous channel and file system

Rémi Forax forax at univ-mlv.fr
Tue Nov 8 02:12:09 PST 2011


On 11/08/2011 11:07 AM, Alan Bateman wrote:
> On 08/11/2011 10:00, Rémi Forax wrote:
>>
>> Hi Alan, Hi Jonathan,
>> I've already written a program that changes the default selector 
>> provider
>> by changing the property before trying to access the default file 
>> system.
>>
>> I have no problem with the fact that the default provider class is 
>> hardcoded
>> at build time but the property should still exist,
>> otherwise it will break my code.
>>
>> If you're curious, here is why I change the default provider:
>> http://weblogs.java.net/blog/forax/archive/2011/10/01/asyncswing
> I haven't looked at the patch yet (might be a few days) but the system 
> property to override the default provider shouldn't be impacted. It's 
> really only 
> sun.nio.ch.{DefaultSelectorProvider,DefaultAsynchronousChannelProvider} and 
> sun.nio.fs.DefaultFileSystemProvider that need to be touched. This is 
> why get used if the default provider isn't specified via a system 
> property (or the other specified lookup mechanism). A simply rename or 
> sed replacement in the build should do it.

Ok, I understand now,
thanks for the explanation.

>
> -Alan.

Rémi



More information about the nio-dev mailing list