Skip to content

Commit

Permalink
Fix issue #2: get rid of java.lang.String.stripLeading
Browse files Browse the repository at this point in the history
Signed-off-by: Eric Villard <dev@eviweb.fr>
  • Loading branch information
eviweb committed Oct 3, 2020
1 parent ffeaf94 commit 8d00fee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased][unreleased]

### Fixed

- Fix issue #2: get rid of `java.lang.String.stripLeading` to get backward compatibility with JDK 1.8

## 0.2.2 - 2020-09-29

### Fixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ public String convert(String text) {
String result = StringUtils.capitalizePattern(text, "[\\s_-]+[a-zA-Z]");
result = StringUtils.capitalizeFirstChar(result);
result = StringUtils.prefixPatternWith(result, "[A-Z]", " ");
result = StringUtils.replaceDuplicatesWithUnique(result, "[\\s_-]+", " ").stripLeading();
result = StringUtils.replaceDuplicatesWithUnique(result, "[\\s_-]+", " ");
result = StringUtils.stripLeadingPatternFrom(result, " ");

return result;
}
Expand Down

0 comments on commit 8d00fee

Please sign in to comment.