HBASE-18754 (addendum) close the input resource
This commit is contained in:
parent
dd70cc3081
commit
2e6481386b
|
@ -199,8 +199,9 @@ public abstract class TimeRangeTracker {
|
|||
ProtobufUtil.mergeFrom(builder, data, pblen, data.length - pblen);
|
||||
return TimeRangeTracker.create(type, builder.getFrom(), builder.getTo());
|
||||
} else {
|
||||
DataInputStream in = new DataInputStream(new ByteArrayInputStream(data));
|
||||
return TimeRangeTracker.create(type, in.readLong(), in.readLong());
|
||||
try (DataInputStream in = new DataInputStream(new ByteArrayInputStream(data))) {
|
||||
return TimeRangeTracker.create(type, in.readLong(), in.readLong());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue