From 07b1a637dedf3e19f798cfb3768acb23ae7a35d8 Mon Sep 17 00:00:00 2001 From: Christian Wulf <chw@informatik.uni-kiel.de> Date: Wed, 24 Jun 2015 06:34:49 +0200 Subject: [PATCH] fixed syntax errors --- .../java/teetime/framework/AbstractStage.java | 40 ++++++------------- .../teetime/framework/DynamicInputPort.java | 2 +- .../teetime/framework/DynamicOutputPort.java | 2 +- .../dynamic/ControlledDistributorTest.java | 4 +- .../merger/dynamic/ControlledMergerTest.java | 4 +- 5 files changed, 19 insertions(+), 33 deletions(-) diff --git a/src/main/java/teetime/framework/AbstractStage.java b/src/main/java/teetime/framework/AbstractStage.java index 149c6807..af9bfb01 100644 --- a/src/main/java/teetime/framework/AbstractStage.java +++ b/src/main/java/teetime/framework/AbstractStage.java @@ -138,14 +138,11 @@ public abstract class AbstractStage extends Stage { * @param <T> * the type of elements to be received * - * @return Newly added InputPort + * @return the newly added InputPort * */ - // * @deprecated Since 1.1. Use {@link #createInputPort(Class)} instead. - @SuppressWarnings("unchecked") - // @Deprecated protected <T> InputPort<T> createInputPort() { - return (InputPort<T>) createInputPort(null, null); + return createInputPort(null, null); } /** @@ -157,7 +154,7 @@ public abstract class AbstractStage extends Stage { * @param <T> * the type of elements to be received * - * @return Newly added InputPort + * @return the newly added InputPort */ protected <T> InputPort<T> createInputPort(final Class<T> type) { return createInputPort(type, null); @@ -171,14 +168,11 @@ public abstract class AbstractStage extends Stage { * @param <T> * the type of elements to be received * - * @return Newly added InputPort + * @return the newly added InputPort * */ - // * @deprecated Since 1.1. Use {@link #createInputPort(Class)} instead. - @SuppressWarnings("unchecked") - // @Deprecated protected <T> InputPort<T> createInputPort(final String name) { - return (InputPort<T>) createInputPort(null, name); + return createInputPort(null, name); } /** @@ -191,7 +185,7 @@ public abstract class AbstractStage extends Stage { * @param <T> * the type of elements to be received * - * @return Newly added InputPort + * @return the newly added InputPort */ protected <T> InputPort<T> createInputPort(final Class<T> type, final String name) { final InputPort<T> inputPort = new InputPort<T>(type, this, name); @@ -205,14 +199,11 @@ public abstract class AbstractStage extends Stage { * @param <T> * the type of elements to be sent * - * @return Newly added OutputPort + * @return the newly added OutputPort * */ - // * @deprecated Since 1.1. Use {@link #createOutputPort(Class)} instead. - @SuppressWarnings("unchecked") - // @Deprecated protected <T> OutputPort<T> createOutputPort() { - return (OutputPort<T>) createOutputPort(null, null); + return createOutputPort(null, null); } /** @@ -224,12 +215,10 @@ public abstract class AbstractStage extends Stage { * @param <T> * the type of elements to be sent * - * @return Newly added OutputPort + * @return the newly added OutputPort */ protected <T> OutputPort<T> createOutputPort(final Class<T> type) { - final OutputPort<T> outputPort = new OutputPort<T>(type, this, null); - outputPorts = addElementToArray(outputPort, outputPorts); - return outputPort; + return createOutputPort(type, null); } /** @@ -241,14 +230,11 @@ public abstract class AbstractStage extends Stage { * @param <T> * the type of elements to be sent * - * @return Newly added OutputPort + * @return the newly added OutputPort * */ - // * @deprecated Since 1.1. Use {@link #createOutputPort(Class)} instead. - @SuppressWarnings("unchecked") - // @Deprecated protected <T> OutputPort<T> createOutputPort(final String name) { - return (OutputPort<T>) createOutputPort(null, name); + return createOutputPort(null, name); } /** @@ -262,7 +248,7 @@ public abstract class AbstractStage extends Stage { * @param <T> * the type of elements to be sent * - * @return Newly added OutputPort + * @return the newly added OutputPort */ protected <T> OutputPort<T> createOutputPort(final Class<T> type, final String name) { final OutputPort<T> outputPort = new OutputPort<T>(type, this, name); diff --git a/src/main/java/teetime/framework/DynamicInputPort.java b/src/main/java/teetime/framework/DynamicInputPort.java index d8119afc..15b16c1c 100644 --- a/src/main/java/teetime/framework/DynamicInputPort.java +++ b/src/main/java/teetime/framework/DynamicInputPort.java @@ -14,7 +14,7 @@ public final class DynamicInputPort<T> extends InputPort<T> { private int index; DynamicInputPort(final Class<T> type, final Stage owningStage, final int index) { - super(type, owningStage); + super(type, owningStage, null); this.index = index; } diff --git a/src/main/java/teetime/framework/DynamicOutputPort.java b/src/main/java/teetime/framework/DynamicOutputPort.java index bc2a4a45..2e3adc2a 100644 --- a/src/main/java/teetime/framework/DynamicOutputPort.java +++ b/src/main/java/teetime/framework/DynamicOutputPort.java @@ -14,7 +14,7 @@ public final class DynamicOutputPort<T> extends OutputPort<T> { private int index; DynamicOutputPort(final Class<T> type, final Stage owningStage, final int index) { - super(type, owningStage); + super(type, owningStage, null); this.index = index; } diff --git a/src/test/java/teetime/stage/basic/distributor/dynamic/ControlledDistributorTest.java b/src/test/java/teetime/stage/basic/distributor/dynamic/ControlledDistributorTest.java index cfc63a0f..28262b67 100644 --- a/src/test/java/teetime/stage/basic/distributor/dynamic/ControlledDistributorTest.java +++ b/src/test/java/teetime/stage/basic/distributor/dynamic/ControlledDistributorTest.java @@ -10,7 +10,7 @@ import java.util.List; import org.junit.Test; -import teetime.framework.ConfigurationContext; +import teetime.framework.Configuration; import teetime.framework.Execution; import teetime.framework.Stage; import teetime.framework.exceptionHandling.TerminatingExceptionListenerFactory; @@ -102,7 +102,7 @@ public class ControlledDistributorTest { assertThat(collectorSink.getElements(), is(values)); } - private static class ControlledDistributorTestConfig<T> extends ConfigurationContext { + private static class ControlledDistributorTestConfig<T> extends Configuration { private final CollectorSink<T> collectorSink; diff --git a/src/test/java/teetime/stage/basic/merger/dynamic/ControlledMergerTest.java b/src/test/java/teetime/stage/basic/merger/dynamic/ControlledMergerTest.java index 2cb73b4b..03cd01b4 100644 --- a/src/test/java/teetime/stage/basic/merger/dynamic/ControlledMergerTest.java +++ b/src/test/java/teetime/stage/basic/merger/dynamic/ControlledMergerTest.java @@ -9,7 +9,7 @@ import java.util.List; import org.junit.Test; -import teetime.framework.ConfigurationContext; +import teetime.framework.Configuration; import teetime.framework.DynamicActuator; import teetime.framework.Execution; import teetime.framework.exceptionHandling.TerminatingExceptionListenerFactory; @@ -99,7 +99,7 @@ public class ControlledMergerTest { return portAction; } - private static class ControlledMergerTestConfig<T> extends ConfigurationContext { + private static class ControlledMergerTestConfig<T> extends Configuration { private final CollectorSink<T> collectorSink; -- GitLab