[jruby-user] warning: ambiguous Java methods found (JRuby 1.7)

100 views
Skip to first unread message

Andy Joel

unread,
Nov 14, 2012, 5:59:04 AM11/14/12
to us...@jruby.codehaus.org
Just downloaded JRuby 1.7.0, and running unit tests on a Rails 3 project
I am see this warning, which I was not seeing with 1.6.7:

warning: ambiguous Java methods found

Okay, I get why it is happening, JRuby cannot be sure I am wanting
java.awt.Color.new(float, float, float) or java.awt.Color.new(double,
double, double), but then, who cares, they both do the same thing. Is
there a way to either turn off the warnings, or to explicitly tell JRuby
which one to use?

--
Posted via http://www.ruby-forum.com/.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


Keith Bennett

unread,
Nov 14, 2012, 10:03:21 AM11/14/12
to us...@jruby.codehaus.org
Check out java_send and java_alias in
https://github.com/jruby/jruby/wiki/CallingJavaFromJRuby.

- Keith

Keith R. Bennett
http://about.me/keithrbennett

On 11/14/2012 5:59 AM, Andy Joel wrote:
> Just downloaded JRuby 1.7.0, and running unit tests on a Rails 3 project
> I am see this warning, which I was not seeing with 1.6.7:
>
> warning: ambiguous Java methods found
>
> Okay, I get why it is happening, JRuby cannot be sure I am wanting
> java.awt.Color.new(float, float, float) or java.awt.Color.new(double,
> double, double), but then, who cares, they both do the same thing. Is
> there a way to either turn off the warnings, or to explicitly tell JRuby
> which one to use?
>


Reply all
Reply to author
Forward
0 new messages