HttpClientTests: Open OutputStream in try-with-resource
Change-Id: Ib690b0af6d562765f43ad54d3855200a17eaa90b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
parent
3f8b9cb5fa
commit
3151bc33ea
|
@ -419,12 +419,12 @@ public void testV2HttpSubsequentResponse() throws Exception {
|
|||
// properly. Tests for other commands go in
|
||||
// UploadPackTest.java.
|
||||
|
||||
OutputStream os = c.getOutputStream();
|
||||
try (OutputStream os = c.getOutputStream()) {
|
||||
PacketLineOut pckOut = new PacketLineOut(os);
|
||||
pckOut.writeString("command=ls-refs");
|
||||
pckOut.writeDelim();
|
||||
pckOut.end();
|
||||
os.close();
|
||||
}
|
||||
|
||||
PacketLineIn pckIn = new PacketLineIn(c.getInputStream());
|
||||
|
||||
|
|
Loading…
Reference in New Issue