Skip to content

Commit 5dcaf6c

Browse files
izeyejaikiran
authored andcommitted
8297749: Remove duplicate space in the ProtocolException message being thrown from HttpURLConnection
Reviewed-by: dfuchs, jpai
1 parent c7a679f commit 5dcaf6c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1999,8 +1999,8 @@ private InputStream getInputStream0() throws IOException {
19991999
return inputStream;
20002000
} while (redirects < maxRedirects);
20012001

2002-
throw new ProtocolException("Server redirected too many " +
2003-
" times ("+ redirects + ")");
2002+
throw new ProtocolException("Server redirected too many times (" +
2003+
redirects + ")");
20042004
} catch (RuntimeException e) {
20052005
disconnectInternal();
20062006
rememberedException = e;

test/jdk/sun/net/www/protocol/http/NTLMTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ static void runClient(Proxy proxy, int serverPort) {
7070
uc.getInputStream().readAllBytes();
7171

7272
} catch (ProtocolException e) {
73-
/* java.net.ProtocolException: Server redirected too many times (20) */
73+
/* java.net.ProtocolException: Server redirected too many times (20) */
7474
throw new RuntimeException("Failed: ProtocolException", e);
7575
} catch (IOException ioe) {
7676
/* IOException is OK. We are expecting "java.io.IOException: Server

0 commit comments

Comments
 (0)