Skip to content

Commit

Permalink
Merge branch 'pr-181'
Browse files Browse the repository at this point in the history
This closes #181
  • Loading branch information
kinow committed Oct 29, 2020
2 parents b35cb56 + f3e834a commit ee61b91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions src/changes/changes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ The <action> type attribute can be add,update,fix,remove.
<action type="fix" dev="ggregory" due-to="Gary Gregory">Update commons.jacoco.version 0.8.5 to 0.8.6; fixes Java 15 build.</action>
<action type="fix" dev="ggregory" due-to="Gary Gregory">Update spotbugs.plugin.version 4.0.4 to 4.1.4; fixes Java 16 build #175.</action>
<!-- ADD -->
<action issue="TEXT-190" type="add" dev="kinow" due-to="Benjamin Bing">Document negative limit for WordUtils abbreviate method</action>
<action issue="TEXT-188" type="add" dev="kinow" due-to="Jakob Vesterstrøm">Speed up LevenshteinDistance with threshold by exiting early</action>
<action issue="TEXT-185" type="add" dev="ggregory" due-to="Larry West, Gary Gregory">Release Notes page hasn't been updated for 1.9 release yet.</action>
<!-- UPDATE -->
Expand Down
3 changes: 1 addition & 2 deletions src/main/java/org/apache/commons/text/WordUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ public static boolean isDelimiter(final int codePoint, final char[] delimiters)
*
* @param str the string to be abbreviated. If null is passed, null is returned.
* If the empty String is passed, the empty string is returned.
* @param lower the lower limit.
* @param lower the lower limit; negative value is treated as zero.
* @param upper the upper limit; specify -1 if no limit is desired.
* If the upper limit is lower than the lower limit, it will be
* adjusted to be the same as the lower limit.
Expand Down Expand Up @@ -859,7 +859,6 @@ public static boolean isDelimiter(final int codePoint, final char[] delimiters)
public static String abbreviate(final String str, int lower, int upper, final String appendToEnd) {
Validate.isTrue(upper >= -1, "upper value cannot be less than -1");
Validate.isTrue(upper >= lower || upper == -1, "upper value is less than lower value");

if (StringUtils.isEmpty(str)) {
return str;
}
Expand Down

0 comments on commit ee61b91

Please sign in to comment.