You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Am I doing something wrong here or should this be supported?
>> ["foo".to_java_bytes].to_java(Java::byte[])
TypeError: wrong argument type #<Class:0x32632915> (expected Array)
from org/jruby/java/addons/KernelJavaAddons.java:67:in `to_java'
from (irb):1:in `evaluate'
from org/jruby/RubyKernel.java:1119:in `eval'
from org/jruby/RubyKernel.java:1519:in `loop'
from org/jruby/RubyKernel.java:1282:in `catch'
from org/jruby/RubyKernel.java:1282:in `catch'
from /Users/me/.rvm/rubies/jruby-1.7.9/bin/irb:13:in `(root)'
In order to achieve this, I needed to do the following intend:
>> ["foo".to_java_bytes].to_java(Java::byte[].java_class)
TypeError: unable to convert to type: [B
from org/jruby/java/addons/KernelJavaAddons.java:64:in `to_java'
from (irb):5:in `evaluate'
from org/jruby/RubyKernel.java:1123:in `eval'
from org/jruby/RubyKernel.java:1519:in `loop'
from org/jruby/RubyKernel.java:1284:in `catch'
from org/jruby/RubyKernel.java:1284:in `catch'
from /Users/me/.rvm/rubies/jruby-1.7.8/bin/irb:13:in `(root)'
multi-dimensional arrays have been converting fine for a while but still cases such as a Ruby array with a nested Java array where not handled ... but this should now be working as well (since 1.7.20), thank you!
Am I doing something wrong here or should this be supported?
In order to achieve this, I needed to do the following intend:
The text was updated successfully, but these errors were encountered: