Skip to content

Commit

Permalink
8263905: Remove finalize methods for SocketInput/OutputStream
Browse files Browse the repository at this point in the history
Reviewed-by: alanb, vtewari, dfuchs, mchung
  • Loading branch information
Kim Barrett committed Mar 23, 2021
1 parent 1c9817b commit 47ef038
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
8 changes: 1 addition & 7 deletions src/java.base/share/classes/java/net/SocketInputStream.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -243,12 +243,6 @@ public void close() throws IOException {
assert false;
}

/**
* Overrides finalize, the fd is closed by the Socket.
*/
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {}

/**
* Perform class load-time initializations.
*/
Expand Down
8 changes: 1 addition & 7 deletions src/java.base/share/classes/java/net/SocketOutputStream.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -153,12 +153,6 @@ public void close() throws IOException {
assert false;
}

/**
* Overrides finalize, the fd is closed by the Socket.
*/
@SuppressWarnings({"deprecation", "removal"})
protected void finalize() {}

/**
* Perform class load-time initializations.
*/
Expand Down

1 comment on commit 47ef038

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.