Skip to content

Commit

Permalink
Merge pull request #599 from nicolas-f/fixnpe
Browse files Browse the repository at this point in the history
avoid NPE if no description in wps, about #597
  • Loading branch information
pierromond authored Jul 31, 2023
2 parents 0952392 + b07dc32 commit 61a7776
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ public static void main(String... args) throws Exception {
((Map) shell.getVariable("inputs")).forEach((key, value) -> {
Map<String, Object> optionAttributes = ((Map)value);
Option customOption = new Option(key.toString(),
optionAttributes.get("type") != Boolean.class, optionAttributes.get("description").toString().replaceAll("<[^>]*>", ""));
optionAttributes.get("type") != Boolean.class,
optionAttributes.getOrDefault("description", "").
toString().replaceAll("<[^>]*>", ""));
customOption.setType((Class)optionAttributes.get("type"));
customOption.setArgs(1);
customOption.setArgName(optionAttributes.get("name").toString());
Expand Down

0 comments on commit 61a7776

Please sign in to comment.