Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
jtsk_2.1
-
None
-
6345013
Description
It appears that net.jini.jeri.ssl.SslConnection.checkConnectPermission() should check that sslSocket is not null before attmepting to use the socket to obtain the address of the remote peer. sslSocket can be set to null if the connection is closed. A NullPointerException in SslConnection.checkConnectPermission() has been reported in two runs of the End2EndTest during nightly testing (output attached). The exception is the following:
java.lang.NullPointerException
at net.jini.jeri.ssl.SslConnection.checkConnectPermission(SslConnection.java:667)
at net.jini.jeri.ssl.SslEndpointImpl.connect(SslEndpointImpl.java:908)
at net.jini.jeri.connection.ConnectionManager.connect(ConnectionManager.java:205)
at net.jini.jeri.connection.ConnectionManager$ReqIterator.next(ConnectionManager.java:629)
at com.sun.jini.test.impl.end2end.jssewrapper.EndpointWrapper$WrapperIterator.<init>(EndpointWrapper.java:128)
at com.sun.jini.test.impl.end2end.jssewrapper.EndpointWrapper.newRequest(EndpointWrapper.java:104)
at net.jini.jeri.BasicObjectEndpoint.newCall(BasicObjectEndpoint.java:363)
at net.jini.jeri.BasicInvocationHandler.invokeRemoteMethod(BasicInvocationHandler.java:645)
at net.jini.jeri.BasicInvocationHandler.invoke(BasicInvocationHandler.java:528)
at $Proxy1.callAfterUnexport(Unknown Source)
at com.sun.jini.test.impl.end2end.e2etest.SmartProxy.callAfterUnexport(SmartProxy.java:191)
at com.sun.jini.test.impl.end2end.e2etest.SecureClient$CallAfterUnexportCallHandler.doCall(SecureClient.java:660)
at com.sun.jini.test.impl.end2end.e2etest.CallHandler.handleCall(CallHandler.java:108)
at com.sun.jini.test.impl.end2end.e2etest.SecureClient.cleanup(SecureClient.java:552)
at com.sun.jini.test.impl.end2end.e2etest.SecureClient.runTest(SecureClient.java:489)
at com.sun.jini.test.impl.end2end.e2etest.SecureClient$1.run(SecureClient.java:443)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:500)
at com.sun.jini.test.impl.end2end.e2etest.SecureClient.run(SecureClient.java:435)
at java.lang.Thread.run(Thread.java:534)
Needs to be fixed.
The endpoint iterator needs to be more robust with respect to unusable
connections, hence needs to check for the null'd out socket.