diff --git a/src/main/java/org/cactoos/func/TimedFunc.java b/src/main/java/org/cactoos/func/TimedFunc.java index b5eeee68aa..5f5cf6654f 100644 --- a/src/main/java/org/cactoos/func/TimedFunc.java +++ b/src/main/java/org/cactoos/func/TimedFunc.java @@ -28,17 +28,12 @@ import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import org.cactoos.Func; -import org.cactoos.Proc; /** * Function that gets interrupted after a certain time has passed. * @param Type of input * @param Type of output * @since 0.29.3 - * @todo #861:30min Avoid usage of null value in ctor(Proc, long) which is - * against design principles. - * Perhaps in creating TimedProc? - * Please take a look on #551 and #843 for more details. */ public final class TimedFunc implements Func { @@ -52,15 +47,6 @@ public final class TimedFunc implements Func { */ private final long time; - /** - * Ctor. - * @param proc Proc - * @param milliseconds Milliseconds - */ - public TimedFunc(final Proc proc, final long milliseconds) { - this(new FuncOf<>(proc, null), milliseconds); - } - /** * Ctor. * @param function Origin function diff --git a/src/test/java/org/cactoos/func/TimedFuncTest.java b/src/test/java/org/cactoos/func/TimedFuncTest.java index d2eb9828f6..1e3c90716c 100644 --- a/src/test/java/org/cactoos/func/TimedFuncTest.java +++ b/src/test/java/org/cactoos/func/TimedFuncTest.java @@ -52,19 +52,6 @@ public void functionGetsInterrupted() throws Exception { ).apply(true); } - @Test(expected = TimeoutException.class) - public void procGetsInterrupted() throws Exception { - final long period = 100L; - new TimedFunc( - input -> { - new And( - new Endless<>(() -> input) - ).value(); - }, - period - ).apply(true); - } - @Test @SuppressWarnings("PMD.AvoidCatchingGenericException") public void futureTaskIsCancelled() {