Commit c7188803 authored by Johnny Lim's avatar Johnny Lim Committed by Stephane Nicoll

Handle null early in Sanitizer.sanitize()

Closes gh-10806
parent 43586382
......@@ -79,9 +79,12 @@ class Sanitizer {
* @return the potentially sanitized value
*/
public Object sanitize(String key, Object value) {
if (value == null) {
return null;
}
for (Pattern pattern : this.keysToSanitize) {
if (pattern.matcher(key).matches()) {
return (value == null ? null : "******");
return "******";
}
}
return value;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment