# HG changeset patch # User chegar # Date 1529496297 -3600 # Node ID e51f528c5fb8b28e7d6964d357e400899504aaba # Parent e550e715c4d3c57215cbd9ba5ca6cdb55e22c498 http-client-branch: review comment - consistent use of status line in exception messages diff -r e550e715c4d3 -r e51f528c5fb8 src/java.net.http/share/classes/jdk/internal/net/http/Http1HeaderParser.java --- a/src/java.net.http/share/classes/jdk/internal/net/http/Http1HeaderParser.java Wed Jun 20 12:20:29 2018 +0100 +++ b/src/java.net.http/share/classes/jdk/internal/net/http/Http1HeaderParser.java Wed Jun 20 13:04:57 2018 +0100 @@ -182,7 +182,7 @@ private void readStatusLineFeed(ByteBuffer input) throws ProtocolException { char c = state == State.STATUS_LINE_FOUND_LF ? LF : (char)input.get(); if (c != LF) { - throw protocolException("Bad trailing char, \"%s\", when parsing status-line, \"%s\"", + throw protocolException("Bad trailing char, \"%s\", when parsing status line, \"%s\"", c, sb.toString()); } @@ -222,7 +222,7 @@ privateMap = null; state = State.FINISHED; // no headers } else { - throw protocolException("Unexpected \"%s\", after status-line CR", c); + throw protocolException("Unexpected \"%s\", after status line CR", c); } }