From 49c92f4c877671fccc1094a2f1428e1f6863b64d Mon Sep 17 00:00:00 2001 From: Nelson Tavares de Sousa <ntd@informatik.uni-kiel.de> Date: Tue, 11 Nov 2014 17:05:10 +0100 Subject: [PATCH] removed javadoc.skip from run-config solved 3 findbugs issues --- .classpath | 2 +- run-configurations/deploy.launch | 2 +- src/main/java/teetime/framework/pipe/PipeFactoryLoader.java | 2 +- src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java | 2 +- src/main/java/teetime/stage/ByteArray2String.java | 4 +++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.classpath b/.classpath index fdc7b871..5634d654 100644 --- a/.classpath +++ b/.classpath @@ -24,6 +24,6 @@ </attributes> </classpathentry> <classpathentry including="**/*.java" kind="src" path="src/main/resources"/> - <classpathentry kind="src" path="src/test/resources"/> + <classpathentry including="**/*.java" kind="src" path="src/test/resources"/> <classpathentry kind="output" path="target/classes"/> </classpath> diff --git a/run-configurations/deploy.launch b/run-configurations/deploy.launch index 761ef41e..07829bf9 100644 --- a/run-configurations/deploy.launch +++ b/run-configurations/deploy.launch @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <launchConfiguration type="org.eclipse.m2e.Maven2LaunchConfigurationType"> <booleanAttribute key="M2_DEBUG_OUTPUT" value="false"/> -<stringAttribute key="M2_GOALS" value="-Psigning -Dmaven.javadoc.skip=true clean deploy"/> +<stringAttribute key="M2_GOALS" value="-Psigning clean deploy"/> <booleanAttribute key="M2_NON_RECURSIVE" value="false"/> <booleanAttribute key="M2_OFFLINE" value="false"/> <stringAttribute key="M2_PROFILES" value=""/> diff --git a/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java b/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java index 12799988..6e564014 100644 --- a/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java +++ b/src/main/java/teetime/framework/pipe/PipeFactoryLoader.java @@ -25,7 +25,7 @@ public final class PipeFactoryLoader { public static List<IPipeFactory> loadFromStream(final InputStream stream) throws IOException { List<IPipeFactory> pipeFactories = new LinkedList<IPipeFactory>(); - BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(stream)); + BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(stream, "UTF-8")); try { String line; while (null != (line = bufferedReader.readLine())) { diff --git a/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java b/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java index bd91f955..42538d19 100644 --- a/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java +++ b/src/main/java/teetime/framework/pipe/PipeFactoryRegistry.java @@ -45,7 +45,7 @@ public final class PipeFactoryRegistry { /** * The singleton instance of PipeFactoryRegistry */ - public static PipeFactoryRegistry INSTANCE = new PipeFactoryRegistry("pipe-factories.conf"); + public static final PipeFactoryRegistry INSTANCE = new PipeFactoryRegistry("pipe-factories.conf"); private PipeFactoryRegistry(final String configFileName) { List<IPipeFactory> pipeFactories = PipeFactoryLoader.loadPipeFactoriesFromClasspath(configFileName); diff --git a/src/main/java/teetime/stage/ByteArray2String.java b/src/main/java/teetime/stage/ByteArray2String.java index d00ccca9..8eed70b8 100644 --- a/src/main/java/teetime/stage/ByteArray2String.java +++ b/src/main/java/teetime/stage/ByteArray2String.java @@ -1,5 +1,7 @@ package teetime.stage; +import java.nio.charset.Charset; + import teetime.framework.ConsumerStage; import teetime.framework.OutputPort; @@ -9,7 +11,7 @@ public class ByteArray2String extends ConsumerStage<byte[]> { @Override protected void execute(final byte[] element) { - this.send(this.outputPort, new String(element)); + this.send(this.outputPort, new String(element, Charset.forName("UTF-8"))); } public OutputPort<? extends String> getOutputPort() { -- GitLab