Skip to content

Commit

Permalink
(yegor256#1462) Use text.Mapped
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoss committed Oct 16, 2020
1 parent 57f058b commit 9e931a2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/org/cactoos/text/Upper.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
/**
* Text in upper case.
*
* <p>There is no thread-safety guarantee.
* <p>
* There is no thread-safety guarantee.
*
* @since 0.1
*/
Expand Down Expand Up @@ -57,6 +58,6 @@ public Upper(final Text text) {
* @param locale Locale
*/
public Upper(final Text text, final Locale locale) {
super(new TextOf(() -> text.asString().toUpperCase(locale)));
super(new Mapped(str -> str.toUpperCase(locale), text));
}
}

0 comments on commit 9e931a2

Please sign in to comment.