This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-compress.git
The following commit(s) were added to refs/heads/master by this push: new 48db1fc Javadoc. 48db1fc is described below commit 48db1fc8ee73b8344fb1cdaf1def1148116362f6 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Feb 10 14:37:52 2022 -0500 Javadoc. --- .../java/org/apache/commons/compress/utils/ExactMath.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/org/apache/commons/compress/utils/ExactMath.java b/src/main/java/org/apache/commons/compress/utils/ExactMath.java index a01d835..eab9c71 100644 --- a/src/main/java/org/apache/commons/compress/utils/ExactMath.java +++ b/src/main/java/org/apache/commons/compress/utils/ExactMath.java @@ -31,12 +31,13 @@ public class ExactMath { } /** - * Adds two values and throws an exception on overflow. + * Returns the int result of adding an int and a long, and throws an exception if the result overflows an int. * - * @param x the first value. - * @param y the second value. - * @return addition of both values. - * @throws ArithmeticException when there is an overflow. + * @param x the first value, an int. + * @param y the second value, a long, + * @return the addition of both values. + * @throws ArithmeticException when y overflow an int. + * @throws ArithmeticException if the result overflows an int. */ public static int add(final int x, final long y) { return Math.addExact(x, Math.toIntExact(y));