Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8356154

Respecify java.net.Socket constructors that allow creating UDP sockets to throw IllegalArgumentException

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 25
    • None
    • core-libs
    • b22

      java.net.Socket defines two constructors with a stream parameter that can be specified as "false" to create a datagram socket. These 2 constructors were deprecated for removal in Java 23 https://bugs.openjdk.org/browse/JDK-8216984. The plan is to remove these constructors in a future release. Before removing those constructors, in order to allow for applications to more prominently notice this deprecation, these constructors can be respecified to throw an IllegalArgumentException when the stream parameter is passed a value of false.

            jpai Jaikiran Pai
            jpai Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: