axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-axis/java/src/org/apache/axis/providers/java RPCProvider.java
Date Thu, 17 Jan 2002 16:14:10 GMT
dug         02/01/17 08:14:10

  Modified:    java/src/org/apache/axis/providers/java RPCProvider.java
  Log:
  Fix some NPEs when args is empty
  
  Revision  Changes    Path
  1.33      +4 -2      xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java
  
  Index: RPCProvider.java
  ===================================================================
  RCS file: /home/cvs/xml-axis/java/src/org/apache/axis/providers/java/RPCProvider.java,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- RPCProvider.java	12 Jan 2002 16:31:37 -0000	1.32
  +++ RPCProvider.java	17 Jan 2002 16:14:10 -0000	1.33
  @@ -229,7 +229,8 @@
                   
                   {
                       // Hm - maybe we can help this with a conversion or two...
  -                    for (int i = 0; i < params.length; i++) {
  +                    for (int i = 0; argValues != null && i < argValues.length
&&
  +                                    i < params.length; i++) {
                           Object thisArg = argValues[i];
                           if (!params[i].isAssignableFrom(thisArg.getClass())) {
                               // Attempt conversion for each non-assignable argument
  @@ -249,7 +250,8 @@
                           msg.append( "method name \"" + method.getName() + "\"");
                           msg.append(" tried argument types: "); 
                           String sep= "";
  -                        for(int i=0; i< argValues.length; ++i){
  +                        for(int i=0; argValues != null &&
  +                                     i< argValues.length; ++i){
                               msg.append( sep);
                               sep=", ";
                               msg.append( argValues[i] == null ? "null" : argValues[i].getClass().getName());
  
  
  

Mime
View raw message