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

(sctp) SctpStandardSocketOptions.InitMaxStreams.create throws IAE when passed 65536

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 7
    • core-libs
    • Cause Known
    • generic
    • generic

      com.sun.nio.sctp.SctpStandardSocketOptions.InitMaxStreams.create(int,int) is specified to throw IAE if either argument is greater than 65536. IAE is incorrectly thrown when passed 65536 for either argument. (65536 -1) is ok.

      Exception in thread "main" java.lang.IllegalArgumentException: Invalid maxOutStreams value
              at com.sun.nio.sctp.SctpStandardSocketOptions$InitMaxStreams.create(SctpStandardSocketOptions.java:346)
              at Test.main(Test.java:34)

      *** Simple test source ***
      public class Test {
          public static void main(String[] args) {
             com.sun.nio.sctp.SctpStandardSocketOptions.InitMaxStreams.create(65536, 65536);
          }
      }

            chegar Chris Hegarty
            chegar Chris Hegarty
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: