From c952ae6e16c223281e2eb0b64ede918090918ad5 Mon Sep 17 00:00:00 2001 From: yegor256 Date: Thu, 15 Jun 2017 14:17:13 +0300 Subject: [PATCH] #146: ten times --- src/main/java/org/cactoos/io/StickyInput.java | 5 +---- src/test/java/org/cactoos/io/StickyInputTest.java | 4 ++-- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/cactoos/io/StickyInput.java b/src/main/java/org/cactoos/io/StickyInput.java index f8be244f3b..2e77f35910 100644 --- a/src/main/java/org/cactoos/io/StickyInput.java +++ b/src/main/java/org/cactoos/io/StickyInput.java @@ -57,10 +57,7 @@ public StickyInput(final Input input) { () -> { final ByteArrayOutputStream baos = new ByteArrayOutputStream(); new LengthOfInput( - new TeeInput( - input, - new OutputStreamAsOutput(baos) - ) + new TeeInput(input, new OutputStreamAsOutput(baos)) ).asValue(); return baos.toByteArray(); } diff --git a/src/test/java/org/cactoos/io/StickyInputTest.java b/src/test/java/org/cactoos/io/StickyInputTest.java index 9dc5df44ff..ddfb1cbe0f 100644 --- a/src/test/java/org/cactoos/io/StickyInputTest.java +++ b/src/test/java/org/cactoos/io/StickyInputTest.java @@ -50,9 +50,9 @@ public void readsFileContent() { new RepeatedFunc<>( input -> new InputAsBytes( new TeeInput(input, new DeadOutput()) - // @checkstyle MagicNumber (1 line) + // @checkstyle MagicNumber (2 lines) ).asBytes().length == 73471, - 2 + 10 ) ) );