JDK-8190054 : Provide guidance on handling of erroneous program constructs
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2017-10-25
  • Updated: 2023-08-30
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
The javax.lang.model APIs are used in situations where the program constructs being modeled are ill-formed in some way.

Besides the detailed guidance in the package documentation for javax.lang.model.elements on handling erroneous cases in annotation processing, a more encompassing statement in javax.lang.model would be helpful too. For example, a statement that an error object of some form should be returned rather than an exception being thrown.