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