From f42d157efca67a948df61ff8f35bfb9fad9b73c8 Mon Sep 17 00:00:00 2001
From: Christian Wulf <chw@informatik.uni-kiel.de>
Date: Fri, 12 Jun 2015 08:17:15 +0200
Subject: [PATCH] fixed Counter

---
 .settings/edu.umd.cs.findbugs.core.prefs | 2 +-
 src/main/java/teetime/stage/Counter.java | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/.settings/edu.umd.cs.findbugs.core.prefs b/.settings/edu.umd.cs.findbugs.core.prefs
index 129e6553..6aba28e5 100644
--- a/.settings/edu.umd.cs.findbugs.core.prefs
+++ b/.settings/edu.umd.cs.findbugs.core.prefs
@@ -1,5 +1,5 @@
 #FindBugs User Preferences
-#Wed May 13 15:54:28 CEST 2015
+#Fri Jun 12 08:15:02 CEST 2015
 detector_threshold=2
 effort=max
 excludefilter0=.fbExcludeFilterFile|true
diff --git a/src/main/java/teetime/stage/Counter.java b/src/main/java/teetime/stage/Counter.java
index 0dcfc2d5..9bfc67c2 100644
--- a/src/main/java/teetime/stage/Counter.java
+++ b/src/main/java/teetime/stage/Counter.java
@@ -31,8 +31,10 @@ public final class Counter<T> extends AbstractConsumerStage<T> {
 		outputPort.send(element);
 	}
 
-	// BETTER find a solution w/o any thread-safe code in this stage
-	public synchronized int getNumElementsPassed() {
+	/**
+	 * <i>Hint:</i> This method may not be invoked by another thread since it is not thread-safe.
+	 */
+	public int getNumElementsPassed() {
 		return this.numElementsPassed;
 	}
 
-- 
GitLab