Skip to content
Snippets Groups Projects
Commit b25210da authored by Christian Wulf's avatar Christian Wulf
Browse files

added some missing type arguments

parent ea5c5d36
Branches
Tags
No related merge requests found
......@@ -16,15 +16,12 @@
package teetime.variant.explicitScheduling.stage.kieker.fileToRecord;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.DataInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
......@@ -84,13 +81,21 @@ public class ZipFile2RecordFilter extends AbstractFilter<ZipFile2RecordFilter> {
private void createAndSendRecordsFromZipFile(final Context<ZipFile2RecordFilter> context, final File zipFile, final ClassNameRegistry classNameRegistry)
throws FileNotFoundException {
final ZipInputStream zipInputStream = new ZipInputStream(new FileInputStream(zipFile));
final BufferedReader reader;
try {
reader = new BufferedReader(new InputStreamReader(zipInputStream, FSUtil.ENCODING));
} catch (final UnsupportedEncodingException e) {
this.logger.error("This exception should never occur.", e);
return;
}
// BufferedReader reader;
// try {
// reader = new BufferedReader(new InputStreamReader(zipInputStream, FSUtil.ENCODING));
// } catch (final UnsupportedEncodingException e) {
// this.logger.error("This exception should never occur.", e);
// return;
// } finally {
// if (null != reader) {
// try {
// reader.close();
// } catch (IOException e) {
// throw new IllegalStateException(e);
// }
// }
// }
final DataInputStream input = new DataInputStream(new BufferedInputStream(zipInputStream, 1024 * 1024));
ZipEntry zipEntry;
......
......@@ -35,6 +35,7 @@ public class Pipeline<I, O> implements Stage<I, O> {
this.lastStage = stage;
}
@SuppressWarnings("unchecked")
@Override
public CommittableQueue<O> execute2(final CommittableQueue<I> elements) {
// CommittableQueue queue = this.firstStage.execute2(elements);
......@@ -44,6 +45,7 @@ public class Pipeline<I, O> implements Stage<I, O> {
// return this.lastStage.execute2(queue);
// below is faster than above (probably because of the instantiation of a list iterator in each (!) execution)
@SuppressWarnings("rawtypes")
CommittableQueue queue = elements;
for (int i = 0; i < this.stages.length; i++) {
......
......@@ -70,7 +70,7 @@ public class MethodCallThroughputAnalysis3 extends Analysis {
final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter();
final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(this.timestampObjects);
final List<Stage> stageList = new ArrayList<Stage>();
final List<Stage<?, ?>> stageList = new ArrayList<Stage<?, ?>>();
stageList.add(objectProducer);
stageList.add(startTimestampFilter);
stageList.addAll(Arrays.asList(noopFilters));
......@@ -78,7 +78,7 @@ public class MethodCallThroughputAnalysis3 extends Analysis {
stageList.add(collectorSink);
// using an array decreases the performance from 60ms to 200ms (by 3x)
final Stage[] stages = stageList.toArray(new Stage[0]);
final Stage<?, ?>[] stages = stageList.toArray(new Stage[0]);
final WrappingPipeline pipeline = new WrappingPipeline() {
@Override
......@@ -93,7 +93,7 @@ public class MethodCallThroughputAnalysis3 extends Analysis {
Object element = null;
for (int i = 0; i < stages.length; i++) {
Stage stage = stages[i];
Stage<?, ?> stage = stages[i];
element = stage.execute(element);
if (element == null) {
return false;
......
......@@ -71,7 +71,7 @@ public class MethodCallThroughputAnalysis8 extends Analysis {
final StopTimestampFilter stopTimestampFilter = new StopTimestampFilter();
final CollectorSink<TimestampObject> collectorSink = new CollectorSink<TimestampObject>(this.timestampObjects);
final List<AbstractStage> stageList = new ArrayList<AbstractStage>();
final List<AbstractStage<?, ?>> stageList = new ArrayList<AbstractStage<?, ?>>();
stageList.add(objectProducer);
stageList.add(startTimestampFilter);
stageList.addAll(Arrays.asList(noopFilters));
......@@ -79,7 +79,7 @@ public class MethodCallThroughputAnalysis8 extends Analysis {
stageList.add(collectorSink);
// using an array decreases the performance from 60ms to 200ms (by 3x)
final AbstractStage[] stages = stageList.toArray(new AbstractStage[0]);
final AbstractStage<?, ?>[] stages = stageList.toArray(new AbstractStage[0]);
final WrappingPipeline pipeline = new WrappingPipeline() {
private int startIndex;
......@@ -89,7 +89,7 @@ public class MethodCallThroughputAnalysis8 extends Analysis {
// using the foreach for arrays (i.e., w/o using an iterator variable) increases the performance from 200ms to 130ms
Object element = null;
for (int i = this.startIndex; i < stages.length; i++) {
Stage stage = stages[i];
Stage<?, ?> stage = stages[i];
element = stage.execute(element);
if (element == null) {
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment