Skip to content

Commit 3ba89c3

Browse files
Julia Boesdfuch
authored andcommitted
8229337: java.lang.Math class doc should be adjusted regarding -Exact methods
Reviewed-by: rriggs, bpb
1 parent ed45bde commit 3ba89c3

File tree

1 file changed

+7
-7
lines changed
  • src/java.base/share/classes/java/lang

1 file changed

+7
-7
lines changed

src/java.base/share/classes/java/lang/Math.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
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.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -92,12 +92,12 @@
9292
* The best practice is to choose the primitive type and algorithm to avoid
9393
* overflow. In cases where the size is {@code int} or {@code long} and
9494
* 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}
9697
* 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.
101101
*
102102
* @author unascribed
103103
* @author Joseph D. Darcy
@@ -1058,7 +1058,7 @@ public static long negateExact(long a) {
10581058
}
10591059

10601060
/**
1061-
* Returns the value of the {@code long} argument;
1061+
* Returns the value of the {@code long} argument,
10621062
* throwing an exception if the value overflows an {@code int}.
10631063
*
10641064
* @param value the long value

0 commit comments

Comments
 (0)