HBASE-25626 Possible Resource Leak in HeterogeneousRegionCountCostFunction
Signed-off-by Anoop Sam John <anoopsamjohn@apache.org> Signed-off-by shahrs87 <shahrs87@gmail.com>
This commit is contained in:
parent
c90d122653
commit
4546163d90
|
@ -224,11 +224,14 @@ public class HeterogeneousRegionCountCostFunction extends StochasticLoadBalancer
|
|||
|
||||
private List<String> readLines(BufferedReader reader) throws IOException {
|
||||
final List<String> records = new ArrayList<>();
|
||||
try {
|
||||
String line;
|
||||
while ((line = reader.readLine()) != null) {
|
||||
records.add(line);
|
||||
}
|
||||
} finally {
|
||||
reader.close();
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue