ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ven...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/encoding/ser DateDeserializer.java
Date Mon, 13 Jun 2005 13:42:22 GMT
venkat      2005/06/13 06:42:22

  Modified:    java/src/org/apache/axis/encoding/ser DateDeserializer.java
  Log:
  checking in a slightly modified patch for AXIS-1456 - support javax.sql.Date deserialization.
  
  Revision  Changes    Path
  1.15      +9 -6      ws-axis/java/src/org/apache/axis/encoding/ser/DateDeserializer.java
  
  Index: DateDeserializer.java
  ===================================================================
  RCS file: /home/cvs/ws-axis/java/src/org/apache/axis/encoding/ser/DateDeserializer.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DateDeserializer.java	7 Feb 2005 14:48:11 -0000	1.14
  +++ DateDeserializer.java	13 Jun 2005 13:42:22 -0000	1.15
  @@ -87,14 +87,17 @@
               if (bc) {
                   calendar.setTime((Date)result);
                   calendar.set(Calendar.ERA, GregorianCalendar.BC);
  -                if(javaType == Date.class) {
  -                    result = calendar.getTime();
  -                } else {
  -                    result = calendar;
  -                }
  +                result = calendar.getTime();
  +            }
  +            if (javaType == java.util.Date.class) {
  +                return result;
  +            } else if (javaType == java.sql.Date.class) {
  +               	result = new java.sql.Date(((Date)result).getTime());
  +            } else {
  +                calendar.setTime((Date)result);
  +                result = calendar;
               }
           }
  -
           return result;
       }
   }
  \ No newline at end of file
  
  
  

Mime
View raw message