Skip to content

Commit

Permalink
8320577: Improve MessageHeader's toString() function to make HttpURLC…
Browse files Browse the repository at this point in the history
…onnection's debug log readable

Reviewed-by: dfuchs, jpai
  • Loading branch information
oliverlockwood authored and dfuch committed Nov 22, 2023
1 parent 572b14a commit aac4318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/java.base/share/classes/sun/net/www/MessageHeader.java
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -554,7 +554,7 @@ public void mergeHeader(InputStream is) throws java.io.IOException {
}

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]+"}";
}
Expand Down

1 comment on commit aac4318

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.