Hardcoded default providers for asynchronous channel and file system
Alan Bateman
Alan.Bateman at oracle.com
Thu Nov 10 06:33:05 PST 2011
On 08/11/2011 09:11, Jonathan Lu wrote:
>
> Hello Alan,
>
> Thanks for reminding! I've updated my patch to include
> DefaultSelectorProvider, see the attachment.
> And I also tried to build the patched OpenJDK8 on Linux, Windows and
> Solaris, the result seems OK.
> Could you please take a look at it?
I finally got a chance to look at this.
My only concern with is that adds quite a bit of complexity to the
build. From a portability point of view (the original objective) then it
means editing three additional scripts for each platform too.
What would you think about making it a lot simpler with something like:
ifneq ($(PLATFORM),windows)
$(GENSRCDIR)/sun/nio/fs/DefaultFileSystemProvider.java: \
$(PLATFORM_SRC)/classes/sun/nio/fs/DefaultFileSystemProvider.java.$(PLATFORM)
$(install-file)
clean::
$(RM) $(GENSRCDIR)/sun/nio/fs/DefaultFileSystemProvider.java
endif
One benefit of this is that it would be trivial to change in the event
that there were separate src/linux and src/solaris directories (BTW:
don't read anything into this comment but at some point I think we
should re-visit the current layout).
One other comment is that you've retained the code to choose the
SelectorProvider implementation based on the Linux kernel. I think we
should just drop this check as it's unlikely that anyone is porting and
target ancient 2.4 kernels now.
-Alan.
More information about the nio-dev
mailing list