New "multiple Java method" warning can be spurious
--------------------------------------------------
Key: JRUBY-4726
URL: http://jira.codehaus.org/browse/JRUBY-4726
Project: JRuby
Issue Type: Bug
Affects Versions: JRuby 1.5
Environment: jruby 1.5.0.RC1 (ruby 1.8.7 patchlevel 249) (2010-04-14
0b08bc7) (Java HotSpot(TM) Server VM 1.6.0_19) [i386-java]
Reporter: David Kellum
Assignee: Thomas E Enebo
Looks like this warning was introduced in 1.5 as feature to help avoid
surprises in ambiguous java calls. However it can be triggered in cases where
the call is actually not ambiquous. Below is an example using:
http://java.sun.com/javase/6/docs/api/java/util/logging/Logger.html#getLogger(java.lang.String)
Note that there is only one single argument getLogger(String). I wouldn't thing
the two argument variation of getLogger( String, String) would qualify as
ambiguous:
{noformat}
# Nothing in 1.4
% jruby-1.4 -vw -e 'Java::java.util.logging.Logger.get_logger( "" )'
jruby 1.4.0 (ruby 1.8.7 patchlevel 174) (2009-11-02 69fbfa3) (Java HotSpot(TM)
Server VM 1.6.0_19) [i386-java]
# Warning in 1.5
% jruby-1.5 -vw -e 'Java::java.util.logging.Logger.get_logger( "" )'
jruby 1.5.0.RC1 (ruby 1.8.7 patchlevel 249) (2010-04-14 0b08bc7) (Java
HotSpot(TM) Server VM 1.6.0_19) [i386-java]
-e:1 warning: multiple Java methods found for argument types ([String]):
[public static synchronized java.util.logging.Logger
java.util.logging.Logger.getLogger(java.lang.String)]
# to_java doesn't help
% jruby-1.5 -vw -e 'Java::java.util.logging.Logger.get_logger( "".to_java )'
jruby 1.5.0.RC1 (ruby 1.8.7 patchlevel 249) (2010-04-14 0b08bc7) (Java
HotSpot(TM) Server VM 1.6.0_19) [i386-java]
-e:1 warning: multiple Java methods found for argument types
([Java::JavaLang::String]): [public static synchronized
java.util.logging.Logger java.util.logging.Logger.getLogger(java.lang.String)]
{noformat}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email