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

(spec) BufferedWriter.write(String, int, int) IndexOutOfBoundsException

XMLWordPrintable

      Spec to BufferedWriter.write(String, int, int) says:
      "If the value of the len parameter is negative then no characters are written. This is contrary to the specification of this method in the superclass, which requires that an IndexOutOfBoundsException be thrown."
      But it says nothing about other cases when IndexOutOfBoundsException will be thrown: if off is negative, or len is negative, or off+len is negative or greater than the length of the given string - including Throws part where IndexOutOfBoundsException is not mentioned.

            prappo Pavel Rappo (Inactive)
            evotchen Elena Votchennikova (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: