Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
2.12.1
-
None
-
None
Description
The `jira-report` goal throws a NullPointerException when the resolution JsonNode has no "name" attribute.
At Commons BCEL we had some tickets that were created from external issues. The priority field was set to an enum in [P0, P1, P2, P3, P4, P5]. See for example BCEL-4. This field did not use the standard [Major, Minor, etc] and may have been a custom field. (The details of how these tickets were created is unknown.) The "standard" priority field was missing and the data downloaded by the RestJiraDownloader had no "name" attribute for this node. Thus the NPE from this line:
// Note: val is not null here issue.setPriority( val.get( "name" ).asText() );
Patching the latest maven-changes-plugin to print all these offending tickets allowed them to be identified and corrected by adding a "standard" priority. In the example mentioned (BCEL-4) there are still two priority fields in the ticket.
Note that when the missing priority was ignored the Jira report completed successfully.
The solution is either:
- Patch the RestJiraDownloader to be robust to this field missing the expected data
- Label as not-a-bug because this field is mandatory and BCEL has somehow created invalid Jira tickets in the past
Attachments
Issue Links
- duplicates
-
MCHANGES-309 RestJiraDownloader does not handle explicit JSON null values
- Closed
- is related to
-
MCHANGES-309 RestJiraDownloader does not handle explicit JSON null values
- Closed