mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-26 19:15:09 +00:00
Set hex value to null if value is null
Retain internal consistency in the code. Since value is set to null if it is an empty string, it makes sense to set valueHex to null if value is null. Co-authored-by: Basil Crow <me@basilcrow.com>
This commit is contained in:
1 parent
fd2f7e817b
commit
89bca6705f
1 file changed
+1
-1
@@ -43,7 +43,7 @@ public class URICheckEncodingMonitor extends AdministrativeMonitor {
|
||||
|
||||
if (!expected.equals(value)) {
|
||||
String expectedHex = Util.toHexString(expected.getBytes(StandardCharsets.UTF_8));
|
||||
String valueHex = value != null ? Util.toHexString(value.getBytes(StandardCharsets.UTF_8)) : "<empty string>";
|
||||
String valueHex = value != null ? Util.toHexString(value.getBytes(StandardCharsets.UTF_8)) : null;
|
||||
LOGGER.log(Level.CONFIG, "Expected to receive: " + expected + " (" + expectedHex + ") but got: " + value + " (" + valueHex + ")");
|
||||
return FormValidation.warningWithMarkup(hudson.model.Messages.Hudson_NotUsesUTF8ToDecodeURL());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user