From d6513dd19530859770b1b377e58aa25b840887dc Mon Sep 17 00:00:00 2001 From: andreoss Date: Fri, 16 Oct 2020 17:33:51 +0300 Subject: [PATCH] (#1462) Use `text.Mapped` --- src/main/java/org/cactoos/text/Trimmed.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/cactoos/text/Trimmed.java b/src/main/java/org/cactoos/text/Trimmed.java index 3ea4ec0c7b..85ea26a156 100644 --- a/src/main/java/org/cactoos/text/Trimmed.java +++ b/src/main/java/org/cactoos/text/Trimmed.java @@ -28,7 +28,8 @@ /** * Text without control characters (char <= 32) from both ends. * - *

There is no thread-safety guarantee. + *

+ * There is no thread-safety guarantee. * * @since 0.1 */ @@ -39,6 +40,6 @@ public final class Trimmed extends TextEnvelope { * @param text The text */ public Trimmed(final Text text) { - super(new TextOf(() -> text.asString().trim())); + super(new Mapped(str -> str.trim(), text)); } }