From f97a6040facb618cd9987716072d8c4a37b148ee Mon Sep 17 00:00:00 2001
From: Christian Wulf <chw@informatik.uni-kiel.de>
Date: Sun, 28 Dec 2014 08:39:56 +0100
Subject: [PATCH] added comments; added finals

---
 .../java/teetime/framework/AbstractInterThreadPipe.java     | 2 +-
 .../java/teetime/framework/AbstractIntraThreadPipe.java     | 3 +--
 src/main/java/teetime/framework/RunnableConsumerStage.java  | 6 ++++++
 .../experiment09pipeimpls/ChwHomePerformanceCheck.java      | 2 +-
 4 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/main/java/teetime/framework/AbstractInterThreadPipe.java b/src/main/java/teetime/framework/AbstractInterThreadPipe.java
index 5471576b..9821a41b 100644
--- a/src/main/java/teetime/framework/AbstractInterThreadPipe.java
+++ b/src/main/java/teetime/framework/AbstractInterThreadPipe.java
@@ -28,7 +28,7 @@ public abstract class AbstractInterThreadPipe extends AbstractPipe {
 		}
 	}
 
-	protected boolean isThreadWaiting(final Thread thread) {
+	protected final boolean isThreadWaiting(final Thread thread) {
 		return thread.getState() == State.WAITING || thread.getState() == State.TIMED_WAITING;
 	}
 
diff --git a/src/main/java/teetime/framework/AbstractIntraThreadPipe.java b/src/main/java/teetime/framework/AbstractIntraThreadPipe.java
index 416a0d6d..4577b135 100644
--- a/src/main/java/teetime/framework/AbstractIntraThreadPipe.java
+++ b/src/main/java/teetime/framework/AbstractIntraThreadPipe.java
@@ -10,9 +10,8 @@ public abstract class AbstractIntraThreadPipe extends AbstractPipe {
 
 	@Override
 	public final void sendSignal(final ISignal signal) {
-		// if (this.getTargetPort() != null) { // BETTER remove this check since there are DummyPorts
+		// getTargetPort is always non-null since the framework adds dummy ports if necessary
 		this.cachedTargetStage.onSignal(signal, this.getTargetPort());
-		// }
 	}
 
 	@Override
diff --git a/src/main/java/teetime/framework/RunnableConsumerStage.java b/src/main/java/teetime/framework/RunnableConsumerStage.java
index 655e0f82..a68b3102 100644
--- a/src/main/java/teetime/framework/RunnableConsumerStage.java
+++ b/src/main/java/teetime/framework/RunnableConsumerStage.java
@@ -11,6 +11,12 @@ final class RunnableConsumerStage extends RunnableStage {
 
 	private final IdleStrategy idleStrategy;
 
+	/**
+	 * Creates a new instance with the {@link YieldStrategy} as default idle strategy.
+	 * 
+	 * @param stage
+	 *            to execute within an own thread
+	 */
 	public RunnableConsumerStage(final Stage stage) {
 		this(stage, new YieldStrategy());
 	}
diff --git a/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwHomePerformanceCheck.java b/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwHomePerformanceCheck.java
index b2bc8c82..5b6cd1cb 100644
--- a/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwHomePerformanceCheck.java
+++ b/src/performancetest/java/teetime/examples/experiment09pipeimpls/ChwHomePerformanceCheck.java
@@ -34,7 +34,7 @@ class ChwHomePerformanceCheck extends AbstractPerformanceCheck {
 		// since 31.08.2014 (incl.)
 		// assertEquals(44, medianSpeedup, 2.1); // +2
 		// since 04.11.2014 (incl.)
-		// assertEquals(71, medianSpeedup, 2.1); // +33
+		// assertEquals(71, medianSpeedup, 2.1); // +27
 		// since 05.12.2014 (incl.)
 		// assertEquals(45, medianSpeedup, 2.1); // -26
 		// since 28.12.2014 (incl.)
-- 
GitLab