Browse Source

Replace use of deprecated release() method in BlameResult

Change-Id: Ic555e6e0443337aed694bc6445a60abe08e07ad2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
stable-4.1
Matthias Sohn 10 years ago
parent
commit
48622e0ec2
  1. 8
      org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java

8
org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java

@ -85,7 +85,7 @@ public class BlameResult {
String path = gen.getResultPath(); String path = gen.getResultPath();
RawText contents = gen.getResultContents(); RawText contents = gen.getResultContents();
if (contents == null) { if (contents == null) {
gen.release(); gen.close();
return null; return null;
} }
return new BlameResult(gen, path, contents); return new BlameResult(gen, path, contents);
@ -239,7 +239,7 @@ public class BlameResult {
while (gen.next()) while (gen.next())
loadFrom(gen); loadFrom(gen);
} finally { } finally {
gen.release(); gen.close();
generator = null; generator = null;
} }
} }
@ -265,7 +265,7 @@ public class BlameResult {
lastLength = gen.getRegionLength(); lastLength = gen.getRegionLength();
return gen.getResultStart(); return gen.getResultStart();
} else { } else {
gen.release(); gen.close();
generator = null; generator = null;
return -1; return -1;
} }
@ -300,7 +300,7 @@ public class BlameResult {
return; return;
if (!gen.next()) { if (!gen.next()) {
gen.release(); gen.close();
generator = null; generator = null;
return; return;
} }

Loading…
Cancel
Save