Skip to content

Commit

Permalink
Fix #41. access on meta-data changed. It is not allowed to access not…
Browse files Browse the repository at this point in the history
… existing values (except a default value is used). Sadly there is none for a map. So we simply check if the key "wiremock-gui" exists first. Then we can continue with the old approach.
  • Loading branch information
holomekc committed Sep 24, 2023
1 parent 0db5aac commit 8e5b056
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@ private boolean hasFolderDefinition(final StubMapping mapping) {
if (metadata == null) {
return false;
}
return metadata.getMap(WIREMOCK_GUI_KEY) != null
&& metadata.getMap(WIREMOCK_GUI_KEY).get(DIR_KEY) != null
&& metadata.getMap(WIREMOCK_GUI_KEY).get(DIR_KEY) instanceof String;

return metadata.containsKey(WIREMOCK_GUI_KEY)
&& metadata.getMap(WIREMOCK_GUI_KEY).get(DIR_KEY) != null
&& metadata.getMap(WIREMOCK_GUI_KEY).get(DIR_KEY) instanceof String;
}

private String getFolderDefinition(final StubMapping mapping) {
Expand Down

0 comments on commit 8e5b056

Please sign in to comment.