mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
inflate zipped contents out of the lock
This commit is contained in:
@@ -69,19 +69,20 @@ public class RefCountingStorage extends AbstractStorage {
|
||||
|
||||
private BufferExposingByteArrayOutputStream internalReadStream(int record) throws IOException {
|
||||
waitForPendingWriteForRecord(record);
|
||||
byte[] result;
|
||||
|
||||
synchronized (myLock) {
|
||||
result = super.readBytes(record);
|
||||
}
|
||||
|
||||
byte[] result = super.readBytes(record);
|
||||
InflaterInputStream in = new CustomInflaterInputStream(result);
|
||||
try {
|
||||
final BufferExposingByteArrayOutputStream outputStream = new BufferExposingByteArrayOutputStream();
|
||||
StreamUtil.copyStreamContent(in, outputStream);
|
||||
return outputStream;
|
||||
}
|
||||
finally {
|
||||
in.close();
|
||||
}
|
||||
InflaterInputStream in = new CustomInflaterInputStream(result);
|
||||
try {
|
||||
final BufferExposingByteArrayOutputStream outputStream = new BufferExposingByteArrayOutputStream();
|
||||
StreamUtil.copyStreamContent(in, outputStream);
|
||||
return outputStream;
|
||||
}
|
||||
finally {
|
||||
in.close();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user