diff --git a/src/java/org/apache/commons/lang/BooleanUtils.java b/src/java/org/apache/commons/lang/BooleanUtils.java index 702834724..e92fea4b7 100644 --- a/src/java/org/apache/commons/lang/BooleanUtils.java +++ b/src/java/org/apache/commons/lang/BooleanUtils.java @@ -896,10 +896,10 @@ public class BooleanUtils { // Loops through array, comparing each item int trueCount = 0; - for (int i = 0; i < array.length; i++) { + for (boolean element : array) { // If item is true, and trueCount is < 1, increments count // Else, xor fails - if (array[i]) { + if (element) { if (trueCount < 1) { trueCount++; } else {