Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

NullPointerException on calling java_* methods on java interface impl in Ruby #709

Closed
byteit101 opened this Issue · 2 comments

2 participants

@byteit101
class BugTester
 include Java::JavaLang::Runnable
  def run
  end
end
bt =  BugTester.new
p bt
p bt.java_kind_of? Java::java.util.Map

Running it:

$ ruby bug-test.rb
#<BugTester:0x4a16841c>
JavaInterfaceTemplate.java:191:in `call': java.lang.NullPointerException
from CachingCallSite.java:306:in `cacheAndCall'
from CachingCallSite.java:136:in `call'
from CallNoArgNode.java:64:in `interpret'
from CallOneArgNode.java:57:in `interpret'
from ReturnNode.java:92:in `interpret'
from NewlineNode.java:105:in `interpret'
from BlockNode.java:71:in `interpret'
from ASTInterpreter.java:75:in `INTERPRET_METHOD'
from InterpretedMethod.java:182:in `call'
from DefaultMethod.java:188:in `call'
from CachingCallSite.java:326:in `cacheAndCall'
from CachingCallSite.java:170:in `call'
from bug-test.rb:11:in `__file__'
from bug-test.rb:-1:in `load'
from Ruby.java:815:in `runScript'
from Ruby.java:808:in `runScript'
from Ruby.java:679:in `runNormally'
from Ruby.java:528:in `runFromMain'
from Main.java:390:in `doRunFromMain'
from Main.java:279:in `internalRun'
from Main.java:221:in `run'
from Main.java:201:in `main'
@byteit101

Also crashes on .java_class calls

@headius
Owner

It's the .java_class call that's actually broken; kind_of? calls java_kind_of? which calls java_class.

Looking into it.

@headius headius closed this in bc92e76
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.