New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
byteit101 opened this Issue May 6, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@byteit101
Member

byteit101 commented May 6, 2013

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

This comment has been minimized.

Show comment
Hide comment
@byteit101

byteit101 May 6, 2013

Member

Also crashes on .java_class calls

Member

byteit101 commented May 6, 2013

Also crashes on .java_class calls

@headius

This comment has been minimized.

Show comment
Hide comment
@headius

headius May 7, 2013

Member

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

Looking into it.

Member

headius commented May 7, 2013

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 May 7, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment