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

Optional extra exception checking by javac

XMLWordPrintable

    • sparc
    • solaris_2.4

      From ###@###.### Thu Nov 2 03:41:09 1995
      From: Doug Lea <###@###.###>
      To: ###@###.###
      Subject: javac suggestion (was: I want to shoot myself!!!!!!!!!!!!!!!!!!)


      Even if you do choose to use RunTimeExceptions, you can/should still list
      them in the throws clauses of method declarations to advertise to
      class users that they can be thrown. (I do this in my
      collections package (http://g.oswego.edu/dl/classes/collections/)).

      It would be nice if there were javac compiler option that reports the
      declared exceptions that could be generated yet aren't required to be
      caught (i.e., RunTimeExceptions) to help people decide whether they
      want to catch them anyway and/or take other evasive action. I believe
      that this would have to be limited to declared exceptions of nominal
      classes since javac cannot possibly know all of the RunTimeExceptions
      that could be thrown by all possible subclasses. But more often than
      not, this would still be useful enough to help class users better deal
      with the sometimes-subtle distinctions that lead class writers to
      declare RunTime vs other exceptions.

      PS Why is javadoc not included in the JDK-beta-1.0 (sparc version at least)?
         (The script is in bin/, but the code is not in bin/sun4/ or classes/.)
         Can the prebeta version be spliced into the beta bin/sun4 and classes
         directories?

      --
      Doug Lea | ###@###.### | ###@###.### | 315-341-2688 | FAX 315-341-5424
      Computer Science Dept, SUNY Oswego, Oswego, NY 13126 | http://g.oswego.edu/dl/
      Also: Software Eng. Lab, NY CASE Center, Syracuse Univ, Syracuse NY 13244
      -
      This message was sent to the java-interest mailing list
      Info: send 'help' to ###@###.###

            dstoutamsunw David Stoutamire (Inactive)
            ahoffsunw Arthur Hoff (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: