Bug 458378 - Check should be able to deal with npe in check, ignore, issue, passthrough
Summary: Check should be able to deal with npe in check, ignore, issue, passthrough
Status: CLOSED WONTFIX
Alias: None
Product: Sphinx
Classification: Automotive
Component: Core (show other bugs)
Version: 0.9.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-26 03:40 EST by Andreas Graf CLA
Modified: 2024-05-07 00:27 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Graf CLA 2015-01-26 03:40:58 EST
When writing checks on models, we often have to write code to check for null values. (E.g. if(x.getY() != null && x.getY().getZ())

That is quite annoying and boilerplate. The idea for this extension would be to add some default exception handling around the @Check-Methods that can be configured.

The idea is:

* Default is no exception handling
* We could then add an additional @Check parameter to specify how we would like the framework to deal with NPE:

* Ignore: Ignore any NPE thrown by Check
* Info/Warning/Error: Add an issue with the specified severity, informing the user about the NPE.

Then we could really reduce the Null-Checking within the Check mdethods.
Comment 1 Balazs Grill CLA 2024-05-07 00:27:06 EDT
Closed stale issue before migration