Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8218228 The constructor StringBuffer(CharSequence) violates spec for negatively sized argument
  3. JDK-8218884

Release Note: StringBuffer(CharSequence) and StringBuilder(CharSequence) Throw NegativeArraySizeException for Negatively Sized Argument

XMLWordPrintable

    • Verified

      The behavior of `StringBuffer(CharSequence)` and `StringBuilder(CharSequence)` is changed for the argument reporting a negative length. The constructors were inconsistently throwing either `NegativeArraySizeException` or `IndexOutOfBoundException`. The new behavior is to always throw `NegativeArraySizeException` for any argument reporting a negative length.

            igerasim Ivan Gerasimov
            igerasim Ivan Gerasimov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: