summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm/src/org
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2012-12-15 11:57:04 +0100
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2012-12-27 12:08:06 -0500
commita57dd1c1649cb85a2d47690bcea8a6acdc68ce35 (patch)
tree6c846d6dd1ebe008d4eb41650a5e98d4dfbbc30f /org.eclipse.jgit.pgm/src/org
parent04bc9b3ddcaa8f1535d90a2f712706c6c5597cd4 (diff)
downloadjgit-a57dd1c1649cb85a2d47690bcea8a6acdc68ce35.tar.gz
jgit-a57dd1c1649cb85a2d47690bcea8a6acdc68ce35.zip
Declare essentially static methods as static
Change-Id: I83ca25fb569c0dbc36eb374d5437fcf2b65a6f68
Diffstat (limited to 'org.eclipse.jgit.pgm/src/org')
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java5
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java3
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java3
6 files changed, 11 insertions, 8 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
index e4bca2a496..ad9a36db18 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
@@ -128,7 +128,8 @@ abstract class AbstractFetchCommand extends TextBuiltin {
writer.flush();
}
- private String longTypeOf(ObjectReader reader, final TrackingRefUpdate u) {
+ private static String longTypeOf(ObjectReader reader,
+ final TrackingRefUpdate u) {
final RefUpdate.Result r = u.getResult();
if (r == RefUpdate.Result.LOCK_FAILURE)
return "[lock fail]";
@@ -164,7 +165,7 @@ abstract class AbstractFetchCommand extends TextBuiltin {
return "[" + r.name() + "]"; //$NON-NLS-1$//$NON-NLS-2$
}
- private String safeAbbreviate(ObjectReader reader, ObjectId id) {
+ private static String safeAbbreviate(ObjectReader reader, ObjectId id) {
try {
return reader.abbreviate(id).name();
} catch (IOException cannotAbbreviate) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
index ddae66e72c..5406527a68 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
@@ -150,7 +150,7 @@ class Clone extends AbstractFetchCommand {
return r;
}
- private Ref guessHEAD(final FetchResult result) {
+ private static Ref guessHEAD(final FetchResult result) {
final Ref idHEAD = result.getAdvertisedRef(Constants.HEAD);
final List<Ref> availableRefs = new ArrayList<Ref>();
Ref head = null;
@@ -201,4 +201,4 @@ class Clone extends AbstractFetchCommand {
}
return commit;
}
-} \ No newline at end of file
+}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
index c75da9f89b..8087efe7d4 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
@@ -155,7 +155,8 @@ class Daemon extends TextBuiltin {
outw.println(MessageFormat.format(CLIText.get().listeningOn, d.getAddress()));
}
- private DaemonService service(final org.eclipse.jgit.transport.Daemon d,
+ private static DaemonService service(
+ final org.eclipse.jgit.transport.Daemon d,
final String n) {
final DaemonService svc = d.getService(n);
if (svc == null)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
index 8239c96d4c..ea3cac7225 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
@@ -241,7 +241,7 @@ class Push extends TextBuiltin {
}
}
- private String safeAbbreviate(ObjectReader reader, ObjectId id) {
+ private static String safeAbbreviate(ObjectReader reader, ObjectId id) {
try {
return reader.abbreviate(id).name();
} catch (IOException cannotAbbreviate) {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
index fa9fd6e68e..338929a1ba 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
@@ -90,7 +90,7 @@ class ShowPackDelta extends TextBuiltin {
outw.println(BinaryDelta.format(delta));
}
- private byte[] getDelta(ObjectReader reader, RevObject obj)
+ private static byte[] getDelta(ObjectReader reader, RevObject obj)
throws IOException, MissingObjectException,
StoredObjectRepresentationNotAvailableException {
ObjectReuseAsIs asis = (ObjectReuseAsIs) reader;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
index e2da0d5fce..aa46ea114e 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
@@ -369,7 +369,8 @@ class TextHashFunctions extends TextBuiltin {
outw.flush();
}
- private void testOne(Function fun, RawText txt, int[] elements, int cnt) {
+ private static void testOne(Function fun, RawText txt, int[] elements,
+ int cnt) {
final Hash cmp = fun.hash;
final Fold fold = fun.fold;