mirror of
https://github.com/apache/commons-lang.git
synced 2025-02-09 11:34:55 +00:00
Fix Eclipse case drop-thru warnings
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@829391 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c341321e0c
commit
835085d912
@ -293,7 +293,7 @@ public static Date parseDate(String str, String[] parsePatterns) throws ParseExc
|
|||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
parser = new SimpleDateFormat(parsePatterns[0]);
|
parser = new SimpleDateFormat(parsePatterns[0]);
|
||||||
} else {
|
} else {
|
||||||
parser.applyPattern(parsePatterns[i]);
|
parser.applyPattern(parsePatterns[i]); // cannot be null if i != 0
|
||||||
}
|
}
|
||||||
pos.setIndex(0);
|
pos.setIndex(0);
|
||||||
Date date = parser.parse(str, pos);
|
Date date = parser.parse(str, pos);
|
||||||
@ -1621,10 +1621,13 @@ private static long getFragment(Calendar calendar, int fragment, int unit) {
|
|||||||
case Calendar.DAY_OF_YEAR:
|
case Calendar.DAY_OF_YEAR:
|
||||||
case Calendar.DATE:
|
case Calendar.DATE:
|
||||||
result += (calendar.get(Calendar.HOUR_OF_DAY) * MILLIS_PER_HOUR) / millisPerUnit;
|
result += (calendar.get(Calendar.HOUR_OF_DAY) * MILLIS_PER_HOUR) / millisPerUnit;
|
||||||
|
//$FALL-THROUGH$
|
||||||
case Calendar.HOUR_OF_DAY:
|
case Calendar.HOUR_OF_DAY:
|
||||||
result += (calendar.get(Calendar.MINUTE) * MILLIS_PER_MINUTE) / millisPerUnit;
|
result += (calendar.get(Calendar.MINUTE) * MILLIS_PER_MINUTE) / millisPerUnit;
|
||||||
|
//$FALL-THROUGH$
|
||||||
case Calendar.MINUTE:
|
case Calendar.MINUTE:
|
||||||
result += (calendar.get(Calendar.SECOND) * MILLIS_PER_SECOND) / millisPerUnit;
|
result += (calendar.get(Calendar.SECOND) * MILLIS_PER_SECOND) / millisPerUnit;
|
||||||
|
//$FALL-THROUGH$
|
||||||
case Calendar.SECOND:
|
case Calendar.SECOND:
|
||||||
result += (calendar.get(Calendar.MILLISECOND) * 1) / millisPerUnit;
|
result += (calendar.get(Calendar.MILLISECOND) * 1) / millisPerUnit;
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user