Skip to content

Commit

Permalink
RCM-119: Fix NPE on CohortReportFormController.onSubmit (#47)
Browse files Browse the repository at this point in the history
* Fix NPE on CohortReportFormController.onSubmit

* conform to conventions
  • Loading branch information
mherman22 authored Jan 3, 2024
1 parent 5d36876 commit e9a9b20
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,11 @@ protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse
Document xml = db.parse(new InputSource(new StringReader(
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>" + data)));
Node node = findChild(xml, "reportSchema");

if (node == null) {
return null;
}

node = findChild(node, "dataSets");
Element dsd = xml.createElement("dataSetDefinition");
dsd.setAttribute("name", "cohorts");
Expand Down

0 comments on commit e9a9b20

Please sign in to comment.