8285872: JFR: Remove finalize() methods
Reviewed-by: mgronlun
This commit is contained in:
parent
faa1aad434
commit
f1554fc4a8
@ -110,11 +110,4 @@ final class ChunkInputStream extends InputStream {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("removal")
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
@ -135,11 +135,4 @@ final class ChunksChannel implements ReadableByteChannel {
|
||||
public boolean isOpen() {
|
||||
return channel != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("removal")
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
@ -133,20 +133,6 @@ final class RepositoryChunk {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("removal")
|
||||
protected void finalize() {
|
||||
boolean destroy = false;
|
||||
synchronized (this) {
|
||||
if (refCount > 0) {
|
||||
destroy = true;
|
||||
}
|
||||
}
|
||||
if (destroy) {
|
||||
destroy();
|
||||
}
|
||||
}
|
||||
|
||||
public long getSize() {
|
||||
return size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user