RFR:8170868: DefaultProxySelector should use system defaults on Windows, MacOS and Gnome
Chris Hegarty
chris.hegarty at oracle.com
Fri Dec 23 13:57:11 UTC 2016
Arno,
> On 22 Dec 2016, at 16:44, Zeller, Arno <arno.zeller at sap.com> wrote:
>
> Hi Vyom,
>
> thanks for the comments – now I understand the problem. I reworked all three platforms to check for exceptions and NULL if needed.
> Regarding the JNIReleaseString calls: I seem to be on the save sidether. They are listed as some of the few calls that can be called with a pending exception as described in http://docs.oracle.com/javase/8/docs/technotes/guides/jni/spec/design.html#exception_handling
>
> Please see my new webrev:
> http://cr.openjdk.java.net/~clanger/webrevs/8170868.2/
I welcome this change. It is long over due, so thanks for running with it.
I have yet to build and test the patch myself, but just a few initial comments:
1) It seems awful to have to deal with LinkedList in native code. How
about returning an array from native, and then converting that into
whatever list type is appropriate at the Java level.
2) I would prefer the use of List.of(...), and list.of() for empty, since
these are immutable and efficient list implementations.
3) Is the comment “Inspired ...” necessary / appropriate?
4) Can some of the native initialization code be moved to a platform
independent location, to remove duplication?
5) The new file has a shared copyright header. I see similar SAP
headers in a few files, but none shared with the Oracle header.
How did you arrive at this format?
-Chris.
More information about the net-dev
mailing list