Skip to content
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

java_send should be smart enough to unwrap the Ruby version of a Java class #638

Closed
carllerche opened this Issue Apr 15, 2013 · 4 comments

Comments

Projects
None yet
5 participants
@carllerche
Copy link

commented Apr 15, 2013

That's what @headius told me to say...

Trying to call java_send and pass references to the java classes results in the following error:

cannot convert instance of class org.jruby.RubyModule to class java.lang.Class

Using the following works:

java.lang.Class.for_name("com.netflix.astyanax.MutationBatch")

@headius

This comment has been minimized.

Copy link
Member

commented Apr 15, 2013

java_send needs logic to unwrap our proxied RubyModule/RubyClass versions of Java classes for the reflective lookup.

@ghost ghost assigned headius Apr 16, 2013

@enebo

This comment has been minimized.

Copy link
Member

commented Apr 16, 2013

I believe this is more than the java_* calling mechanisms as well, but I am at a loss in trying to find another case right now.

@tduehr

This comment has been minimized.

Copy link
Contributor

commented Jun 19, 2014

Any method taking a java.lang.reflect.Method will have similar problems

@kares

This comment has been minimized.

Copy link
Member

commented Apr 29, 2015

expect this to be fixed on >= 1.7.20 ... an issue with the similar underlying cause was reported at #2881

@kares kares closed this Apr 29, 2015

@headius headius added this to the JRuby 1.7.20 milestone May 4, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.