Skip to content

Commit 267242e

Browse files
mosbatghost
andauthored
Removed the if-else and replaced with clearer data flow. (#1311)
Co-authored-by: ghost <[email protected]>
1 parent 2a37866 commit 267242e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/main/java/org/apache/commons/lang3/text/WordUtils.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,12 @@ public static String initials(final String str, final char... delimiters) {
272272
final char ch = str.charAt(i);
273273
if (isDelimiter(ch, delimiters)) {
274274
lastWasGap = true;
275-
continue;
275+
continue; // ignore ch
276276
}
277277
if (lastWasGap) {
278278
buf[count++] = ch;
279279
lastWasGap = false;
280280
}
281-
282-
// ignore ch
283281
}
284282
return new String(buf, 0, count);
285283
}

0 commit comments

Comments
 (0)