Skip to content
This repository has been archived by the owner on Nov 19, 2024. It is now read-only.

JENKINS-26254 Use BufferedInputStream to read .exec files #78

Merged
merged 1 commit into from
Dec 3, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import hudson.FilePath;

import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
Expand Down Expand Up @@ -84,14 +86,15 @@ private void loadExecutionData() throws IOException {
for (FilePath filePath : execFiles) {
File executionDataFile = new File(filePath.getRemote());
try {
final FileInputStream fis = new FileInputStream(executionDataFile);
final InputStream inputStream = new BufferedInputStream(
new FileInputStream(executionDataFile));
try {
final ExecutionDataReader reader = new ExecutionDataReader(fis);
final ExecutionDataReader reader = new ExecutionDataReader(inputStream);
reader.setSessionInfoVisitor(sessionInfoStore);
reader.setExecutionDataVisitor(executionDataStore);
reader.read();
} finally {
fis.close();
inputStream.close();
}
} catch (final IOException e) {
System.out.println("While reading execution data-file: " + executionDataFile);
Expand Down