Skip to content

Commit

Permalink
Se corrige exception en el servicio de validación de XML, donde inten…
Browse files Browse the repository at this point in the history
…taba tomar un string de un campo null.
  • Loading branch information
JuanGamezSW committed Sep 6, 2019
1 parent f90488e commit 6ee80b8
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public IResponse sendRequest(IRequest request) throws GeneralException, AuthExce
JSONArray detail = new JSONArray(detailNode.get("detail").toString());
for (int j = 0; j < detail.length (); j++) {
JSONObject detaildata = new JSONObject(detail.get(j).toString());
DetailData nuevo = new DetailData(detaildata.getString("message"),detaildata.getString("messageDetail"),String.valueOf(detaildata.getInt("type")));
String message = detaildata.isNull("message") ? "" : detaildata.getString("message");
String messageDetail = detaildata.isNull("messageDetail") ? "" : detaildata.getString("messageDetail");
DetailData nuevo = new DetailData(message, messageDetail, String.valueOf(detaildata.getInt("type")));
ListItem.add(nuevo);
}
DetailNode x = new DetailNode(detailNode.getString("section"),ListItem);
Expand Down

0 comments on commit 6ee80b8

Please sign in to comment.