Skip to content

Commit

Permalink
Use final
Browse files Browse the repository at this point in the history
  • Loading branch information
garydgregory committed Dec 9, 2024
1 parent 39dd581 commit 08988a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/apache/commons/lang3/Validate.java
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ public static <T extends Iterable<?>> T noNullElements(final T iterable) {
*/
public static <T extends Iterable<?>> T noNullElements(final T iterable, final String message, final Object... values) {
Objects.requireNonNull(iterable, "iterable");
AtomicInteger ai = new AtomicInteger();
final AtomicInteger ai = new AtomicInteger();
iterable.forEach(e -> {
if (e == null) {
throw new IllegalArgumentException(getMessage(message, ArrayUtils.addAll(values, ai.getAndIncrement())));
Expand Down

0 comments on commit 08988a2

Please sign in to comment.