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); }