8297749: Remove duplicate space in the ProtocolException message being thrown from HttpURLConnection

Reviewed-by: dfuchs, jpai
This commit is contained in:
Johnny Lim 2022-11-30 06:15:07 +00:00 committed by Jaikiran Pai
parent c7a679fbdd
commit 5dcaf6cc6c
2 changed files with 3 additions and 3 deletions

View file

@ -1999,8 +1999,8 @@ public class HttpURLConnection extends java.net.HttpURLConnection {
return inputStream; return inputStream;
} while (redirects < maxRedirects); } while (redirects < maxRedirects);
throw new ProtocolException("Server redirected too many " + throw new ProtocolException("Server redirected too many times (" +
" times ("+ redirects + ")"); redirects + ")");
} catch (RuntimeException e) { } catch (RuntimeException e) {
disconnectInternal(); disconnectInternal();
rememberedException = e; rememberedException = e;

View file

@ -70,7 +70,7 @@ public class NTLMTest
uc.getInputStream().readAllBytes(); uc.getInputStream().readAllBytes();
} catch (ProtocolException e) { } catch (ProtocolException e) {
/* java.net.ProtocolException: Server redirected too many times (20) */ /* java.net.ProtocolException: Server redirected too many times (20) */
throw new RuntimeException("Failed: ProtocolException", e); throw new RuntimeException("Failed: ProtocolException", e);
} catch (IOException ioe) { } catch (IOException ioe) {
/* IOException is OK. We are expecting "java.io.IOException: Server /* IOException is OK. We are expecting "java.io.IOException: Server