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

Clarify the behavior of how methods fail

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      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".

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: