8320577: Improve MessageHeader's toString() function to make HttpURLConnection's debug log readable

Reviewed-by: dfuchs, jpai
This commit is contained in:
Oliver Lockwood 2023-11-22 18:25:44 +00:00 committed by Daniel Fuchs
parent 572b14ac86
commit aac4318431

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 1995, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1995, 2023, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -554,7 +554,7 @@ class MessageHeader {
}
public synchronized String toString() {
String result = super.toString() + nkeys + " pairs: ";
String result = super.toString() + " " + nkeys + " pairs: ";
for (int i = 0; i < keys.length && i < nkeys; i++) {
result += "{"+keys[i]+": "+values[i]+"}";
}