Calling #addr() on closed TCPServer causes NullPointerException
---------------------------------------------------------------

                 Key: JRUBY-5111
                 URL: http://jira.codehaus.org/browse/JRUBY-5111
             Project: JRuby
          Issue Type: Bug
          Components: Standard Library
    Affects Versions: JRuby 1.5.2
            Reporter: David Lee
            Assignee: Thomas E Enebo


require 'net/http'
x = TCPServer.new('localhost', 9999)
x.close
x.addr

Java::JavaLang::NullPointerException: 
#<Java::JavaLang::NullPointerException:0xe9b4bb>
        from 
org.jruby.ext.socket.RubyBasicSocket.getLocalSocket(RubyBasicSocket.java:192)
        from org.jruby.ext.socket.RubyIPSocket.addr(RubyIPSocket.java:90)
        from 
org.jruby.ext.socket.RubyIPSocket$i_method_0_0$RUBYINVOKER$addr.call(org/jruby/ext/socket/RubyIPSocket$i_method_0_0$RUBYINVOKER$addr.gen:65535)
        from 
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:289)
        from 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:108)
        from org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:61)
        from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        from org.jruby.ast.RootNode.interpret(RootNode.java:129)
        from 
org.jruby.evaluator.ASTInterpreter.evalWithBinding(ASTInterpreter.java:98)
        from org.jruby.RubyKernel.eval(RubyKernel.java:1045)
        from 
org.jruby.RubyKernel$s_method_0_3$RUBYFRAMEDINVOKER$eval.call(org/jruby/RubyKernel$s_method_0_3$RUBYFRAMEDINVOKER$eval.gen:65535)
        from 
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:160)
        from 
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:66)
        from 
org.jruby.ast.FCallManyArgsNode.interpret(FCallManyArgsNode.java:60)
        from org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
        from 
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:113)
... 98 levels...


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to