From 30a14e9451e991f9a2aa0097260895279bcdbb3c Mon Sep 17 00:00:00 2001 From: Gary Gregory Date: Fri, 12 Aug 2022 18:40:11 -0400 Subject: [PATCH] In-line single use local variable --- .../org/apache/commons/lang3/builder/ToStringStyle.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java index 5d5e5512a..43fef697f 100644 --- a/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java +++ b/src/main/java/org/apache/commons/lang3/builder/ToStringStyle.java @@ -892,8 +892,7 @@ public abstract class ToStringStyle implements Serializable { protected void appendDetail(final StringBuffer buffer, final String fieldName, final Object[] array) { buffer.append(arrayStart); for (int i = 0; i < array.length; i++) { - final Object item = array[i]; - appendDetail(buffer, fieldName, i, item); + appendDetail(buffer, fieldName, i, array[i]); } buffer.append(arrayEnd); } @@ -932,8 +931,7 @@ public abstract class ToStringStyle implements Serializable { buffer.append(arrayStart); final int length = Array.getLength(array); for (int i = 0; i < length; i++) { - final Object item = Array.get(array, i); - appendDetail(buffer, fieldName, i, item); + appendDetail(buffer, fieldName, i, Array.get(array, i)); } buffer.append(arrayEnd); }