Make sure a Stream is closed upon errors in IpLogGenerator
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
This commit is contained in:
parent
f396326e0b
commit
e7c9db836b
|
@ -236,6 +236,7 @@ private void loadCommitters(Repository repo) throws IOException {
|
|||
SimpleDateFormat dt = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
File list = new File(repo.getDirectory(), "gerrit_committers");
|
||||
BufferedReader br = new BufferedReader(new FileReader(list));
|
||||
try {
|
||||
String line;
|
||||
|
||||
while ((line = br.readLine()) != null) {
|
||||
|
@ -267,6 +268,9 @@ private void loadCommitters(Repository repo) throws IOException {
|
|||
who.addActiveRange(new ActiveRange(begin, end));
|
||||
committersByEmail.put(email, who);
|
||||
}
|
||||
} finally {
|
||||
br.close();
|
||||
}
|
||||
}
|
||||
|
||||
private Date parseDate(SimpleDateFormat dt, String value)
|
||||
|
|
Loading…
Reference in New Issue