|
1 | 1 | /*
|
2 |
| - * Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 1994, 2019, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
4 | 4 | *
|
5 | 5 | * This code is free software; you can redistribute it and/or modify it
|
|
92 | 92 | * The best practice is to choose the primitive type and algorithm to avoid
|
93 | 93 | * overflow. In cases where the size is {@code int} or {@code long} and
|
94 | 94 | * overflow errors need to be detected, the methods {@code addExact},
|
95 |
| - * {@code subtractExact}, {@code multiplyExact}, and {@code toIntExact} |
| 95 | + * {@code subtractExact}, {@code multiplyExact}, {@code toIntExact}, |
| 96 | + * {@code incrementExact}, {@code decrementExact} and {@code negateExact} |
96 | 97 | * throw an {@code ArithmeticException} when the results overflow.
|
97 |
| - * For other arithmetic operations such as divide, absolute value, |
98 |
| - * increment by one, decrement by one, and negation, overflow occurs only with |
99 |
| - * a specific minimum or maximum value and should be checked against |
100 |
| - * the minimum or maximum as appropriate. |
| 98 | + * For the arithmetic operations divide and absolute value, overflow |
| 99 | + * occurs only with a specific minimum or maximum value and |
| 100 | + * should be checked against the minimum or maximum as appropriate. |
101 | 101 | *
|
102 | 102 | * @author unascribed
|
103 | 103 | * @author Joseph D. Darcy
|
@@ -1058,7 +1058,7 @@ public static long negateExact(long a) {
|
1058 | 1058 | }
|
1059 | 1059 |
|
1060 | 1060 | /**
|
1061 |
| - * Returns the value of the {@code long} argument; |
| 1061 | + * Returns the value of the {@code long} argument, |
1062 | 1062 | * throwing an exception if the value overflows an {@code int}.
|
1063 | 1063 | *
|
1064 | 1064 | * @param value the long value
|
|
0 commit comments