You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by bu...@apache.org on 2003/02/20 19:16:55 UTC

DO NOT REPLY [Bug 17253] New: - MethodsUtils.invokeMethod() signature resolution is static for non-primitive types

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: commons-dev@jakarta.apache.org
        ReportedBy: analogue@yahoo.com


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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org