cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: xml-cocoon2/src/org/apache/cocoon/transformation SQLTransformer.java
Date Mon, 20 Aug 2001 17:18:38 GMT
dims        01/08/20 10:18:38

  Modified:    src/org/apache/cocoon/transformation SQLTransformer.java
  Log:
  Patch from tom.klaasen@the-ecorp.com for "SQLTransformer: the last one?"
  
  Revision  Changes    Path
  1.17      +11 -5     xml-cocoon2/src/org/apache/cocoon/transformation/SQLTransformer.java
  
  Index: SQLTransformer.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/org/apache/cocoon/transformation/SQLTransformer.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- SQLTransformer.java	2001/08/20 13:55:17	1.16
  +++ SQLTransformer.java	2001/08/20 17:18:38	1.17
  @@ -51,7 +51,7 @@
    * @author <a href="mailto:giacomo.pati@pwr.ch">Giacomo Pati</a>
    *         (PWR Organisation & Entwicklung)
    * @author <a href="mailto:sven.beauprez@the-ecorp.com">Sven Beauprez</a>
  - * @version CVS $Revision: 1.16 $ $Date: 2001/08/20 13:55:17 $ $Author: dims $
  + * @version CVS $Revision: 1.17 $ $Date: 2001/08/20 17:18:38 $ $Author: dims $
    */
   
   public class SQLTransformer extends AbstractTransformer implements Composable, Recyclable,
Disposable, Configurable {
  @@ -931,9 +931,14 @@
             // happened (see JDBC docs - return codes for executeUpdate)
             if (rv != -1)
               return true;
  -          if (rs == null || !rs.next()) {
  -            close();
  -            return false;
  +          try {
  +              if (rs == null || !rs.next()) {
  +                //close();
  +                return false;
  +              }
  +          } catch (NullPointerException e) {
  +              getTheLogger().debug("NullPointerException, returning false.", e);
  +              return false;
             }
             return true;
           }
  @@ -1016,6 +1021,7 @@
                               }
                           }finally{
                               rs.close();
  +                            rs = null;
                           }
                           transformer.end((String)outParametersNames.get(counter));
                       }
  @@ -1025,7 +1031,7 @@
                     }
                 }
             } finally  {
  -                close();
  +                //close();
             }
           }
       }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message