Skip to content

Commit

Permalink
JCLOUDS-1626: Close stream in MultiBlobInputStream
Browse files Browse the repository at this point in the history
Otherwise the inner FileInputStream will leak if the caller only reads
part of the stream before closing the outer MultiBlobInputStream.
  • Loading branch information
gaul committed Mar 3, 2024
1 parent 4f39557 commit 4c7fb2c
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1036,5 +1036,13 @@ public int read(byte[] b, int off, int len) throws IOException {
return result;
}
}

@Override
public void close() throws IOException {
if (current != null) {
current.close();
current = null;
}
}
}
}

0 comments on commit 4c7fb2c

Please sign in to comment.