mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8276447: Deprecate finalization-related methods for removal
Reviewed-by: rriggs, alanb, lancea, darcy, mchung, serb, smarks, prr
This commit is contained in:
parent
3c2951f738
commit
ec7cb6d5d3
62 changed files with 156 additions and 140 deletions
|
@ -791,7 +791,7 @@ public class Executors {
|
|||
FinalizableDelegatedExecutorService(ExecutorService executor) {
|
||||
super(executor);
|
||||
}
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings("removal")
|
||||
protected void finalize() {
|
||||
super.shutdown();
|
||||
}
|
||||
|
|
|
@ -1477,8 +1477,13 @@ public class ThreadPoolExecutor extends AbstractExecutorService {
|
|||
* @implNote Previous versions of this class had a finalize method
|
||||
* that shut down this executor, but in this version, finalize
|
||||
* does nothing.
|
||||
*
|
||||
* @deprecated Finalization has been deprecated for removal. See
|
||||
* {@link java.lang.Object#finalize} for background information and details
|
||||
* about migration options.
|
||||
*/
|
||||
@Deprecated(since="9")
|
||||
@Deprecated(since="9", forRemoval=true)
|
||||
@SuppressWarnings("removal")
|
||||
protected void finalize() {}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue