Skip to content

Commit 1c93abf

Browse files
authored
Fix typo in StringUtils.trunctate() IllegalArgumentException message (#1463)
* Optimize ObjectToStringComparator.compare() method * Fix inverted logic in isEnum() method and correct its usage in getFirstEnum() * Fix typo. rename maxWith to maxWidth * Fix test case: assign transientField to correct object in testTransientFieldDifference * Revert "Fix test case: assign transientField to correct object in testTransientFieldDifference" This reverts commit ad4add3.
1 parent 9eb728f commit 1c93abf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/apache/commons/lang3/StringUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8866,7 +8866,7 @@ public static String truncate(final String str, final int offset, final int maxW
88668866
throw new IllegalArgumentException("offset cannot be negative");
88678867
}
88688868
if (maxWidth < 0) {
8869-
throw new IllegalArgumentException("maxWith cannot be negative");
8869+
throw new IllegalArgumentException("maxWidth cannot be negative");
88708870
}
88718871
if (str == null) {
88728872
return null;

0 commit comments

Comments
 (0)