diff --git a/.settings/edu.umd.cs.findbugs.core.prefs b/.settings/edu.umd.cs.findbugs.core.prefs index 1201a4e242a6ff8d8b60f0836b1af6bf30cb856a..5fdba54487fbd11677ea211ac2b26fa23bc808bb 100644 --- a/.settings/edu.umd.cs.findbugs.core.prefs +++ b/.settings/edu.umd.cs.findbugs.core.prefs @@ -1,5 +1,135 @@ #FindBugs User Preferences -#Mon Oct 20 12:37:59 CEST 2014 +#Wed Oct 22 08:03:09 CEST 2014 +cloud_id=edu.umd.cs.findbugs.cloud.doNothingCloud +detectorAppendingToAnObjectOutputStream=AppendingToAnObjectOutputStream|true +detectorAtomicityProblem=AtomicityProblem|true +detectorBadAppletConstructor=BadAppletConstructor|false +detectorBadResultSetAccess=BadResultSetAccess|true +detectorBadSyntaxForRegularExpression=BadSyntaxForRegularExpression|true +detectorBadUseOfReturnValue=BadUseOfReturnValue|true +detectorBadlyOverriddenAdapter=BadlyOverriddenAdapter|true +detectorBooleanReturnNull=BooleanReturnNull|true +detectorCallToUnsupportedMethod=CallToUnsupportedMethod|true +detectorCheckExpectedWarnings=CheckExpectedWarnings|true +detectorCheckImmutableAnnotation=CheckImmutableAnnotation|true +detectorCheckRelaxingNullnessAnnotation=CheckRelaxingNullnessAnnotation|true +detectorCheckTypeQualifiers=CheckTypeQualifiers|true +detectorCloneIdiom=CloneIdiom|true +detectorComparatorIdiom=ComparatorIdiom|true +detectorConfusedInheritance=ConfusedInheritance|true +detectorConfusionBetweenInheritedAndOuterMethod=ConfusionBetweenInheritedAndOuterMethod|true +detectorCrossSiteScripting=CrossSiteScripting|true +detectorDefaultEncodingDetector=DefaultEncodingDetector|true +detectorDoInsideDoPrivileged=DoInsideDoPrivileged|true +detectorDontCatchIllegalMonitorStateException=DontCatchIllegalMonitorStateException|true +detectorDontIgnoreResultOfPutIfAbsent=DontIgnoreResultOfPutIfAbsent|true +detectorDontUseEnum=DontUseEnum|true +detectorDroppedException=DroppedException|true +detectorDumbMethodInvocations=DumbMethodInvocations|true +detectorDumbMethods=DumbMethods|true +detectorDuplicateBranches=DuplicateBranches|true +detectorEmptyZipFileEntry=EmptyZipFileEntry|true +detectorEqualsOperandShouldHaveClassCompatibleWithThis=EqualsOperandShouldHaveClassCompatibleWithThis|true +detectorExplicitSerialization=ExplicitSerialization|true +detectorFinalizerNullsFields=FinalizerNullsFields|true +detectorFindBadCast2=FindBadCast2|true +detectorFindBadForLoop=FindBadForLoop|true +detectorFindCircularDependencies=FindCircularDependencies|true +detectorFindDeadLocalStores=FindDeadLocalStores|true +detectorFindDoubleCheck=FindDoubleCheck|true +detectorFindEmptySynchronizedBlock=FindEmptySynchronizedBlock|true +detectorFindFieldSelfAssignment=FindFieldSelfAssignment|true +detectorFindFinalizeInvocations=FindFinalizeInvocations|true +detectorFindFloatEquality=FindFloatEquality|true +detectorFindHEmismatch=FindHEmismatch|true +detectorFindInconsistentSync2=FindInconsistentSync2|true +detectorFindJSR166LockMonitorenter=FindJSR166LockMonitorenter|true +detectorFindLocalSelfAssignment2=FindLocalSelfAssignment2|true +detectorFindMaskedFields=FindMaskedFields|true +detectorFindMismatchedWaitOrNotify=FindMismatchedWaitOrNotify|true +detectorFindNakedNotify=FindNakedNotify|true +detectorFindNonShortCircuit=FindNonShortCircuit|true +detectorFindNullDeref=FindNullDeref|true +detectorFindNullDerefsInvolvingNonShortCircuitEvaluation=FindNullDerefsInvolvingNonShortCircuitEvaluation|true +detectorFindOpenStream=FindOpenStream|true +detectorFindPuzzlers=FindPuzzlers|true +detectorFindRefComparison=FindRefComparison|true +detectorFindReturnRef=FindReturnRef|true +detectorFindRoughConstants=FindRoughConstants|true +detectorFindRunInvocations=FindRunInvocations|true +detectorFindSelfComparison=FindSelfComparison|true +detectorFindSelfComparison2=FindSelfComparison2|true +detectorFindSleepWithLockHeld=FindSleepWithLockHeld|true +detectorFindSpinLoop=FindSpinLoop|true +detectorFindSqlInjection=FindSqlInjection|true +detectorFindTwoLockWait=FindTwoLockWait|true +detectorFindUncalledPrivateMethods=FindUncalledPrivateMethods|true +detectorFindUnconditionalWait=FindUnconditionalWait|true +detectorFindUninitializedGet=FindUninitializedGet|true +detectorFindUnrelatedTypesInGenericContainer=FindUnrelatedTypesInGenericContainer|true +detectorFindUnreleasedLock=FindUnreleasedLock|true +detectorFindUnsatisfiedObligation=FindUnsatisfiedObligation|true +detectorFindUnsyncGet=FindUnsyncGet|true +detectorFindUseOfNonSerializableValue=FindUseOfNonSerializableValue|true +detectorFindUselessControlFlow=FindUselessControlFlow|true +detectorFormatStringChecker=FormatStringChecker|true +detectorHugeSharedStringConstants=HugeSharedStringConstants|true +detectorIDivResultCastToDouble=IDivResultCastToDouble|true +detectorIncompatMask=IncompatMask|true +detectorInconsistentAnnotations=InconsistentAnnotations|true +detectorInefficientIndexOf=InefficientIndexOf|true +detectorInefficientMemberAccess=InefficientMemberAccess|true +detectorInefficientToArray=InefficientToArray|true +detectorInfiniteLoop=InfiniteLoop|true +detectorInfiniteRecursiveLoop=InfiniteRecursiveLoop|true +detectorInheritanceUnsafeGetResource=InheritanceUnsafeGetResource|true +detectorInitializationChain=InitializationChain|true +detectorInitializeNonnullFieldsInConstructor=InitializeNonnullFieldsInConstructor|true +detectorInstantiateStaticClass=InstantiateStaticClass|true +detectorIntCast2LongAsInstant=IntCast2LongAsInstant|true +detectorInvalidJUnitTest=InvalidJUnitTest|true +detectorIteratorIdioms=IteratorIdioms|true +detectorLazyInit=LazyInit|true +detectorLoadOfKnownNullValue=LoadOfKnownNullValue|true +detectorLostLoggerDueToWeakReference=LostLoggerDueToWeakReference|true +detectorMethodReturnCheck=MethodReturnCheck|true +detectorMultithreadedInstanceAccess=MultithreadedInstanceAccess|true +detectorMutableLock=MutableLock|true +detectorMutableStaticFields=MutableStaticFields|true +detectorNaming=Naming|true +detectorNoteUnconditionalParamDerefs=NoteUnconditionalParamDerefs|true +detectorNumberConstructor=NumberConstructor|true +detectorOptionalReturnNull=OptionalReturnNull|true +detectorOverridingEqualsNotSymmetrical=OverridingEqualsNotSymmetrical|true +detectorPreferZeroLengthArrays=PreferZeroLengthArrays|true +detectorPublicSemaphores=PublicSemaphores|true +detectorQuestionableBooleanAssignment=QuestionableBooleanAssignment|true +detectorReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass=ReadOfInstanceFieldInMethodInvokedByConstructorInSuperclass|true +detectorReadReturnShouldBeChecked=ReadReturnShouldBeChecked|true +detectorRedundantInterfaces=RedundantInterfaces|true +detectorRepeatedConditionals=RepeatedConditionals|true +detectorRuntimeExceptionCapture=RuntimeExceptionCapture|true +detectorSerializableIdiom=SerializableIdiom|true +detectorStartInConstructor=StartInConstructor|true +detectorStaticCalendarDetector=StaticCalendarDetector|true +detectorStringConcatenation=StringConcatenation|true +detectorSuperfluousInstanceOf=SuperfluousInstanceOf|true +detectorSuspiciousThreadInterrupted=SuspiciousThreadInterrupted|true +detectorSwitchFallthrough=SwitchFallthrough|true +detectorSynchronizationOnSharedBuiltinConstant=SynchronizationOnSharedBuiltinConstant|true +detectorSynchronizeAndNullCheckField=SynchronizeAndNullCheckField|true +detectorSynchronizeOnClassLiteralNotGetClass=SynchronizeOnClassLiteralNotGetClass|true +detectorSynchronizingOnContentsOfFieldToProtectField=SynchronizingOnContentsOfFieldToProtectField|true +detectorURLProblems=URLProblems|true +detectorUncallableMethodOfAnonymousClass=UncallableMethodOfAnonymousClass|true +detectorUnnecessaryMath=UnnecessaryMath|true +detectorUnreadFields=UnreadFields|true +detectorUselessSubclassMethod=UselessSubclassMethod|true +detectorVarArgsProblems=VarArgsProblems|true +detectorVolatileUsage=VolatileUsage|true +detectorWaitInLoop=WaitInLoop|true +detectorWrongMapIterator=WrongMapIterator|true +detectorXMLFactoryBypass=XMLFactoryBypass|true detector_threshold=3 effort=max excludefilter0=.fbExcludeFilterFile|true diff --git a/.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs b/.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs new file mode 100644 index 0000000000000000000000000000000000000000..53a25f5bce7ab4618cbbc33e66b2e6582dd065f4 --- /dev/null +++ b/.settings/edu.umd.cs.findbugs.plugin.eclipse.prefs @@ -0,0 +1,2 @@ +eclipse.preferences.version=1 +edu.umd.cs.findbugs.plugin.eclipse.findbugsMarkerScariest=Error diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 29abf999564110a0d6aca109f55f439c72b7031c..989609020a008e70c15d3ce12a3a1c835b80201c 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -1,6 +1,5 @@ eclipse.preferences.version=1 encoding//src/main/java=UTF-8 encoding//src/main/resources=UTF-8 -encoding//src/test/java=UTF-8 encoding//src/test/resources=UTF-8 encoding/<project>=UTF-8 diff --git a/src/main/java/teetime/stage/CipherByteArray.java b/src/main/java/teetime/stage/CipherByteArray.java index b31cf474f065a7281eadfc531c0e73d58f61d757..e260f9ab5e58ba910dac8701085ee19f2b685a82 100644 --- a/src/main/java/teetime/stage/CipherByteArray.java +++ b/src/main/java/teetime/stage/CipherByteArray.java @@ -1,8 +1,12 @@ package teetime.stage; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; import javax.crypto.Cipher; +import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFactory; import javax.crypto.spec.PBEKeySpec; @@ -33,21 +37,30 @@ public class CipherByteArray extends ConsumerStage<byte[]> { try { secretKey = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1"). generateSecret(keySpec); - } catch (Exception e) { - e.printStackTrace(); + } catch (InvalidKeySpecException e1) { + throw new IllegalStateException(e1); + } catch (NoSuchAlgorithmException e1) { + throw new IllegalStateException(e1); } skeyspec = new SecretKeySpec(secretKey.getEncoded(), "AES"); try { this.cipher = Cipher.getInstance(skeyspec.getAlgorithm()); + } catch (NoSuchAlgorithmException e) { + throw new IllegalStateException(e); + } catch (NoSuchPaddingException e) { + throw new IllegalStateException(e); + } + + try { if (mode == CipherMode.ENCRYPT) { this.cipher.init(Cipher.ENCRYPT_MODE, skeyspec); } else { this.cipher.init(Cipher.DECRYPT_MODE, skeyspec); } - } catch (Exception e) { - e.printStackTrace(); + } catch (InvalidKeyException e) { + throw new IllegalStateException(e); } } diff --git a/src/main/java/teetime/stage/io/DbReader.java b/src/main/java/teetime/stage/io/DbReader.java index 82ced4e9bb1b446df8f2eb03c12a142f56bcfd26..d01fa8f0a53fc890078f4bdd018c3fef77c639b9 100644 --- a/src/main/java/teetime/stage/io/DbReader.java +++ b/src/main/java/teetime/stage/io/DbReader.java @@ -18,9 +18,9 @@ package teetime.stage.io; import java.sql.Connection; import java.sql.DriverManager; +import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.Statement; import teetime.framework.ProducerStage; @@ -76,12 +76,13 @@ public class DbReader extends ProducerStage<IMonitoringRecord> { Connection connection = null; try { connection = DriverManager.getConnection(this.connectionString); - Statement getIndexTable = null; + PreparedStatement getIndexTable = null; try { - getIndexTable = connection.createStatement(); + getIndexTable = connection.prepareStatement("SELECT * from ?"); + getIndexTable.setString(1, this.tablePrefix); ResultSet indexTable = null; try { // NOCS (nested try) - indexTable = getIndexTable.executeQuery("SELECT * from " + this.tablePrefix); + indexTable = getIndexTable.executeQuery(); while (this.running && indexTable.next()) { final String tablename = indexTable.getString(1); final String classname = indexTable.getString(2); @@ -156,12 +157,13 @@ public class DbReader extends ProducerStage<IMonitoringRecord> { */ private void table2record(final Connection connection, final String tablename, final Class<? extends IMonitoringRecord> clazz) throws SQLException, MonitoringRecordException { - Statement selectRecord = null; + PreparedStatement selectRecord = null; try { - selectRecord = connection.createStatement(); + selectRecord = connection.prepareStatement("SELECT * from ?"); + selectRecord.setString(1, tablename); ResultSet records = null; try { - records = selectRecord.executeQuery("SELECT * from " + tablename); + records = selectRecord.executeQuery(); final int size = records.getMetaData().getColumnCount() - 2; // remove index column while (this.running && records.next()) { final Object[] recordValues = new Object[size]; diff --git a/src/main/java/teetime/stage/kieker/Dir2RecordsFilter.java b/src/main/java/teetime/stage/kieker/Dir2RecordsFilter.java index 15ecff3f80aeedf5dadc27e455f7137edc4f6fa4..64ea7fdbbb09ba53d472e13f77432094ef197ffa 100644 --- a/src/main/java/teetime/stage/kieker/Dir2RecordsFilter.java +++ b/src/main/java/teetime/stage/kieker/Dir2RecordsFilter.java @@ -31,7 +31,6 @@ import teetime.stage.kieker.className.ClassNameRegistryCreationFilter; import teetime.stage.kieker.className.ClassNameRegistryRepository; import teetime.stage.kieker.fileToRecord.BinaryFile2RecordFilter; import teetime.stage.kieker.fileToRecord.DatFile2RecordFilter; -import teetime.stage.kieker.fileToRecord.ZipFile2RecordFilter; import kieker.common.record.IMonitoringRecord; import kieker.common.util.filesystem.BinaryCompressionMethod; @@ -62,14 +61,12 @@ public class Dir2RecordsFilter extends OldPipeline<ClassNameRegistryCreationFilt final DatFile2RecordFilter datFile2RecordFilter = new DatFile2RecordFilter(this.classNameRegistryRepository); final BinaryFile2RecordFilter binaryFile2RecordFilter = new BinaryFile2RecordFilter(this.classNameRegistryRepository); - final ZipFile2RecordFilter zipFile2RecordFilter = new ZipFile2RecordFilter(); final Merger<IMonitoringRecord> recordMerger = new Merger<IMonitoringRecord>(); // store ports due to readability reasons final OutputPort<File> normalFileOutputPort = fileExtensionSwitch.addFileExtension(FSUtil.NORMAL_FILE_EXTENSION); final OutputPort<File> binFileOutputPort = fileExtensionSwitch.addFileExtension(BinaryCompressionMethod.NONE.getFileExtension()); - final OutputPort<File> zipFileOutputPort = fileExtensionSwitch.addFileExtension(FSUtil.ZIP_FILE_EXTENSION); // connect ports by pipes IPipeFactory pipeFactory = pipeFactoryRegistry.getPipeFactory(ThreadCommunication.INTRA, PipeOrdering.ARBITRARY, false); @@ -78,11 +75,9 @@ public class Dir2RecordsFilter extends OldPipeline<ClassNameRegistryCreationFilt pipeFactory.create(normalFileOutputPort, datFile2RecordFilter.getInputPort()); pipeFactory.create(binFileOutputPort, binaryFile2RecordFilter.getInputPort()); - pipeFactory.create(zipFileOutputPort, zipFile2RecordFilter.getInputPort()); pipeFactory.create(datFile2RecordFilter.getOutputPort(), recordMerger.getNewInputPort()); pipeFactory.create(binaryFile2RecordFilter.getOutputPort(), recordMerger.getNewInputPort()); - pipeFactory.create(zipFile2RecordFilter.getOutputPort(), recordMerger.getNewInputPort()); // prepare pipeline this.setFirstStage(classNameRegistryCreationFilter); diff --git a/src/main/java/teetime/stage/kieker/DirWithBin2RecordFilter.java b/src/main/java/teetime/stage/kieker/DirWithBin2RecordFilter.java index efe06d6db427d917de5451f05a7fedef6a59bf7f..ae11d6e6f3b013d2c7f2b7aec4fa57728d437791 100644 --- a/src/main/java/teetime/stage/kieker/DirWithBin2RecordFilter.java +++ b/src/main/java/teetime/stage/kieker/DirWithBin2RecordFilter.java @@ -3,9 +3,8 @@ package teetime.stage.kieker; import java.io.File; import teetime.framework.InputPort; -import teetime.framework.OutputPort; import teetime.framework.OldPipeline; -import teetime.stage.io.Directory2FilesFilter; +import teetime.framework.OutputPort; import teetime.stage.kieker.className.ClassNameRegistryCreationFilter; import teetime.stage.kieker.className.ClassNameRegistryRepository; import teetime.stage.kieker.fileToRecord.BinaryFile2RecordFilter; @@ -20,7 +19,6 @@ public class DirWithBin2RecordFilter extends OldPipeline<ClassNameRegistryCreati this.classNameRegistryRepository = classNameRegistryRepository; final ClassNameRegistryCreationFilter classNameRegistryCreationFilter = new ClassNameRegistryCreationFilter(classNameRegistryRepository); - final Directory2FilesFilter directory2FilesFilter = new Directory2FilesFilter(); final BinaryFile2RecordFilter binaryFile2RecordFilter = new BinaryFile2RecordFilter(classNameRegistryRepository); this.setFirstStage(classNameRegistryCreationFilter); diff --git a/src/main/java/teetime/stage/kieker/DirWithDat2RecordFilter.java b/src/main/java/teetime/stage/kieker/DirWithDat2RecordFilter.java index 93fe14f22242b576a818b5cd809fc8d3fd7c0dbe..ae8795bfd61091557471a1ce35a84f2d79b7c51a 100644 --- a/src/main/java/teetime/stage/kieker/DirWithDat2RecordFilter.java +++ b/src/main/java/teetime/stage/kieker/DirWithDat2RecordFilter.java @@ -3,9 +3,8 @@ package teetime.stage.kieker; import java.io.File; import teetime.framework.InputPort; -import teetime.framework.OutputPort; import teetime.framework.OldPipeline; -import teetime.stage.io.Directory2FilesFilter; +import teetime.framework.OutputPort; import teetime.stage.kieker.className.ClassNameRegistryCreationFilter; import teetime.stage.kieker.className.ClassNameRegistryRepository; import teetime.stage.kieker.fileToRecord.DatFile2RecordFilter; @@ -20,7 +19,6 @@ public class DirWithDat2RecordFilter extends OldPipeline<ClassNameRegistryCreati this.classNameRegistryRepository = classNameRegistryRepository; final ClassNameRegistryCreationFilter classNameRegistryCreationFilter = new ClassNameRegistryCreationFilter(classNameRegistryRepository); - final Directory2FilesFilter directory2FilesFilter = new Directory2FilesFilter(); final DatFile2RecordFilter datFile2RecordFilter = new DatFile2RecordFilter(classNameRegistryRepository); this.setFirstStage(classNameRegistryCreationFilter); diff --git a/src/main/java/teetime/stage/kieker/fileToRecord/ZipFile2RecordFilter.java b/src/main/java/teetime/stage/kieker/fileToRecord/ZipFile2RecordFilter.java deleted file mode 100644 index e9686124d16453603ca5e6984c25098ae810774a..0000000000000000000000000000000000000000 --- a/src/main/java/teetime/stage/kieker/fileToRecord/ZipFile2RecordFilter.java +++ /dev/null @@ -1,129 +0,0 @@ -/*************************************************************************** - * Copyright 2014 Kieker Project (http://kieker-monitoring.net) - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - ***************************************************************************/ -package teetime.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; - -import teetime.framework.ConsumerStage; -import teetime.framework.OutputPort; -import teetime.stage.kieker.className.ClassNameRegistry; -import teetime.stage.kieker.className.MappingFileParser; - -import kieker.common.record.IMonitoringRecord; -import kieker.common.util.filesystem.FSUtil; - -/** - * @author Christian Wulf - * - * @since 1.10 - */ -public class ZipFile2RecordFilter extends ConsumerStage<File> { - - private final OutputPort<IMonitoringRecord> outputPort = this.createOutputPort(); - - private final MappingFileParser mappingFileParser; - - /** - * @since 1.10 - */ - public ZipFile2RecordFilter() { - this.mappingFileParser = new MappingFileParser(this.logger); - } - - @Override - protected void execute(final File zipFile) { - final InputStream mappingFileInputStream = this.findMappingFileInputStream(zipFile); - if (mappingFileInputStream == null) { - return; - } - final ClassNameRegistry classNameRegistry = this.mappingFileParser.parseFromStream(mappingFileInputStream); - - try { - this.createAndSendRecordsFromZipFile(zipFile, classNameRegistry); - } catch (final FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - private void createAndSendRecordsFromZipFile(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; - } - final DataInputStream input = new DataInputStream(new BufferedInputStream(zipInputStream, 1024 * 1024)); - - ZipEntry zipEntry; - try { - while (null != (zipEntry = zipInputStream.getNextEntry())) { // NOCS NOPMD - final String filename = zipEntry.getName(); - // TODO implement the zip filter - } - } catch (final IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - private InputStream findMappingFileInputStream(final File zipFile) { - ZipInputStream zipInputStream = null; - try { - zipInputStream = new ZipInputStream(new FileInputStream(zipFile)); - ZipEntry zipEntry; - while ((null != (zipEntry = zipInputStream.getNextEntry())) && !zipEntry.getName().equals(FSUtil.MAP_FILENAME)) { // NOCS NOPMD - // do nothing, just skip to the map file if present - } - if (null == zipEntry) { - this.logger.error("The zip file does not contain a Kieker log: " + zipFile.toString()); - return null; - } - return zipInputStream; - } catch (final IOException ex) { - this.logger.error("Error accessing ZipInputStream", ex); - } finally { - if (null != zipInputStream) { - try { - zipInputStream.close(); - } catch (final IOException ex) { - this.logger.error("Failed to close ZipInputStream", ex); - } - } - } - - return null; - } - - public OutputPort<IMonitoringRecord> getOutputPort() { - return outputPort; - } - -} diff --git a/src/performancetest/java/teetime/examples/experiment17/MethodCallThroughputAnalysis17.java b/src/performancetest/java/teetime/examples/experiment17/MethodCallThroughputAnalysis17.java index b61ed4dabf0fb502c0e3d9177eb397744a2cf88d..62345de3f6f43209dc3f5cb5f16eccb87dfdaf65 100644 --- a/src/performancetest/java/teetime/examples/experiment17/MethodCallThroughputAnalysis17.java +++ b/src/performancetest/java/teetime/examples/experiment17/MethodCallThroughputAnalysis17.java @@ -112,8 +112,6 @@ public class MethodCallThroughputAnalysis17 { final ConstructorClosure<TimestampObject> inputObjectCreator) { final ObjectProducer<TimestampObject> objectProducer = new ObjectProducer<TimestampObject>(numInputObjects, inputObjectCreator); Distributor<TimestampObject> distributor = new Distributor<TimestampObject>(); - Sink<TimestampObject> sink = new Sink<TimestampObject>(); - Sink<Void> endStage = new Sink<Void>(); // UnorderedGrowablePipe.connect(objectProducer.getOutputPort(), sink.getInputPort()); // objectProducer.getOutputPort().pipe = new UnorderedGrowablePipe<TimestampObject>();