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

StringBuffer methods do not inherit @throws from AbstractStringBuilder

    • b59
    • generic
    • generic

      String{Buffer,Builder} extend the package-private class AbstractStringBuilder
      which contains all of the javadoc for this method. It appears that the Tiger introduction of AbstractSTringBuilder has inadvertently removed the @throws
      for some pre-Tiger methods (e.g. charAt, subSequence, substring, insert, etc...) since they aren't inherited.

      Our local standard doclet expert has determined that the standard doclet is
      behaving as specified based on this statement in the javadoc reference guide:

          When a @throws tag for a particular exception is missing, the @throws
          tag is copied only if that exception is declared.

      Assuming that this behaviour has existed prior to Tiger, the documentation
      of StringBuffer should be updated.

      I'll add the @throws explicitly to the javadoc in String{Buffer,Builder}.append(CharSequence, int, int) as part of the fix for bug 5067406.

      For historical purposes, note that these exceptions were documented
      (or possibly implied) in these ccc requests:

        StringBuffer:
          4812591: StringBuffer needs append(CharSequence)
          http://ccc.sfbay/4812591

        StringBuffer:
          4261803: Need an unsynchronized StringBuffer
          http://ccc/4261803

      -- iag@sfbay 2004-07-13

            mmcclosksunw Michael Mccloskey (Inactive)
            iris Iris Clark
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: