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

StringBuffer methods do not inherit @throws from AbstractStringBuilder

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b59
    • CPU:
      generic
    • OS:
      generic

      Description

      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

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: