Skip to content

Commit

Permalink
[JENKINS-21905] fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
olivergondza committed Sep 24, 2017
1 parent efbdac0 commit 08a4c5d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions core/src/main/java/hudson/util/io/TarArchiver.java
Expand Up @@ -105,16 +105,15 @@ public void visit(File file, String relativePath) throws IOException {

try (InputStream fin = Files.newInputStream(file.toPath());
BoundedInputStream in = new BoundedInputStream(fin, size)) {
// Separate tray block not to wrap exception thrown while opening the input stream into an exception
// Separate try block not to wrap exception thrown while opening the input stream into an exception
// indicating a problem while writing
try {
int len;
while ((len = in.read(buf)) >= 0) {
tar.write(buf, 0, len);
}
} catch (IOException | InvalidPathException e) {// log the exception in any case
IOException ioE = new IOException("Error writing to tar file from: " + file, e);
throw ioE;
throw new IOException("Error writing to tar file from: " + file, e);
}
}
}
Expand Down

0 comments on commit 08a4c5d

Please sign in to comment.