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

DatagramPacket ctor throws IllegalArgumentExc instead of SocketException

XMLWordPrintable

    • hopper
    • sparc
    • solaris_2.6
    • Verified



      Name: asR10047 Date: 04/04/2002


      As specified by the javadoc:

      public DatagramPacket(byte[] buf,
                            int length,
                            SocketAddress address)
                     throws SocketException
      [...]
      Throws:
           SocketException - if address type is not supported


      But in the current implementation SocketException could not be gained
      in any condition. In place of SocketException IllegalArgumentException
      raises with words "unsupported address type" that is apparently bogus.

      This bug has been discovered during JCK test development for a new
      API in Merlin. The corresponding test will locate at :
      api/java_net/DatagramPacket/descriptions.html#SocketAddress[DatagramPacket2008]
      once integrated.

      ======================================================================

            jccollet Jean-Christophe Collet (Inactive)
            anssunw Ans Ans (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: