From 86f8b94d9e2783972fb4ac0fc380a7111e67340e Mon Sep 17 00:00:00 2001
From: Nils Christian Ehmke <nils@rhocas.de>
Date: Fri, 27 Feb 2015 12:30:14 +0100
Subject: [PATCH] Removed some minor legacy code

---
 .../java/teetime/stage/CipherByteArray.java    | 18 +++++++++---------
 .../java/teetime/stage/string/Tokenizer.java   |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/main/java/teetime/stage/CipherByteArray.java b/src/main/java/teetime/stage/CipherByteArray.java
index ea8c4fb2..7f84ceee 100644
--- a/src/main/java/teetime/stage/CipherByteArray.java
+++ b/src/main/java/teetime/stage/CipherByteArray.java
@@ -43,7 +43,7 @@ public final class CipherByteArray extends AbstractConsumerStage<byte[]> {
 		final byte[] salt = { 't', 'e', 's', 't' };
 		SecretKeySpec skeyspec = null;
 
-		KeySpec keySpec = new PBEKeySpec(password.toCharArray(),
+		final KeySpec keySpec = new PBEKeySpec(password.toCharArray(),
 				salt,
 				1024, 128);
 
@@ -52,9 +52,9 @@ public final class CipherByteArray extends AbstractConsumerStage<byte[]> {
 		try {
 			secretKey = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1").
 					generateSecret(keySpec);
-		} catch (InvalidKeySpecException e1) {
+		} catch (final InvalidKeySpecException e1) {
 			throw new IllegalStateException(e1);
-		} catch (NoSuchAlgorithmException e1) {
+		} catch (final NoSuchAlgorithmException e1) {
 			throw new IllegalStateException(e1);
 		}
 
@@ -62,9 +62,9 @@ public final class CipherByteArray extends AbstractConsumerStage<byte[]> {
 
 		try {
 			this.cipher = Cipher.getInstance(skeyspec.getAlgorithm());
-		} catch (NoSuchAlgorithmException e) {
+		} catch (final NoSuchAlgorithmException e) {
 			throw new IllegalStateException(e);
-		} catch (NoSuchPaddingException e) {
+		} catch (final NoSuchPaddingException e) {
 			throw new IllegalStateException(e);
 		}
 
@@ -74,7 +74,7 @@ public final class CipherByteArray extends AbstractConsumerStage<byte[]> {
 			} else {
 				this.cipher.init(Cipher.DECRYPT_MODE, skeyspec);
 			}
-		} catch (InvalidKeyException e) {
+		} catch (final InvalidKeyException e) {
 			throw new IllegalStateException(e);
 		}
 	}
@@ -86,14 +86,14 @@ public final class CipherByteArray extends AbstractConsumerStage<byte[]> {
 
 		try {
 			output = this.cipher.doFinal(element);
-		} catch (Exception e) {
+		} catch (final Exception e) {
 			e.printStackTrace();
 		}
 
-		outputPort.send(output);
+		this.outputPort.send(output);
 	}
 
-	public OutputPort<? extends byte[]> getOutputPort() {
+	public OutputPort<byte[]> getOutputPort() {
 		return this.outputPort;
 	}
 
diff --git a/src/main/java/teetime/stage/string/Tokenizer.java b/src/main/java/teetime/stage/string/Tokenizer.java
index fc9e21ac..f09b16de 100644
--- a/src/main/java/teetime/stage/string/Tokenizer.java
+++ b/src/main/java/teetime/stage/string/Tokenizer.java
@@ -37,7 +37,7 @@ public final class Tokenizer extends AbstractConsumerStage<String> {
 		}
 	}
 
-	public OutputPort<? extends String> getOutputPort() {
+	public OutputPort<String> getOutputPort() {
 		return this.outputPort;
 	}
 
-- 
GitLab