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

stddoclet: javadoc exceptions should give default text for @throws

XMLWordPrintable

      Name: nt126004 Date: 09/06/2002

      FULL PRODUCT VERSION :
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-root-020219-20:07)
      Java HotSpot(TM) Client VM (build 1.3.1, mixed mode)

      FULL OPERATING SYSTEM VERSION : N/A


      A DESCRIPTION OF THE PROBLEM :
      Being able to inherit @throws text in an overiding method is cool.
      But with many exceptions the text could be standard. For example,
      RemoteException usually simply signals a remote communications
      failure, and most methods don't have a more specific reason to
      throw it. This means that a standard @throws clause could apply
      to almost all uses of RemoteException. This is true for many
      others, at least in many uses, including InterruptedException,
      IOException, ClassNotFoundException, etc.

      There should be some way to "inherit" (really "copy") some standard
      text for an exception into ones @throws clause. Maybe you could
      just use the first (summary) sentence of the exception's class
      decscription. Or the first paragraph.

      This would also really benefit from being able to treat generated
      doc from others (like the JDK itself) as input to other runs of
      layered products. Then I could "inherit" this stuff from the JDK
      when writing my own javadoc.

      Alternatively (but less usefully), having some way to specify
      default text for @throws clauses in my own packages (possibly in
      some config file or top level package.html or something) would save
      me a lot of copy/paste/oops/copy/paste-most-places/oops cycles.


      REPRODUCIBILITY :
      This bug can be reproduced always.
      (Review ID: 158555)
      ======================================================================

            ksrini Kumar Srinivasan
            nthompsosunw Nathanael Thompson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: