On 18/06/14 13:53, Artem Smotrakov wrote:
Hello,
Please review this fix for 8u:
https://bugs.openjdk.java.net/browse/JDK-8047186
http://cr.openjdk.java.net/~asmotrak/so_flow_sla/sockets_exceptions/webrev.01/
getOption() and setOption() methods of jdk.net.Sockets class throw
InvocationTargetException instead of actual runtime exceptions like
NullPointerException and AccessControlException. I think it is better
to throw an original runtime exception to reduce and simplify stack
traces.
jdk/net/Sockets/Test.java should have caught the issue, but currently
it fails due to https://bugs.openjdk.java.net/browse/JDK-8047187.
That's why I didn't added separate test for this bug.
Artem
I think what you're saying is that we are currently wrapping all
RuntimeExceptions in a new non-specific
RuntimeException, and it's just better to throw the original exception.
Seems reasonable to me.
Michael.