(fc) FileChannelImpl has no finalizer

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 10
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b27

      FileChannelImpl does not have a finalizer. As a result, if one becomes garbage without being closed, the file descriptor stays open until the JVM terminates.

      Various Stream factories (Files.lines, Files.walk) are ultimately backed by a FileChannelImpl. If the user does not close the stream, then the FCI is leaked and therefore the file descriptor is leaked.

            Assignee:
            Brian Burkhalter
            Reporter:
            Brian Goetz
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: