RFR [9]: 8034174 Remove use of JVM_* functions from java.net code
Chris Hegarty
chris.hegarty at oracle.com
Sun Feb 23 01:08:11 PST 2014
Thanks for your comments Bernd.
On 22 Feb 2014, at 14:03, Bernd Eckenfels <bernd-2014 at eckenfels.net> wrote:
> Hello,
>
>> Am 22.02.2014 um 10:33 schrieb Alan Bateman <Alan.Bateman at oracle.com>:
>>
>>> http://cr.openjdk.java.net/~chegar/8034174/webrev.00/webrev/
>> Thank for you for doing this, it's long over due.
>
> Hm, I actually like to have that JVM_ abstraction layer. Looks like it is now replaced by NET_ in some parts, do we really want to remove it in others? (the JVM_IO_ERR beeing an obvious advantage)
I see Alan has already responded on this point.
> Anyway, things I noticed:
>
> There are two exact same patches in Inet4AddrImpl to getLocalHostName. One uses NI_MAXHOST and the other strlen - that should be unified (or use a abstracted helper anyway?)
Right. I’ll change it to use NI_MAXHOST.
> 769: There is a comment about not needing NET_connect and then it is used anyway.
D’oh. I’ll fix this.
> for Socket() it it tested for fd==-1 for getsockopt it is tested for rc < 0?
There is a proliferation of styles in the networking native code. I can cleanup some as part of this issue, but I’m reluctant to do more than that. Others cleanup tasks should be done under a separate JIRA issue.
> Inet6AddrImpl uses getsockopt() instead of NET_getsockopt?
My preference is to use the system call, unless there is a reason not to.
This is just a pass to remove the superfluous dependency on the VM interface. There are many many other cleanups and refactoring needed to bring the networking code into the twenty first century.
-Chris
> Greetings
> Bernd
More information about the net-dev
mailing list