Browse Source

Make sure a Stream is closed upon errors in IpLogGenerator

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
stable-0.9
Robin Rosenberg 15 years ago
parent
commit
e7c9db836b
  1. 4
      org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java

4
org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java

@ -236,6 +236,7 @@ public class IpLogGenerator {
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 @@ public class IpLogGenerator {
who.addActiveRange(new ActiveRange(begin, end));
committersByEmail.put(email, who);
}
} finally {
br.close();
}
}
private Date parseDate(SimpleDateFormat dt, String value)

Loading…
Cancel
Save