commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bay...@apache.org
Subject svn commit: r1290976 - in /commons/proper/lang/trunk/src: main/java/org/apache/commons/lang3/time/ test/java/org/apache/commons/lang3/time/
Date Sun, 19 Feb 2012 09:26:06 GMT
Author: bayard
Date: Sun Feb 19 09:26:06 2012
New Revision: 1290976

URL: http://svn.apache.org/viewvc?rev=1290976&view=rev
Log:
Applying Felix Müller's patch from LANG-462 to fix a timezone assumption in a test and remove
Java 6 interface implementation @Override statements

Modified:
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
    commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
    commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java?rev=1290976&r1=1290975&r2=1290976&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateFormat.java
Sun Feb 19 09:26:06 2012
@@ -461,7 +461,6 @@ public class FastDateFormat extends Form
     /* (non-Javadoc)
      * @see DateParser#parse(java.lang.String)
      */
-    @Override
     public Date parse(String source) throws ParseException {
         return parser.parse(source);
     }
@@ -469,7 +468,6 @@ public class FastDateFormat extends Form
     /* (non-Javadoc)
      * @see DateParser#parse(java.lang.String, java.text.ParsePosition)
      */
-    @Override
     public Date parse(String source, ParsePosition pos) {
             return parser.parse(source, pos);
     }

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java?rev=1290976&r1=1290975&r2=1290976&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDateParser.java
Sun Feb 19 09:26:06 2012
@@ -144,7 +144,6 @@ public class FastDateParser implements D
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DateParser#getPattern()
      */
-    @Override
     public String getPattern() {
         return pattern;
     }
@@ -152,7 +151,6 @@ public class FastDateParser implements D
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DateParser#getTimeZone()
      */
-    @Override
     public TimeZone getTimeZone() {
         return timeZone;
     }
@@ -160,7 +158,6 @@ public class FastDateParser implements D
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DateParser#getLocale()
      */
-    @Override
     public Locale getLocale() {
         return locale;
     }
@@ -222,7 +219,6 @@ public class FastDateParser implements D
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DateParser#parseObject(java.lang.String)
      */
-    @Override
     public Object parseObject(String source) throws ParseException {
         return parse(source);
     }
@@ -230,7 +226,6 @@ public class FastDateParser implements D
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DateParser#parse(java.lang.String)
      */
-    @Override
     public Date parse(String source) throws ParseException {
         Date date= parse(source, new ParsePosition(0));
         if(date==null) {
@@ -242,7 +237,6 @@ public class FastDateParser implements D
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DateParser#parseObject(java.lang.String, java.text.ParsePosition)
      */
-    @Override
     public Object parseObject(String source, ParsePosition pos) {
         return parse(source, pos);
     }
@@ -250,7 +244,6 @@ public class FastDateParser implements D
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DateParser#parse(java.lang.String, java.text.ParsePosition)
      */
-    @Override
     public Date parse(String source, ParsePosition pos) {
         int offset= pos.getIndex();
         Matcher matcher= parsePattern.matcher(source.substring(offset));

Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java?rev=1290976&r1=1290975&r2=1290976&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
(original)
+++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java
Sun Feb 19 09:26:06 2012
@@ -375,7 +375,6 @@ public class FastDatePrinter implements 
      * @param pos  the position - ignored
      * @return the buffer passed in
      */
-    @Override
     public StringBuffer format(Object obj, StringBuffer toAppendTo, FieldPosition pos) {
         if (obj instanceof Date) {
             return format((Date) obj, toAppendTo);
@@ -392,7 +391,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#format(long)
      */
-    @Override
     public String format(long millis) {
         return format(new Date(millis));
     }
@@ -400,7 +398,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#format(java.util.Date)
      */
-    @Override
     public String format(Date date) {
         Calendar c = new GregorianCalendar(mTimeZone, mLocale);  // hard code GregorianCalendar
         c.setTime(date);
@@ -410,7 +407,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#format(java.util.Calendar)
      */
-    @Override
     public String format(Calendar calendar) {
         return format(calendar, new StringBuffer(mMaxLengthEstimate)).toString();
     }
@@ -418,7 +414,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#format(long, java.lang.StringBuffer)
      */
-    @Override
     public StringBuffer format(long millis, StringBuffer buf) {
         return format(new Date(millis), buf);
     }
@@ -426,7 +421,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#format(java.util.Date, java.lang.StringBuffer)
      */
-    @Override
     public StringBuffer format(Date date, StringBuffer buf) {
         Calendar c = new GregorianCalendar(mTimeZone, mLocale);  // hard code GregorianCalendar
         c.setTime(date);
@@ -436,7 +430,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#format(java.util.Calendar, java.lang.StringBuffer)
      */
-    @Override
     public StringBuffer format(Calendar calendar, StringBuffer buf) {
         return applyRules(calendar, buf);
     }
@@ -461,7 +454,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#getPattern()
      */
-    @Override
     public String getPattern() {
         return mPattern;
     }
@@ -469,7 +461,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#getTimeZone()
      */
-    @Override
     public TimeZone getTimeZone() {
         return mTimeZone;
     }
@@ -477,7 +468,6 @@ public class FastDatePrinter implements 
     /* (non-Javadoc)
      * @see org.apache.commons.lang3.time.DatePrinter#getLocale()
      */
-    @Override
     public Locale getLocale() {
         return mLocale;
     }

Modified: commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java?rev=1290976&r1=1290975&r2=1290976&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
(original)
+++ commons/proper/lang/trunk/src/test/java/org/apache/commons/lang3/time/FastDateParserTest.java
Sun Feb 19 09:26:06 2012
@@ -140,7 +140,7 @@ public class FastDateParserTest {
         Date parse = fdf.parse("2003 BC February 0010 PM Saturday 0015 0033 0020 0989 GMT-05:00");
                 assertEquals(cal.getTime(), parse);
                 
-        fdf = getInstance("y G M d a E H m s S Z");
+        fdf = getInstance("y G M d a E H m s S Z", NEW_YORK, Locale.US);
         assertEquals(cal.getTime(), fdf.parse("03 BC 2 10 PM Sat 15 33 20 989 -0500"));
         
         cal.set(Calendar.ERA, GregorianCalendar.AD);



Mime
View raw message