Clarify that cleanup code can be skipped when the JVM terminates (e.g. when calling halt())

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 20
    • Affects Version/s: 20
    • Component/s: core-libs
    • b19
    • 20
    • b28

        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. Some developers may realize this implication of calling halt(), but it would be better to state it explicitly.

              Assignee:
              Brent Christian
              Reporter:
              Brent Christian
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: