Skip to content

Commit 75c1e99

Browse files
stsypanovjaikiran
authored andcommitted
8289572: InputStream wrapping with BufferedInputStream is redundant in HttpTimestamper
Reviewed-by: jpai, mullan
1 parent 7841e5c commit 75c1e99

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/java.base/share/classes/sun/security/timestamp/HttpTimestamper.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -25,13 +25,14 @@
2525

2626
package sun.security.timestamp;
2727

28-
import java.io.BufferedInputStream;
2928
import java.io.DataOutputStream;
3029
import java.io.EOFException;
3130
import java.io.IOException;
3231
import java.net.URI;
3332
import java.net.HttpURLConnection;
34-
import java.util.*;
33+
import java.util.List;
34+
import java.util.Map;
35+
import java.util.Set;
3536

3637
import sun.security.util.Debug;
3738

@@ -123,7 +124,7 @@ public TSResponse generateTimestamp(TSRequest tsQuery) throws IOException {
123124

124125
// Receive the reply
125126
byte[] replyBuffer = null;
126-
try (var input = new BufferedInputStream(connection.getInputStream())) {
127+
try (var input = connection.getInputStream()) {
127128
if (debug != null) {
128129
String header = connection.getHeaderField(0);
129130
debug.println(header);

0 commit comments

Comments
 (0)