aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2018-09-25 14:11:23 +0900
committerMatthias Sohn <matthias.sohn@sap.com>2019-06-17 07:48:34 +0200
commit6d0168a4147226453cb1add5c278018d4603fcc4 (patch)
treec2a75c077a91d97aa194d37abb4229ee556eb6a7 /org.eclipse.jgit
parentf6c989665ed768022c4058c227c54685d268237d (diff)
downloadjgit-6d0168a4147226453cb1add5c278018d4603fcc4.tar.gz
jgit-6d0168a4147226453cb1add5c278018d4603fcc4.zip
Make inner classes static where possible
As reported by Error Prone: An inner class should be static unless it references members of its enclosing class. An inner class that is made non-static unnecessarily uses more memory and does not make the intent of the class clear. See https://errorprone.info/bugpattern/ClassCanBeStatic Change-Id: Ib99d120532630dba63cf400cc1c61c318286fc41 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> (cherry picked from commit ee40efcea44bc0c9a28afe29a80c87636947484e)
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
index 70695880d3..964cc4d120 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
@@ -207,7 +207,7 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
}
/** An entry in the old PackBitmapIndex. */
- public final class Entry extends ObjectId {
+ public static final class Entry extends ObjectId {
private final int flags;
Entry(AnyObjectId src, int flags) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
index 5cd593ed5e..fc3ea8467a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java
@@ -823,7 +823,7 @@ public abstract class RefUpdate {
* Handle the abstraction of storing a ref update. This is because both
* updating and deleting of a ref have merge testing in common.
*/
- private abstract class Store {
+ private static abstract class Store {
abstract Result execute(Result status) throws IOException;
}
}