Change-Id: Ib690b0af6d562765f43ad54d3855200a17eaa90b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
// properly. Tests for other commands go in
// UploadPackTest.java.
- OutputStream os = c.getOutputStream();
- PacketLineOut pckOut = new PacketLineOut(os);
- pckOut.writeString("command=ls-refs");
- pckOut.writeDelim();
- pckOut.end();
- os.close();
+ try (OutputStream os = c.getOutputStream()) {
+ PacketLineOut pckOut = new PacketLineOut(os);
+ pckOut.writeString("command=ls-refs");
+ pckOut.writeDelim();
+ pckOut.end();
+ }
PacketLineIn pckIn = new PacketLineIn(c.getInputStream());