From 08d11d9ea6cba6746d56aa1a67ec4dc6a8c70c2d Mon Sep 17 00:00:00 2001
From: Nelson Tavares de Sousa <stu103017@mail.uni-kiel.de>
Date: Tue, 23 Jun 2015 13:06:01 +0200
Subject: [PATCH] extracted default capacity as constant

---
 src/main/java/teetime/framework/ConfigurationContext.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/main/java/teetime/framework/ConfigurationContext.java b/src/main/java/teetime/framework/ConfigurationContext.java
index ed4c355e..c0dd8103 100644
--- a/src/main/java/teetime/framework/ConfigurationContext.java
+++ b/src/main/java/teetime/framework/ConfigurationContext.java
@@ -31,6 +31,8 @@ import teetime.framework.pipe.InstantiationPipe;
  */
 public final class ConfigurationContext {
 
+	private static final int DEFAULT_CAPACITY = 4;
+
 	private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationContext.class);
 
 	private final Set<Stage> threadableStages = new HashSet<Stage>();
@@ -54,7 +56,7 @@ public final class ConfigurationContext {
 	}
 
 	/**
-	 * Connects two ports with a pipe with a default capacity of currently 4
+	 * Connects two ports with a pipe with a default capacity of currently {@value #DEFAULT_CAPACITY}.
 	 *
 	 * @param sourcePort
 	 *            {@link OutputPort} of the sending stage
@@ -64,7 +66,7 @@ public final class ConfigurationContext {
 	 *            the type of elements to be sent
 	 */
 	final <T> void connectPorts(final OutputPort<? extends T> sourcePort, final InputPort<T> targetPort) {
-		connectPorts(sourcePort, targetPort, 4);
+		connectPorts(sourcePort, targetPort, DEFAULT_CAPACITY);
 	}
 
 	/**
-- 
GitLab