Commit 46d75932 authored by Christian Wulf's avatar Christian Wulf

updated plugin version;

refactored ZipByteArray
parent d7cb9967
......@@ -423,7 +423,7 @@
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>2.11</version>
<version>3.0</version>
<configuration>
<header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
<properties>
......
......@@ -30,7 +30,7 @@ import teetime.framework.OutputPort;
* @author Nelson Tavares de Sousa
*
*/
public final class ZipByteArray extends AbstractConsumerStage<byte[]> {
public class ZipByteArray extends AbstractConsumerStage<byte[]> {
private final OutputPort<byte[]> outputPort = this.createOutputPort();
private final ZipMode mode;
......@@ -44,9 +44,10 @@ public final class ZipByteArray extends AbstractConsumerStage<byte[]> {
}
@Override
protected void execute(final byte[] element) {
protected void execute(final byte[] elementInBytes) {
try {
outputPort.send((mode == ZipMode.COMP) ? compress(element) : decompress(element));
byte[] processedElementInBytes = (mode == ZipMode.COMP) ? compress(elementInBytes) : decompress(elementInBytes);
outputPort.send(processedElementInBytes);
} catch (IOException e) {
throw new IllegalStateException(e);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment