mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
8193490: java/util/zip/ZipFile/ClearStaleZipFileInputStreams.java, FinalizeZipFile.java, TestCleaner.java, Collectible.java failed because cleaner can't finish
Reviewed-by: darcy
This commit is contained in:
parent
a05689a09f
commit
aeb50d6935
2 changed files with 2 additions and 23 deletions
|
@ -25,9 +25,6 @@
|
|||
|
||||
package java.util.zip;
|
||||
|
||||
import java.util.function.LongConsumer;
|
||||
import java.util.function.LongSupplier;
|
||||
|
||||
/**
|
||||
* This class provides support for general purpose decompression using the
|
||||
* popular ZLIB compression library. The ZLIB compression library was
|
||||
|
@ -118,20 +115,7 @@ public class Inflater {
|
|||
* @param nowrap if true then support GZIP compatible compression
|
||||
*/
|
||||
public Inflater(boolean nowrap) {
|
||||
this.zsRef = ZStreamRef.get(this,
|
||||
// Desugared for startup purposes.
|
||||
new LongSupplier() {
|
||||
@Override
|
||||
public long getAsLong() {
|
||||
return init(nowrap);
|
||||
}
|
||||
},
|
||||
new LongConsumer() {
|
||||
@Override
|
||||
public void accept(long value) {
|
||||
end();
|
||||
}
|
||||
});
|
||||
this.zsRef = ZStreamRef.get(this, () -> init(nowrap), Inflater::end);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -427,12 +427,7 @@ class ZipFile implements ZipConstants, Closeable {
|
|||
Inflater inf, int size) {
|
||||
super(zfin, inf, size);
|
||||
this.cleanable = CleanerFactory.cleaner().register(this,
|
||||
new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
res.releaseInflater(inf);
|
||||
}
|
||||
});
|
||||
() -> res.releaseInflater(inf));
|
||||
}
|
||||
|
||||
public void close() throws IOException {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue