Skip to content

Commit

Permalink
TRUNK-3567 Add Observation without Question Concept throws NullPointe…
Browse files Browse the repository at this point in the history
…rException

TRUNK-3567 Add Observation without Question Concept throws NullPointerException

Applying auto format changes
  • Loading branch information
apien authored and wluyima committed May 3, 2013
1 parent cc853a9 commit 98c22c0
Showing 1 changed file with 5 additions and 4 deletions.
Expand Up @@ -106,8 +106,7 @@ protected void onBind(HttpServletRequest request, Object command) throws Excepti
obs.setValueCoded(obs.getValueCodedName().getConcept());
}

// Set the complex obs value before we validate. See TRUNK-3353
if (obs.getConcept().isComplex()) {
if (obs.getConcept() != null && obs.getConcept().isComplex()) {
InputStream complexDataInputStream = setComplexData(obs, request);
if (complexDataInputStream != null) {
complexDataInputStream.close();
Expand Down Expand Up @@ -180,10 +179,12 @@ else if (request.getParameter("unvoidObs") != null) {
httpSession.setAttribute(WebConstants.OPENMRS_MSG_ATTR, "Obs.unvoidedSuccessfully");
}

} catch (IllegalArgumentException e) {
}
catch (IllegalArgumentException e) {
errors.reject("invalidImage", "Obs.invalidImage");
return showForm(request, response, errors);
} catch (APIException e) {
}
catch (APIException e) {
httpSession.setAttribute(WebConstants.OPENMRS_ERROR_ATTR, e.getMessage());
return showForm(request, response, errors);
}
Expand Down

0 comments on commit 98c22c0

Please sign in to comment.