jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu...@apache.org
Subject cvs commit: jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql QueryTagSupport.java UpdateTagSupport.java
Date Thu, 25 Apr 2002 00:25:16 GMT
luehe       02/04/24 17:25:16

  Modified:    standard/src/org/apache/taglibs/standard/tag/common/sql
                        QueryTagSupport.java UpdateTagSupport.java
  Log:
  Fixed 8415: set:param/dateParam for null is not portable
  
  Revision  Changes    Path
  1.29      +3 -7      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql/QueryTagSupport.java
  
  Index: QueryTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql/QueryTagSupport.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- QueryTagSupport.java	24 Apr 2002 22:14:24 -0000	1.28
  +++ QueryTagSupport.java	25 Apr 2002 00:25:16 -0000	1.29
  @@ -314,16 +314,12 @@
       }
   
       private void setParameters(PreparedStatement ps, List parameters) 
  -        throws SQLException {
  +        throws SQLException
  +    {
   	if (parameters != null) {
   	    for (int i = 0; i < parameters.size(); i++) {
   		// The first parameter has index 1
  -                if (parameters.get(i) == null) {
  -                    ps.setNull(i + 1, java.sql.Types.NULL);
  -                }
  -                else {
  -		    ps.setObject(i + 1, parameters.get(i));
  -                }
  +		ps.setObject(i + 1, parameters.get(i));
   	    }
   	}
       }
  
  
  
  1.20      +3 -7      jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql/UpdateTagSupport.java
  
  Index: UpdateTagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/standard/src/org/apache/taglibs/standard/tag/common/sql/UpdateTagSupport.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- UpdateTagSupport.java	24 Apr 2002 22:14:24 -0000	1.19
  +++ UpdateTagSupport.java	25 Apr 2002 00:25:16 -0000	1.20
  @@ -276,16 +276,12 @@
       }
   
       private void setParameters(PreparedStatement ps, List parameters) 
  -        throws SQLException {
  +        throws SQLException
  +    {
   	if (parameters != null) {
   	    for (int i = 0; i < parameters.size(); i++) {
   		// The first parameter has index 1
  -                if (parameters.get(i) == null) {
  -                    ps.setNull(i + 1, java.sql.Types.NULL);
  -                }
  -                else {
  -                    ps.setObject(i + 1, parameters.get(i));
  -                }
  +		ps.setObject(i + 1, parameters.get(i));
   	    }
   	}
       }
  
  
  

--
To unsubscribe, e-mail:   <mailto:taglibs-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-dev-help@jakarta.apache.org>


Mime
View raw message