Re: RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-10-01 Thread Seán Coffey
Taken feedback on board. New webrev : http://cr.openjdk.java.net/~coffeys/webrev.8024952.2/webrev/ I've managed to get confirmation from original submitter that this works ok for them. regards, Sean. On 20/09/2013 11:29, Seán Coffey wrote: Dmitry, You're right. I was cautious in moving

Re: RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-10-01 Thread Seán Coffey
On 01/10/2013 13:37, Daniel Fuchs wrote: Hi Seán, This looks simpler and better :-) However I wonder, do you still need to catch NPE in CustomSocketImplFactory.main ? Daniel, Since I'm only creating a dummy socketImpl to test the classcastexception, no real networking stack is in place

Re: RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-10-01 Thread Daniel Fuchs
On 10/1/13 3:09 PM, Seán Coffey wrote: Since I'm only creating a dummy socketImpl to test the classcastexception, no real networking stack is in place here. I'm catching the NPE that would be thrown from the native Java_java_net_TwoStacksPlainSocketImpl_socketAccept function since the underlying

Re: RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-10-01 Thread Daniel Fuchs
On 10/1/13 1:53 PM, Seán Coffey wrote: Taken feedback on board. New webrev : http://cr.openjdk.java.net/~coffeys/webrev.8024952.2/webrev/ I've managed to get confirmation from original submitter that this works ok for them. regards, Sean. Hi Seán, This looks simpler and better :-) However

Re: RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-10-01 Thread Chris Hegarty
The changes look fine to me. -Chris. On 10/01/2013 12:53 PM, Seán Coffey wrote: Taken feedback on board. New webrev : http://cr.openjdk.java.net/~coffeys/webrev.8024952.2/webrev/ I've managed to get confirmation from original submitter that this works ok for them. regards, Sean. On

Re: RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-10-01 Thread Dmitry Samersoff
Sean, The fix looks good for me but the code might be better readable if you inverse the condition. if (!(s instanceof PlainSocketImpl)) { impl.accept(s) return; } ... rest of the code -Dmitry On 2013-10-01 18:54, Daniel Fuchs wrote: On 10/1/13 4:50 PM, Seán Coffey wrote: On

Re: RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-09-20 Thread Dmitry Samersoff
Sean, It might be possible to set s.fd to delegate.fd before call to impl.accept and therefore merge if instanceOf block. -Dmitry On 2013-09-20 00:21, Seán Coffey wrote: Looking for review on recently reported issue. Issue seen on windows when a custom socketImpl is in use. bug report :

Re: RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-09-20 Thread Seán Coffey
Dmitry, You're right. I was cautious in moving the code up but since we're pointing at FileDescriptor Objs, we should be ok. Daniel Fuchs has pointed out another issue. Null delegate being passed into impl.accept if dealing with a custom socketImpl! It should just be impl.accept(s); I'll

RFR : 8024952 : ClassCastException in PlainSocketImpl.accept() when using custom socketImpl

2013-09-19 Thread Seán Coffey
Looking for review on recently reported issue. Issue seen on windows when a custom socketImpl is in use. bug report : https://bugs.openjdk.java.net/browse/JDK-8024952 webrev : http://cr.openjdk.java.net/~coffeys/webrev.8024952/webrev/ Regards, Sean.