Navigation Menu

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

Is there a way to declare java_field with interface type? #2337

Closed
vladson opened this issue Dec 19, 2014 · 1 comment
Closed

Is there a way to declare java_field with interface type? #2337

vladson opened this issue Dec 19, 2014 · 1 comment

Comments

@vladson
Copy link

vladson commented Dec 19, 2014

Trying to do as following:

    class A
       java_field 'java.util.List clients'
    end

And getting TypeError: cannot convert instance of class org.jruby.RubyModule to class java.lang.Class
As far as I managed to understand, it is due to InterfaceJavaProxy.
In my example I managed to get rid of declaring interface type, but it may be needed anyway. Maybe I can help? Where should I start digging?

@rtyler
Copy link

rtyler commented Aug 7, 2015

This works in JRuby 9.0.0.0, at least with the code provided. If you still experience an issue with 9k, please re-open this ticket with some more details so we can help :)

[10] pry(main)> class A    
[10] pry(main)*   java_field 'java.util.List clients'       
[10] pry(main)* end      
=> nil
[11] pry(main)> JRUBY_VERSION
=> "9.0.0.0"
[12] pry(main)> 

@rtyler rtyler closed this as completed Aug 7, 2015
@enebo enebo added this to the Invalid or Duplicate milestone Aug 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants