Release Note: DatagramSocket::disconnect Allows an Implementation to Throw UncheckedIOException

XMLWordPrintable

    • Verified

      Previously, `DatagramChannel::disconnect` threw an `IOException` while `DatagramSocket::disconnect` did not. As a result, the `DatagramChannel::socket` adapter, which calls `DatagramChannel::disconnect`, catches the thrown `IOException` and rethrows it as an `Error`. However, this was undocumented behavior and not user-friendly.

      The `DatagramChannel::socket` adapter has been changed to throw an `UncheckedIOException`, and the specification of `DatagramSocket::disconnect` has been updated to document that an implementation may now throw an `UncheckedIOException`. This ensures consistency in behavior between `DatagramSocket`, `DatagramChannel`, and `DatagramChannel::socket` adapter.

            Assignee:
            Patrick Concannon (Inactive)
            Reporter:
            Patrick Concannon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: