Code Review request: 8047186: jdk.net.Sockets throws InvocationTargetException instead of original runtime exceptions

Artem Smotrakov artem.smotrakov at oracle.com
Wed Jun 18 12:53:15 UTC 2014


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


More information about the net-dev mailing list