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

Clarify the behavior of how methods fail

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • None
    • core-libs
    • None

      It would be helpful to add clarifying text describing the error behavior of methods that look up or return types and elements.

      In particular, it would be good to have a strong recommendation that errors due to external issues (as compared to errors in the implementation!) should generally not cause implementation-specific exceptions or overly broad standard unchecked throwable types, like Error or RuntimeException. Instead, suitably synthesized objects should be returned, that can be checked to determine whether they are "valid" or "erroneous".

            darcy Joe Darcy
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: