Uploaded image for project: 'XML-RPC'
  1. XML-RPC
  2. XMLRPC-174

The ClientFactory always concatenates a "." before the method name.

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.1.3
    • Component/s: Source
    • Labels:
      None

      Description

      I want to invoke a remote method, who's name is without any prefix.
      In the "newInstance" methods:
      1. The first 2 signatures add the class name as a prefix:
      public interface X

      { public void foo(); }

      foo() invokes--> X.foo()
      2. The 3rd signature adds the string passed in pRemoteName as a prefix:
      invoking newInstance with pRemoteName="goo" invokes--> "goo.foo()"
      passing pRemoteName="" invokes --> ".foo()"

      suggested patch:

      In the class
      "ClientFactory.java"
      In method
      "public Object newInstance(ClassLoader pClassLoader, final Class pClass,
      final String pRemoteName)"

      add a check if the pRemoteName is empty, if this is the case then no need to
      concatenate "." before the method name.

      today - String methodName = pRemoteName + "." + pMethod.getName();

      a fix - String methodName = pMethod.getName();
      if(pRemoteName.length()>0)

      { methodName = pRemoteName + "." + methodName; }

        Attachments

        1. ClientFactory.java
          6 kB
          Livnat Peer

          Activity

            People

            • Assignee:
              jochen@apache.org Jochen Wiedmann
              Reporter:
              livnats Livnat Peer
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 0.5h
                0.5h
                Remaining:
                Remaining Estimate - 0.5h
                0.5h
                Logged:
                Time Spent - Not Specified
                Not Specified