Bug Report
Current Behavior
When passing a non-existing key to DelegateJsonObject#remove a NullPointerException will be thrown, because DelegateJsonValue#wrap does not allow null values as input.
Input Code
Input Code
@Override
public JsonValue remove(String key) {
JsonNode value = ((ObjectNode) node).remove(key);
return wrap(value);
}
Expected behavior/code
When passing a non-existing key to DelegateJsonObject#remove, null should be returned.
Environment
- Lettuce version(s): 6.8.0.RELEASE and up
- Redis version: any
Possible Solution
Guard the the call to DelegateJsonValue#wrap with a null check.
Additional context
N/A