You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2010/01/28 19:45:49 UTC
svn commit: r904210 - in
/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang:
NumberUtils.java math/NumberUtils.java time/DateUtils.java
Author: sebb
Date: Thu Jan 28 18:45:48 2010
New Revision: 904210
URL: http://svn.apache.org/viewvc?rev=904210&view=rev
Log:
Use Eclipse-style comment to document switch fall-through
Modified:
commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/NumberUtils.java
commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/NumberUtils.java
commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DateUtils.java
Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/NumberUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/NumberUtils.java?rev=904210&r1=904209&r2=904210&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/NumberUtils.java (original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/NumberUtils.java Thu Jan 28 18:45:48 2010
@@ -218,7 +218,7 @@
} catch (NumberFormatException e) {
// ignore the bad number
}
- //Fall through
+ //$FALL-THROUGH$
case 'd' :
case 'D' :
try {
@@ -234,7 +234,7 @@
} catch (NumberFormatException e) {
// empty catch
}
- //Fall through
+ //$FALL-THROUGH$
default :
throw new NumberFormatException(val + " is not a valid number.");
Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/NumberUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/NumberUtils.java?rev=904210&r1=904209&r2=904210&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/NumberUtils.java (original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/math/NumberUtils.java Thu Jan 28 18:45:48 2010
@@ -474,7 +474,7 @@
} catch (NumberFormatException nfe) {
// ignore the bad number
}
- //Fall through
+ //$FALL-THROUGH$
case 'd' :
case 'D' :
try {
@@ -490,7 +490,7 @@
} catch (NumberFormatException e) {
// ignore the bad number
}
- //Fall through
+ //$FALL-THROUGH$
default :
throw new NumberFormatException(str + " is not a valid number.");
Modified: commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DateUtils.java
URL: http://svn.apache.org/viewvc/commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DateUtils.java?rev=904210&r1=904209&r2=904210&view=diff
==============================================================================
--- commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DateUtils.java (original)
+++ commons/proper/lang/branches/LANG_2_X/src/main/java/org/apache/commons/lang/time/DateUtils.java Thu Jan 28 18:45:48 2010
@@ -1518,15 +1518,20 @@
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;
- case Calendar.MILLISECOND: break;//never useful
- default: throw new IllegalArgumentException("The fragment " + fragment + " is not supported");
+ case Calendar.MILLISECOND:
+ break;//never useful
+ default:
+ throw new IllegalArgumentException("The fragment " + fragment + " is not supported");
}
return result;
}