Skip to content

Commit

Permalink
review comment fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
joseph-neeraj committed Apr 15, 2024
1 parent 8993045 commit 265773d
Showing 1 changed file with 0 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ static Object readJsonObject(DocumentContext context, String jsonPathString) {
return jsonElement;
}

// Upgrading the json-path lib from 2.6.0 to 2.9.0 introduced a bug where when you
// try to delete a non-existent key in a DocumentContext with the SUPPRESS_EXCEPTIONS flag,
// it would throw a ClassCastException. This method is a workaround for the issue.
// Once this issue is fixed this method's usages can be replaced with a simple DocumentContext.delete(path).
// Track the issue here https://github.com/json-path/JsonPath/issues/870
static void deleteIfExists(DocumentContext context, String jsonPathString){
Object value = context.read(jsonPathString);
if(value != null){
Expand Down

0 comments on commit 265773d

Please sign in to comment.