Skip to content

Commit

Permalink
fixed files form Time #15
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent a4106bd commit 0994fb2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions projects/Time/15/org/joda/time/field/FieldUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,9 @@ public static int safeMultiply(int val1, int val2) {
public static long safeMultiply(long val1, int val2) {
switch (val2) {
case -1:
if (val1 == Long.MIN_VALUE) {
throw new ArithmeticException("Multiplication overflows a long: " + val1 + " * " + val2);
}
return -val1;
case 0:
return 0L;
Expand Down

0 comments on commit 0994fb2

Please sign in to comment.