axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: ws-axis/java/src/org/apache/axis/encoding/ser DateDeserializer.java
Date Fri, 04 Feb 2005 18:10:19 GMT
dims        2005/02/04 10:10:19

  Modified:    java/src/org/apache/axis/encoding/ser DateDeserializer.java
  Log:
  Check the java class type and return accordingly (patch from jonas team)
  
  Revision  Changes    Path
  1.13      +11 -7     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.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- DateDeserializer.java	16 Jun 2004 19:41:20 -0000	1.12
  +++ DateDeserializer.java	4 Feb 2005 18:10:19 -0000	1.13
  @@ -84,17 +84,21 @@
               }
               
               // support dates before the Christian era
  +            calendar.setTime((Date)result);
               if (bc) {
  -                calendar.setTime((Date)result);
                   calendar.set(Calendar.ERA, GregorianCalendar.BC);
  -                if(javaType == Date.class) {
  -                    result = calendar.getTime();
  -                } else {
  -                    result = calendar;
  -                }
  +            }
  +
  +            // Extract this from if (bc)
  +            // seems logical that we return a Date or Calendar apart from
  +            // the fact that the value is before christ or not
  +            if(javaType == Date.class) {
  +                result = calendar.getTime();
  +            } else {
  +                result = calendar;
               }
           }
   
           return result;
       }
  -}
  +}
  \ No newline at end of file
  
  
  

Mime
View raw message