mirror of https://github.com/apache/jclouds.git
JCLOUDS-1626: Close stream in MultiBlobInputStream
Otherwise the inner FileInputStream will leak if the caller only reads part of the stream before closing the outer MultiBlobInputStream.
This commit is contained in:
parent
4f3955799b
commit
4c7fb2c8b9
|
@ -1036,5 +1036,13 @@ public final class LocalBlobStore implements BlobStore {
|
|||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() throws IOException {
|
||||
if (current != null) {
|
||||
current.close();
|
||||
current = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue