You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/11/27 13:37:37 UTC
(commons-imaging) 09/11: Format
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-imaging.git
commit 59fa5f06d88886cbb9a01a33417e3665b30fb763
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Nov 27 08:21:44 2023 -0500
Format
---
.../org/apache/commons/imaging/internal/SafeOperations.java | 11 +++--------
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/commons/imaging/internal/SafeOperations.java b/src/main/java/org/apache/commons/imaging/internal/SafeOperations.java
index 11edef20..24c309f6 100644
--- a/src/main/java/org/apache/commons/imaging/internal/SafeOperations.java
+++ b/src/main/java/org/apache/commons/imaging/internal/SafeOperations.java
@@ -19,16 +19,14 @@ package org.apache.commons.imaging.internal;
import java.util.Arrays;
/**
- * Provides safe arithmetic operations to avoid, for example,
- * numeric overflows.
+ * Provides safe arithmetic operations to avoid, for example, numeric overflows.
*
* @since 1.0-alpha4
*/
public final class SafeOperations {
/**
- * Applies {@link Math#addExact(int, int)} to a variable
- * length array of integers.
+ * Applies {@link Math#addExact(int, int)} to a variable length array of integers.
*
* @param values variable length array of integers.
* @return the values safely added.
@@ -37,10 +35,7 @@ public final class SafeOperations {
if (values == null || values.length < 2) {
throw new IllegalArgumentException("You must provide at least two elements to be added");
}
- return Arrays
- .stream(values)
- .reduce(0, Math::addExact)
- ;
+ return Arrays.stream(values).reduce(0, Math::addExact);
}
private SafeOperations() {