You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-dev@xml.apache.org by dl...@apache.org on 2002/08/07 04:41:25 UTC

cvs commit: xml-rpc/src/java/org/apache/xmlrpc XmlRpcServer.java

dlr         2002/08/06 19:41:25

  Modified:    src/java/org/apache/xmlrpc XmlRpcServer.java
  Log:
  Invoker.execute(): Added check for unsupported void return type on
  handler methods.  The need for better error reporting for this snafu
  was pointed out on the user list by Dejan Bosanace
  <de...@datagate.co.uk>.
  
  Revision  Changes    Path
  1.25      +7 -1      xml-rpc/src/java/org/apache/xmlrpc/XmlRpcServer.java
  
  Index: XmlRpcServer.java
  ===================================================================
  RCS file: /home/cvs/xml-rpc/src/java/org/apache/xmlrpc/XmlRpcServer.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -u -r1.24 -r1.25
  --- XmlRpcServer.java	20 Mar 2002 15:11:03 -0000	1.24
  +++ XmlRpcServer.java	7 Aug 2002 02:41:25 -0000	1.25
  @@ -547,6 +547,12 @@
               // It is some other exception
               throw new Exception(t.toString());
           }
  +        if (returnValue == null && method.getReturnType() == Void.TYPE)
  +        {
  +            // Not supported by the spec.
  +            throw new IllegalArgumentException
  +                ("void return types for handler methods not supported");
  +        }
           return returnValue;
       }
   }