RFR: 8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt()) [v7]
Brent Christian
bchristi at openjdk.org
Wed Dec 7 17:38:31 UTC 2022
> [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036) documented the shutdown sequence, noting that calling Runtime.halt() skips the shutdown sequence and immediately terminates the VM. Thus, "threads' current methods do not complete normally or abruptly; no finally clause of any method is executed".
>
> One ramification of this is that resources within try-with-resource blocks will not be released. It would be good to state this explicitly.
Brent Christian has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 10 additional commits since the last revision:
- Merge branch 'master' into 8295857
- 'close' -> 'closed' in AutoCloseable link
- put examples into a list, in class doc only, not halt()
- Update Runtime class doc re: other unexpected behaviors
- Mentioned effects are not a complete list
- It's "try-with-resources"
- Merge branch 'master' into 8295857
- update halt() @apiNote
- update doc changes
- Update doc for Runtime class and halt() method
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/11218/files
- new: https://git.openjdk.org/jdk/pull/11218/files/db0ea778..5d8b2615
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=11218&range=06
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=11218&range=05-06
Stats: 130011 lines in 2031 files changed: 58264 ins; 52000 del; 19747 mod
Patch: https://git.openjdk.org/jdk/pull/11218.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11218/head:pull/11218
PR: https://git.openjdk.org/jdk/pull/11218
More information about the core-libs-dev
mailing list