RFR: 8295857: Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt()) [v5]

Brent Christian bchristi at openjdk.org
Wed Nov 30 01:15:54 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 incrementally with one additional commit since the last revision:

  put examples into a list, in class doc only, not halt()

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/11218/files
  - new: https://git.openjdk.org/jdk/pull/11218/files/6df8acf8..4f2fb241

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=11218&range=04
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=11218&range=03-04

  Stats: 13 lines in 1 file changed: 2 ins; 1 del; 10 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