8285872: JFR: Remove finalize() methods

Reviewed-by: mgronlun
This commit is contained in:
Erik Gahlin 2022-05-11 12:17:15 +00:00
parent faa1aad434
commit f1554fc4a8
3 changed files with 0 additions and 28 deletions

View File

@ -110,11 +110,4 @@ final class ChunkInputStream extends InputStream {
}
}
}
@Override
@SuppressWarnings("removal")
protected void finalize() throws Throwable {
super.finalize();
close();
}
}

View File

@ -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();
}
}

View File

@ -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;
}