DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17253>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=17253

MethodsUtils.invokeMethod() signature resolution is static for non-primitive types

           Summary: MethodsUtils.invokeMethod() signature resolution is
                    static for non-primitive types
           Product: Commons
           Version: Nightly Builds
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Bean Utilities
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Given:




public class A


{


  public void foo(OutputStream os)


  {


      System.out.println("foo called");


  }


}




public class Invoker


{


    public static void main(String args[])


    {


        OutputStream os = new PrintStream(System.out);  // Base class


        PrintStream ps = new PrintStream(System.out);     // Super class




        // This invocation resolves to method foo correctly


        MethodUtils.invokeMethod(new A(), "foo", os);




        // This invocation results in method not found. 


        // Would be nice if the method resolution process would


        // take into account class hierarchy and applicability


        // as a convenience so developer can be lazy :)


        MethodUtils.invokeMethod(new A(), "foo", ps);


    }


}

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to