summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2015-04-11 00:21:39 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2015-05-21 02:05:45 +0200
commit686124bec32fcdee1545e7d9c312dcf0276b44af (patch)
treecd98b171d3b97de6972bf1f606f34d72eaf5fa12 /org.eclipse.jgit
parent0e73d395061d1bfee365acaa2f79c392175d13bf (diff)
downloadjgit-686124bec32fcdee1545e7d9c312dcf0276b44af.tar.gz
jgit-686124bec32fcdee1545e7d9c312dcf0276b44af.zip
Replace deprecated release() methods by close()
See the discussion [1] in the Gerrit mailing list. [1] https://groups.google.com/forum/#!topic/repo-discuss/RRQT_xCqz4o Change-Id: I2c67384309c5c2e8511a7d0d4e088b4e95f819ff Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java21
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java13
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java11
11 files changed, 10 insertions, 87 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
index a6d672e7f3..fa6fe75e64 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
@@ -937,14 +937,6 @@ public class BlameGenerator implements AutoCloseable {
}
/**
- * Release the current blame session. Use {@link #close()} instead.
- */
- @Deprecated
- public void release() {
- close();
- }
-
- /**
* Release the current blame session.
*
* @since 4.0
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
index b71e9902cc..bcc30c35b4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
@@ -381,14 +381,6 @@ public class DiffFormatter implements AutoCloseable {
}
/**
- * Release the internal ObjectReader state. Use {@link #close()} instead.
- */
- @Deprecated
- public void release() {
- close();
- }
-
- /**
* Release the internal ObjectReader state.
*
* @since 4.0
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java
index 578a3d6cd1..488eee9794 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java
@@ -216,7 +216,7 @@ public class DfsInserter extends ObjectInserter {
}
@Override
- public void release() {
+ public void close() {
if (packOut != null) {
try {
packOut.close();
@@ -600,7 +600,7 @@ public class DfsInserter extends ObjectInserter {
}
@Override
- public void release() {
+ public void close() {
ctx.close();
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
index f5f3375fa1..a7ab0bb4a3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
@@ -618,7 +618,7 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
/** Release the current window cursor. */
@Override
- public void release() {
+ public void close() {
last = null;
block = null;
baseCache = null;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
index eb87460d89..fb411722be 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
@@ -145,7 +145,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
}
@Override
- public void release() {
+ public void close() {
if (deflate != null) {
try {
deflate.end();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
index baaed846c1..8fac907270 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
@@ -1006,14 +1006,6 @@ public class PackWriter implements AutoCloseable {
}
/**
- * Release all resources used by this writer. Use {@link #close()} instead.
- */
- @Deprecated
- public void release() {
- close();
- }
-
- /**
* Release all resources used by this writer.
*
* @since 4.0
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
index f05326900c..5d892019ab 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
@@ -63,7 +63,7 @@ import org.eclipse.jgit.transport.PackParser;
* <p>
* Objects written by an inserter may not be immediately visible for reading
* after the insert method completes. Callers must invoke either
- * {@link #release()} or {@link #flush()} prior to updating references or
+ * {@link #close()} or {@link #flush()} prior to updating references or
* otherwise making the returned ObjectIds visible to other code.
*/
public abstract class ObjectInserter implements AutoCloseable {
@@ -91,7 +91,7 @@ public abstract class ObjectInserter implements AutoCloseable {
}
@Override
- public void release() {
+ public void close() {
// Do nothing.
}
}
@@ -149,8 +149,8 @@ public abstract class ObjectInserter implements AutoCloseable {
delegate().flush();
}
- public void release() {
- delegate().release();
+ public void close() {
+ delegate().close();
}
}
@@ -420,21 +420,10 @@ public abstract class ObjectInserter implements AutoCloseable {
* Release any resources used by this inserter.
* <p>
* An inserter that has been released can be used again, but may need to be
- * released after the subsequent usage. Use {@link #close()} instead
- */
- @Deprecated
- public abstract void release();
-
- /**
- * Release any resources used by this inserter.
- * <p>
- * An inserter that has been released can be used again, but may need to be
* released after the subsequent usage.
*
* @since 4.0
*/
@Override
- public void close() {
- release();
- }
+ public abstract void close();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
index f686c419a4..4c9af85fa8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
@@ -425,23 +425,12 @@ public abstract class ObjectReader implements AutoCloseable {
* Release any resources used by this reader.
* <p>
* A reader that has been released can be used again, but may need to be
- * released after the subsequent usage. Use {@link #close()} instead.
- */
- @Deprecated
- public void release() {
- // Do nothing.
- }
-
- /**
- * Release any resources used by this reader.
- * <p>
- * A reader that has been released can be used again, but may need to be
* released after the subsequent usage.
*
* @since 4.0
*/
@Override
public void close() {
- release();
+ // Do nothing.
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
index d1009abae9..afb208ecf9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
@@ -245,17 +245,6 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
* Release any resources used by this walker's reader.
* <p>
* A walker that has been released can be used again, but may need to be
- * released after the subsequent usage. Use {@link #close()} instead.
- */
- @Deprecated
- public void release() {
- close();
- }
-
- /**
- * Release any resources used by this walker's reader.
- * <p>
- * A walker that has been released can be used again, but may need to be
* released after the subsequent usage.
*
* @since 4.0
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java
index 40f1d22ed2..7d9bca0d1b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java
@@ -727,15 +727,6 @@ public class SubmoduleWalk implements AutoCloseable {
}
/**
- * Release any resources used by this walker's reader. Use {@link #close()}
- * instead.
- */
- @Deprecated
- public void release() {
- close();
- }
-
- /**
* Release any resources used by this walker's reader.
*
* @since 4.0
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
index a4d2d7e796..06e828419d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
@@ -254,17 +254,6 @@ public class TreeWalk implements AutoCloseable {
* Release any resources used by this walker's reader.
* <p>
* A walker that has been released can be used again, but may need to be
- * released after the subsequent usage. Use {@link #close()} instead.
- */
- @Deprecated
- public void release() {
- close();
- }
-
- /**
- * Release any resources used by this walker's reader.
- * <p>
- * A walker that has been released can be used again, but may need to be
* released after the subsequent usage.
*
* @since 4.0