From a169e866c14bd411da0f676bd3f0149fd160fec9 Mon Sep 17 00:00:00 2001 From: Benedikt Ritter Date: Sat, 27 Dec 2014 16:25:02 +0000 Subject: [PATCH] Use enhanced for loop instead of indexed based iteration git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1648064 13f79535-47bb-0310-9956-ffa450edef68 --- src/main/java/org/apache/commons/lang3/StringUtils.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/StringUtils.java b/src/main/java/org/apache/commons/lang3/StringUtils.java index d0ffebf84..d465e4d98 100644 --- a/src/main/java/org/apache/commons/lang3/StringUtils.java +++ b/src/main/java/org/apache/commons/lang3/StringUtils.java @@ -1687,8 +1687,8 @@ public class StringUtils { if (isEmpty(cs) || ArrayUtils.isEmpty(searchCharSequences)) { return false; } - for (int i = 0; i < searchCharSequences.length; i++) { - if (contains(cs, searchCharSequences[i])) { + for (CharSequence searchCharSequence : searchCharSequences) { + if (contains(cs, searchCharSequence)) { return true; } }