bayard      2003/08/15 09:14:35

  Modified:    lang/src/test/org/apache/commons/lang/time
                        DateUtilsTest.java
               lang/src/java/org/apache/commons/lang/time DateUtils.java
  Log:
  Commented out the parseCVS code for consideration/fixing for Lang 2.1
  
  Revision  Changes    Path
  1.9       +9 -8      
jakarta-commons/lang/src/test/org/apache/commons/lang/time/DateUtilsTest.java
  
  Index: DateUtilsTest.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/time/DateUtilsTest.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DateUtilsTest.java        10 Aug 2003 13:30:33 -0000      1.8
  +++ DateUtilsTest.java        15 Aug 2003 16:14:35 -0000      1.9
  @@ -363,10 +363,10 @@
           } catch (ClassCastException ex) {}
       }
   
  -    /**
  +    // TODO: Decide whether this code is removed or goes into 2.1
  +    /*
        * Tests the parse method, which is supposed to handle various strings
        * as flexibly as CVS supports.
  -     */
       public void testParseCVS() throws Exception {
           try {
               DateUtils.parseCVS(null);
  @@ -414,12 +414,12 @@
           assertEquals("parseCVS format MMM d, yyyy h:mm a",
                     now, DateUtils.parseCVS(new SimpleDateFormat("MMM d, yyyy h:mm 
a").format(now.getTime())), 50);
           // h:mm z
  -        /*
  -         * This format is difficult to test using the current time because the
  -         * parseCVS method applies the default date of January 1, 1970 to the
  -         * parsed time. The most straightforward way to test the parse is to
  -         * pass in a known value, and test the output against this know value.
  -         */
  +        //
  +        // This format is difficult to test using the current time because the
  +        // parseCVS method applies the default date of January 1, 1970 to the
  +        // parsed time. The most straightforward way to test the parse is to
  +        // pass in a known value, and test the output against this know value.
  +        // 
           now = Calendar.getInstance();
           now.setTime(new SimpleDateFormat("h:mm z").parse("16:30 GMT"));
           assertEquals("parseCVS format h:mm z 16:30 GMT", 
  @@ -567,6 +567,7 @@
           assertEquals("parseCVS last January",
                   now, DateUtils.parseCVS("last January"), 50);
       }
  +     */
   
       /**
        * Tests the iterator exceptions
  
  
  
  1.12      +4 -3      
jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateUtils.java
  
  Index: DateUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/time/DateUtils.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- DateUtils.java    10 Aug 2003 13:32:16 -0000      1.11
  +++ DateUtils.java    15 Aug 2003 16:14:35 -0000      1.12
  @@ -409,14 +409,14 @@
   
       }
   
  +    // TODO: Decide whether this code is removed or goes into 2.1
       //-----------------------------------------------------------------------
  -    /**
  +    /*
        * <p>Parses a date string formatted in CVS format.</p>
        * 
        * @param dateStr  the date to parse
        * @return the parsed date
        * @throws IllegalArgumentException if the date cannot be parsed
  -     */
       public static Calendar parseCVS(String dateStr) {
           if (dateStr == null) {
               throw new IllegalArgumentException("The date must not be null");
  @@ -527,6 +527,7 @@
   
           throw new IllegalArgumentException("Unable to parse '" + dateStr + "'.");
       }
  +     */
   
       //-----------------------------------------------------------------------
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to