commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r829391 - /commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java
Date Sat, 24 Oct 2009 15:48:11 GMT
Author: sebb
Date: Sat Oct 24 15:48:10 2009
New Revision: 829391

URL: http://svn.apache.org/viewvc?rev=829391&view=rev
Log:
Fix Eclipse case drop-thru warnings

Modified:
    commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java

Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java?rev=829391&r1=829390&r2=829391&view=diff
==============================================================================
--- commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java (original)
+++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/time/DateUtils.java Sat Oct
24 15:48:10 2009
@@ -293,7 +293,7 @@
             if (i == 0) {
                 parser = new SimpleDateFormat(parsePatterns[0]);
             } else {
-                parser.applyPattern(parsePatterns[i]);
+                parser.applyPattern(parsePatterns[i]); // cannot be null if i != 0
             }
             pos.setIndex(0);
             Date date = parser.parse(str, pos);
@@ -1621,10 +1621,13 @@
             case Calendar.DAY_OF_YEAR:
             case Calendar.DATE:
                 result += (calendar.get(Calendar.HOUR_OF_DAY) * MILLIS_PER_HOUR) / millisPerUnit;
+                //$FALL-THROUGH$
             case Calendar.HOUR_OF_DAY:
                 result += (calendar.get(Calendar.MINUTE) * MILLIS_PER_MINUTE) / millisPerUnit;
+                //$FALL-THROUGH$
             case Calendar.MINUTE:
                 result += (calendar.get(Calendar.SECOND) * MILLIS_PER_SECOND) / millisPerUnit;
+                //$FALL-THROUGH$
             case Calendar.SECOND:
                 result += (calendar.get(Calendar.MILLISECOND) * 1) / millisPerUnit;
                 break;



Mime
View raw message