JDK-8190053 : Clarify the behavior of how methods fail
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2017-10-25
  • Updated: 2017-10-25
  • Resolved: 2017-10-25
Related Reports
Duplicate :  
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".