aboutsummaryrefslogtreecommitdiff
path: root/src/java.base/share/classes/java/lang/StrictMath.java
diff options
context:
space:
mode:
authorJoe Darcy <darcy@openjdk.org>2019-08-28 22:30:26 -0700
committerJoe Darcy <darcy@openjdk.org>2019-08-28 22:30:26 -0700
commit9b0cfaf53ec34b12efbebcb41004841a2af8b8a7 (patch)
treef4695e5b981aa47e51cf4d34e1b45e6c4ee34f89 /src/java.base/share/classes/java/lang/StrictMath.java
parentbc1c0aec0dab273c629fa9c71593c7ab8015f3ca (diff)
downloadopenjdk-9b0cfaf53ec34b12efbebcb41004841a2af8b8a7.tar.gz
openjdk-9b0cfaf53ec34b12efbebcb41004841a2af8b8a7.zip
8230074: Improve specification for {Math, StrictMath}.negateExact
Reviewed-by: bpb
Diffstat (limited to 'src/java.base/share/classes/java/lang/StrictMath.java')
-rw-r--r--src/java.base/share/classes/java/lang/StrictMath.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/java.base/share/classes/java/lang/StrictMath.java b/src/java.base/share/classes/java/lang/StrictMath.java
index 02d1e6021a3..4e8051488da 100644
--- a/src/java.base/share/classes/java/lang/StrictMath.java
+++ b/src/java.base/share/classes/java/lang/StrictMath.java
@@ -837,6 +837,7 @@ public final class StrictMath {
/**
* Returns the argument incremented by one,
* throwing an exception if the result overflows an {@code int}.
+ * The overflow only occurs for {@linkplain Integer#MAX_VALUE the maximum value}.
*
* @param a the value to increment
* @return the result
@@ -851,6 +852,7 @@ public final class StrictMath {
/**
* Returns the argument incremented by one,
* throwing an exception if the result overflows a {@code long}.
+ * The overflow only occurs for {@linkplain Long#MAX_VALUE the maximum value}.
*
* @param a the value to increment
* @return the result
@@ -865,6 +867,7 @@ public final class StrictMath {
/**
* Returns the argument decremented by one,
* throwing an exception if the result overflows an {@code int}.
+ * The overflow only occurs for {@linkplain Integer#MIN_VALUE the minimum value}.
*
* @param a the value to decrement
* @return the result
@@ -879,6 +882,7 @@ public final class StrictMath {
/**
* Returns the argument decremented by one,
* throwing an exception if the result overflows a {@code long}.
+ * The overflow only occurs for {@linkplain Long#MIN_VALUE the minimum value}.
*
* @param a the value to decrement
* @return the result
@@ -893,6 +897,7 @@ public final class StrictMath {
/**
* Returns the negation of the argument,
* throwing an exception if the result overflows an {@code int}.
+ * The overflow only occurs for {@linkplain Integer#MIN_VALUE the minimum value}.
*
* @param a the value to negate
* @return the result
@@ -907,6 +912,7 @@ public final class StrictMath {
/**
* Returns the negation of the argument,
* throwing an exception if the result overflows a {@code long}.
+ * The overflow only occurs for {@linkplain Long#MIN_VALUE the minimum value}.
*
* @param a the value to negate
* @return the result