-
Suggestion
-
Resolution: Unresolved
-
None
-
None
-
1
-
Problem Definition
We're coming across multiple {{NullPointerException}}s in Assets Import process assembler due to the code not being fully null-safe.
Example:
JSDSERVER-154632024-03-13 05:21:33,109+0000 insight-InsightThreadGroup-worker-thread-1814 ERROR jiraadmin [c.r.j.p.i.s.analytics.service.ImportExportAnalyticsServiceImpl] Could not publish import result analytics java.lang.NullPointerException at com.riadalabs.jira.plugins.insight.services.analytics.service.ImportExportAnalyticsServiceImpl.publishImportFinishedEvent(ImportExportAnalyticsServiceImpl.java:41) at com.riadalabs.jira.plugins.insight.services.imports.common.DefaultImportService.finishProgress(DefaultImportService.java:1733) at com.riadalabs.jira.plugins.insight.services.imports.common.DefaultImportService.doImportFromSource(DefaultImportService.java:873)
- JSDSERVER-15678:
2024-11-14 06:41:12,176+0000 http-nio-8080-exec-24 url: /jsm/rest/insight/1.0/progress/result/objectschema/2; user: admin ERROR admin 401x759x1 p8bdnl 172.29.187.89,172.50.0.3 /rest/insight/1.0/progress/result/objectschema/2 [c.r.j.p.i.c.w.a.r.exception.mapper.DefaultMapper] Unexpected exception was thrown while processing the request java.lang.NullPointerException: Cannot invoke "java.util.Date.toInstant()" because the return value of "com.riadalabs.jira.plugins.insight.services.imports.common.ImportResult.getStarted()" is null at com.riadalabs.jira.plugins.insight.channel.web.api.rest.transformation.RestBeanAssemblerImpl.assembleImportResultEntry(RestBeanAssemblerImpl.java:599) at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.progress.ProgressAssemblerInJira.assembleResultEntry(ProgressAssemblerInJira.java:42) at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.progress.ProgressAssemblerBase.assembleProgressResultEntries(ProgressAssemblerBase.java:58) at com.riadalabs.jira.plugins.insight.channel.web.api.rest.services.progress.ProgressResource.getAllProgressResultForObjectSchema(ProgressResource.java:341)
And potentially more to come.
Suggested Solution
- Introduce null tests
- Introduce null-safety to handle such NPEs more gracefully
- causes
-
JSDSERVER-15678 NullPointerException in Assets Import process assembler - "com.riadalabs.jira.plugins.insight.services.imports.common.ImportResult.getStarted() is null"
- Short Term Backlog
- mentioned in
-
Page Loading...