]> source.dussan.org Git - jgit.git/commitdiff
Declare essentially static methods as static 58/9258/4
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 15 Dec 2012 10:57:04 +0000 (11:57 +0100)
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>
Thu, 27 Dec 2012 17:08:06 +0000 (12:08 -0500)
Change-Id: I83ca25fb569c0dbc36eb374d5437fcf2b65a6f68

54 files changed:
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/FileResolverTest.java
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/ProtocolErrorTest.java
org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IPZillaQuery.java
org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogGenerator.java
org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/IpLogMeta.java
org.eclipse.jgit.iplog/src/org/eclipse/jgit/iplog/SimpleCookieManager.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/HugeFileTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandWithRebaseTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/fnmatch/FileNameMatcherTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/ignore/IgnoreMatcherTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/T0002_TreeTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/FileSnapshotTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackFileTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/PackWriterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RefUpdateTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/ReflogReaderTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/RepositorySetupWorkDirTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/UnpackedObjectTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/storage/file/WindowCacheGetTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BundleWriterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PackParserTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/TreeWalkBasicDiffTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/IndexDiffFilterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringGitPathStyleTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_ParsePersonIdentTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefListTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefMapTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RelativeDateFormatterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/EolCanonicalizingInputStreamTest.java
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtCredentialsProvider.java

index 38a3ec2f15c7fa4dee2a366b6ab2756b62a570f2..df876ba436897e33ea9b5784ae1a4e378870c424 100644 (file)
@@ -104,7 +104,7 @@ public class DefaultReceivePackFactory implements
                throw new ServiceNotAuthorizedException();
        }
 
-       private ReceivePack createFor(final HttpServletRequest req,
+       private static ReceivePack createFor(final HttpServletRequest req,
                        final Repository db, final String user) {
                final ReceivePack rp = new ReceivePack(db);
                rp.setRefLogIdent(toPersonIdent(req, user));
index cafb9590e1d15f536ae735cc33ebfbb93e7d3a4d..8d0ba964c6983f2ef9e83673220ee0cdb6e0ef1f 100644 (file)
@@ -81,7 +81,7 @@ public class FileResolverTest extends LocalDiskRepositoryTestCase {
                        assertUnreasonable("C:/windows");
        }
 
-       private void assertUnreasonable(String name)
+       private static void assertUnreasonable(String name)
                        throws ServiceNotEnabledException {
                FileResolver<RepositoryResolver> r = new FileResolver<RepositoryResolver>(
                                new File("."), false);
index 22b1025cc82fce6880243ea89ae64097875153c0..b62ed7fabe3e4a705259ec80856b0042e00bea12 100644 (file)
@@ -176,7 +176,7 @@ public class ProtocolErrorTest extends HttpTestCase {
                }
        }
 
-       private void packHeader(ByteArrayOutputStream tinyPack, int cnt)
+       private static void packHeader(ByteArrayOutputStream tinyPack, int cnt)
                        throws IOException {
                final byte[] hdr = new byte[8];
                NB.encodeInt32(hdr, 0, 2);
index b8db84a89cde6cc96109e1f9d8c7472c7c08a879..23fdf68a895052c25cc57bff4d4fa71c660fb112 100644 (file)
@@ -156,7 +156,7 @@ class IPZillaQuery {
                }
        }
 
-       private BufferedReader reader(HttpURLConnection conn)
+       private static BufferedReader reader(HttpURLConnection conn)
                        throws UnsupportedEncodingException, IOException {
                String encoding = conn.getContentEncoding();
                InputStream in = conn.getInputStream();
@@ -206,7 +206,7 @@ class IPZillaQuery {
                }
        }
 
-       private String readFully(HttpURLConnection c) throws IOException {
+       private static String readFully(HttpURLConnection c) throws IOException {
                String enc = c.getContentEncoding();
                Reader reader;
                if (enc != null) {
@@ -240,7 +240,7 @@ class IPZillaQuery {
                return c;
        }
 
-       private void setCookie(URL url, String name, String value)
+       private static void setCookie(URL url, String name, String value)
                        throws IOException {
                Map<String, List<String>> cols = new HashMap<String, List<String>>();
                cols.put("Set-Cookie", Collections.singletonList(name + "=" + value));
@@ -253,7 +253,7 @@ class IPZillaQuery {
                }
        }
 
-       private CQ parseOneCQ(Map<String, String> row) {
+       private static CQ parseOneCQ(Map<String, String> row) {
                long id = Long.parseLong(row.get("bug_id"));
                String state = row.get("bug_severity");
                String bug_status = row.get("bug_status");
index 06d5393ca7e36bd8296516bf94de12b65bc2a2db..eea8a688ef03444b47547e0d73723c5c40f6618d 100644 (file)
@@ -273,7 +273,7 @@ public class IpLogGenerator {
                }
        }
 
-       private Date parseDate(SimpleDateFormat dt, String value)
+       private static Date parseDate(SimpleDateFormat dt, String value)
                        throws IOException {
                if ("NULL".equals(value) || "".equals(value) || value == null)
                        return null;
@@ -524,7 +524,7 @@ public class IpLogGenerator {
                return project;
        }
 
-       private void populateProjectType(Project p, Element project) {
+       private static void populateProjectType(Project p, Element project) {
                required(project, "id", p.getID());
                required(project, "name", p.getName());
                optional(project, "comments", p.getComments());
@@ -557,7 +557,7 @@ public class IpLogGenerator {
                return r;
        }
 
-       private String mapCQState(String state) {
+       private static String mapCQState(String state) {
                // "approved" CQs shall be listed as "active" in the iplog
                if (state.equals("approved"))
                        return "active";
@@ -602,13 +602,13 @@ public class IpLogGenerator {
                return doc.createElementNS(IPLOG_NS, IPLOG_PFX + name);
        }
 
-       private void required(Element r, String name, String value) {
+       private static void required(Element r, String name, String value) {
                if (value == null)
                        value = "";
                r.setAttribute(name, value);
        }
 
-       private void optional(Element r, String name, String value) {
+       private static void optional(Element r, String name, String value) {
                if (value != null && value.length() > 0)
                        r.setAttribute(name, value);
        }
index ba10f6f24ee8aa17248a65f3bc064de797829a4e..c491d67cc90d2c749efd9889462777b4b63ca9cf 100644 (file)
@@ -142,7 +142,7 @@ public class IpLogMeta {
                reviewUrl = cfg.getString(S_REVIEW, null, K_URL);
        }
 
-       private List<Project> parseProjects(final Config cfg,
+       private static List<Project> parseProjects(final Config cfg,
                        final String sectionName) {
                final List<Project> dst = new ArrayList<Project>();
                for (String id : cfg.getSubsections(sectionName)) {
index dca6f15054272266868f3a0d279f004b06e98031..d6b3a36980f37e6e4737ba58093be05affe29174 100644 (file)
@@ -112,7 +112,7 @@ public class SimpleCookieManager extends CookieHandler {
                }
        }
 
-       private String hostOf(URI uri) {
+       private static String hostOf(URI uri) {
                StringBuilder key = new StringBuilder();
                key.append(uri.getScheme());
                key.append(':');
index 676698a8e29a75a20a1b7ab4f4071390fc6dbef9..1614c379e7508ee848b57716776ed5ed643cb3fe 100644 (file)
@@ -162,7 +162,7 @@ public abstract class LocalDiskRepositoryTestCase {
                mockSystemReader.setProperty(Constants.GIT_CEILING_DIRECTORIES_KEY, makePath(ceilings));
        }
 
-       private String makePath(List<?> objects) {
+       private static String makePath(List<?> objects) {
                final StringBuilder stringBuilder = new StringBuilder();
                for (Object object : objects) {
                        if (stringBuilder.length() > 0)
@@ -303,7 +303,7 @@ public abstract class LocalDiskRepositoryTestCase {
                toClose.add(r);
        }
 
-       private String createUniqueTestFolderPrefix() {
+       private static String createUniqueTestFolderPrefix() {
                return "test" + (System.currentTimeMillis() + "_" + (testCount++));
        }
 
index cc4852a2bd1243a6a1cb74526ecf449bfe85fc31..9c7570ef619a4373231189e81e4edf6e2224993a 100644 (file)
@@ -673,7 +673,7 @@ public class TestRepository<R extends Repository> {
                }
        }
 
-       private void prunePacked(ObjectDirectory odb) throws IOException {
+       private static void prunePacked(ObjectDirectory odb) throws IOException {
                for (PackFile p : odb.getPacks()) {
                        for (MutableEntry e : p)
                                FileUtils.delete(odb.fileFor(e.toObjectId()));
index e4bca2a4961879c17550da910ccd0bc3facead24..ad9a36db184007cfdcf8237fcced6e24313e3994 100644 (file)
@@ -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) {
index ddae66e72cb085c3fa305d63ce89ed1aef6f6f18..5406527a687f852021f74b54e4ec109deed8637d 100644 (file)
@@ -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
+}
index c75da9f89ba3ef061589adb1eef0dde850d9a991..8087efe7d4a729aeb8214e6e71d18c8e65273708 100644 (file)
@@ -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)
index 8239c96d4c920ddaaff747c632863ea6912aaa9c..ea3cac7225ff0f4f337ff7fb5bfe63f688b5393a 100644 (file)
@@ -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) {
index fa9fd6e68e4dbc5853ddbede3f0170cf7b922884..338929a1bac0985ad8b02724acccaac3a9814796 100644 (file)
@@ -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;
index e2da0d5fceb25ae73c97b318835e7abf3350521f..aa46ea114e434766672a1d184b64f84a89542ab3 100644 (file)
@@ -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;
 
index ab2027ce72185dda5d0540ab7d9db0ba1b67b0e1..f2377f160e8435a84d299b32a5bee04fa3528c1b 100644 (file)
@@ -697,7 +697,7 @@ public class AddCommandTest extends RepositoryTestCase {
                assertEquals(FileMode.EXECUTABLE_FILE, walk.getFileMode(0));
        }
 
-       private DirCacheEntry addEntryToBuilder(String path, File file,
+       private static DirCacheEntry addEntryToBuilder(String path, File file,
                        ObjectInserter newObjectInserter, DirCacheBuilder builder, int stage)
                        throws IOException {
                FileInputStream inputStream = new FileInputStream(file);
index 3c38edb86e5c0f63e6f0d04251997994691c7d4a..5513b446031ee35cae831f4e27e8090215c7a649 100644 (file)
@@ -178,7 +178,7 @@ public class ApplyCommandTest extends RepositoryTestCase {
                                b.getString(0, b.size(), false));
        }
 
-       private byte[] readFile(final String patchFile) throws IOException {
+       private static byte[] readFile(final String patchFile) throws IOException {
                final InputStream in = DiffFormatterReflowTest.class
                                .getResourceAsStream(patchFile);
                if (in == null) {
index 7e1c22cb7da71bd18252607397699a7fa389a3e8..fd726ba931a194678caff9e1463172031a946fb8 100644 (file)
@@ -55,7 +55,7 @@ import org.junit.Test;
  */
 public class BlameCommandTest extends RepositoryTestCase {
 
-       private String join(String... lines) {
+       private static String join(String... lines) {
                StringBuilder joined = new StringBuilder();
                for (String line : lines)
                        joined.append(line).append('\n');
index aa0018bc2a35757224bfdfa6c889ee6867aa1074..24ca21a97108703948fb0cc571ad194d63add03e 100644 (file)
@@ -1267,7 +1267,7 @@ public class CommitOnlyTest extends RepositoryTestCase {
                }
        }
 
-       private String expected_f3_head(final int state) {
+       private static String expected_f3_head(final int state) {
                switch (state) {
                case 0:
                case 1:
@@ -1280,7 +1280,7 @@ public class CommitOnlyTest extends RepositoryTestCase {
                return null;
        }
 
-       private String expected_f3_idx(final int state) {
+       private static String expected_f3_idx(final int state) {
                switch (state) {
                case 0:
                case 3:
@@ -1294,7 +1294,8 @@ public class CommitOnlyTest extends RepositoryTestCase {
                return null;
        }
 
-       private String getHead(final Git git, final String path) throws Exception {
+       static private String getHead(final Git git, final String path)
+                       throws Exception {
                try {
                        final Repository repo = git.getRepository();
                        final ObjectId headId = repo.resolve(Constants.HEAD + "^{commit}");
index 10b6ba48b3a3dbd9413147a98b67ad72f049bd8b..273b09ded8be8d66784fb08b2fb31cf4aa1f6cf2 100644 (file)
@@ -228,7 +228,7 @@ public class HugeFileTest extends RepositoryTestCase {
                assertEquals(0, status.getUntracked().size());
        }
 
-       private void assertCollectionEquals(Collection<?> asList,
+       private static void assertCollectionEquals(Collection<?> asList,
                        Collection<?> added) {
                assertEquals(asList.toString(), added.toString());
        }
index 21ac3ad4eb62feac06dc68929ead8c9a50accbe2..589845ef678803fbf8e9fd5e3efc24d304d531b8 100644 (file)
@@ -1328,17 +1328,17 @@ public class MergeCommandTest extends RepositoryTestCase {
                assertEquals(StatusCommandTest.set("file2"), stat.getConflicting());
        }
 
-       private void setExecutable(Git git, String path, boolean executable) {
+       private static void setExecutable(Git git, String path, boolean executable) {
                FS.DETECTED.setExecute(
                                new File(git.getRepository().getWorkTree(), path), executable);
        }
 
-       private boolean canExecute(Git git, String path) {
+       private static boolean canExecute(Git git, String path) {
                return FS.DETECTED.canExecute(new File(git.getRepository()
                                .getWorkTree(), path));
        }
 
-       private RevCommit addAllAndCommit(final Git git) throws Exception {
+       private static RevCommit addAllAndCommit(final Git git) throws Exception {
                git.add().addFilepattern(".").call();
                return git.commit().setMessage("message").call();
        }
index eaed8d8b8b74da17ff019046a611c8e7b3a53d27..53df6098007b5f52e82b52e0fce00bb229f43b21 100644 (file)
@@ -268,7 +268,8 @@ public class PullCommandTest extends RepositoryTestCase {
                assertFileContentsEqual(targetFile, "Hello world");
        }
 
-       private void writeToFile(File actFile, String string) throws IOException {
+       private static void writeToFile(File actFile, String string)
+                       throws IOException {
                FileOutputStream fos = null;
                try {
                        fos = new FileOutputStream(actFile);
@@ -280,7 +281,7 @@ public class PullCommandTest extends RepositoryTestCase {
                }
        }
 
-       private void assertFileContentsEqual(File actFile, String string)
+       private static void assertFileContentsEqual(File actFile, String string)
                        throws IOException {
                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                FileInputStream fis = null;
index 2f2faf8228f99d0dd2ce31d7a098ea5c9ab76107..6978136479c537bc4e536c03bab413294e585dd5 100644 (file)
@@ -340,7 +340,8 @@ public class PullCommandWithRebaseTest extends RepositoryTestCase {
                assertFileContentsEqual(targetFile, "Hello world");
        }
 
-       private void writeToFile(File actFile, String string) throws IOException {
+       private static void writeToFile(File actFile, String string)
+                       throws IOException {
                FileOutputStream fos = null;
                try {
                        fos = new FileOutputStream(actFile);
@@ -352,7 +353,7 @@ public class PullCommandWithRebaseTest extends RepositoryTestCase {
                }
        }
 
-       private void assertFileContentsEqual(File actFile, String string)
+       private static void assertFileContentsEqual(File actFile, String string)
                        throws IOException {
                ByteArrayOutputStream bos = new ByteArrayOutputStream();
                FileInputStream fis = null;
index efdaa7bd70924bb32537392f2f21796b05560622..4c98418492ff0f774f7fe34fd81449dfc9f882c8 100644 (file)
@@ -288,7 +288,8 @@ public class DiffFormatterTest extends RepositoryTestCase {
                assertEquals(expected.toString(), actual);
        }
 
-       private String makeDiffHeader(String pathA, String pathB, ObjectId aId,
+       private static String makeDiffHeader(String pathA, String pathB,
+                       ObjectId aId,
                        ObjectId bId) {
                String a = aId.abbreviate(8).name();
                String b = bId.abbreviate(8).name();
@@ -298,7 +299,7 @@ public class DiffFormatterTest extends RepositoryTestCase {
                                "+++ b/" + pathB + "\n";
        }
 
-       private String makeDiffHeaderModeChange(String pathA, String pathB,
+       private static String makeDiffHeaderModeChange(String pathA, String pathB,
                        ObjectId aId, ObjectId bId, String modeA, String modeB) {
                String a = aId.abbreviate(8).name();
                String b = bId.abbreviate(8).name();
index 36ebd6f22a82c01aa77c7add2ca1227670936148..53d672d7f388714e826da1726663cabfee384829 100644 (file)
@@ -227,11 +227,11 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase {
                assertEquals(intentToAdd, entry.isIntentToAdd());
        }
 
-       private File pathOf(final String name) {
+       private static File pathOf(final String name) {
                return JGitTestUtil.getTestResourceFile(name);
        }
 
-       private Map<String, CGitIndexRecord> readLsFiles() throws Exception {
+       private static Map<String, CGitIndexRecord> readLsFiles() throws Exception {
                final LinkedHashMap<String, CGitIndexRecord> r = new LinkedHashMap<String, CGitIndexRecord>();
                final BufferedReader br = new BufferedReader(new InputStreamReader(
                                new FileInputStream(pathOf("gitgit.lsfiles")), "UTF-8"));
@@ -247,7 +247,7 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase {
                return r;
        }
 
-       private Map<String, CGitLsTreeRecord> readLsTree() throws Exception {
+       private static Map<String, CGitLsTreeRecord> readLsTree() throws Exception {
                final LinkedHashMap<String, CGitLsTreeRecord> r = new LinkedHashMap<String, CGitLsTreeRecord>();
                final BufferedReader br = new BufferedReader(new InputStreamReader(
                                new FileInputStream(pathOf("gitgit.lstree")), "UTF-8"));
index 7ba7ca052af3c2ad270ec8a8170426fd15838946..225ce2a907771f09d435ee727b65adec39c60b07 100644 (file)
@@ -176,7 +176,7 @@ public class DirCacheEntryTest {
                copyMetaDataHelper(true);
        }
 
-       private void copyMetaDataHelper(final boolean keepStage) {
+       private static void copyMetaDataHelper(final boolean keepStage) {
                DirCacheEntry e = new DirCacheEntry("some/path", DirCacheEntry.STAGE_2);
                e.setAssumeValid(false);
                e.setCreationTime(2L);
index 13c8cbef59d3bde8099f6586d3c8cc426a1dd96d..ec0724406b72e39dacf01c2d315951f0514b7dae 100644 (file)
@@ -54,7 +54,7 @@ import org.junit.Test;
 
 public class FileNameMatcherTest {
 
-       private void assertMatch(final String pattern, final String input,
+       private static void assertMatch(final String pattern, final String input,
                        final boolean matchExpected, final boolean appendCanMatchExpected)
                        throws InvalidPatternException {
                final FileNameMatcher matcher = new FileNameMatcher(pattern, null);
@@ -63,7 +63,8 @@ public class FileNameMatcherTest {
                assertEquals(appendCanMatchExpected, matcher.canAppendMatch());
        }
 
-       private void assertFileNameMatch(final String pattern, final String input,
+       private static void assertFileNameMatch(final String pattern,
+                       final String input,
                        final char excludedCharacter, final boolean matchExpected,
                        final boolean appendCanMatchExpected)
                        throws InvalidPatternException {
index 7e771dc99332fff1eeaeb6d53f8ec06edc53b15c..d911efc1d1e05feb7bb5b90b479901bbdd946a76 100644 (file)
@@ -378,7 +378,7 @@ public class IgnoreMatcherTest {
         * @return
         *                        Result of {@link IgnoreRule#isMatch(String, boolean)}
         */
-       private boolean match(String pattern, String target) {
+       private static boolean match(String pattern, String target) {
                IgnoreRule r = new IgnoreRule(pattern);
                //If speed of this test is ever an issue, we can use a presetRule field
                //to avoid recompiling a pattern each time.
index 4895d3cf1a605456bf0747cc514febca6008eba6..63441bfe9032976c18006fafad4206b3f2929d2d 100644 (file)
@@ -144,7 +144,7 @@ public class BranchConfigTest {
                                branchConfig.getTrackingBranch());
        }
 
-       private Config parse(final String content) {
+       private static Config parse(final String content) {
                final Config c = new Config(null);
                try {
                        c.fromText(content);
index 63f9476d963b87701e1bfdb0271da52ee3443118..e67560929008ec512f2ddfa18586ecaccfc8607d 100644 (file)
@@ -465,17 +465,18 @@ public class ConfigTest {
                assertEquals(result, config.toText());
        }
 
-       private void assertReadLong(long exp) throws ConfigInvalidException {
+       private static void assertReadLong(long exp) throws ConfigInvalidException {
                assertReadLong(exp, String.valueOf(exp));
        }
 
-       private void assertReadLong(long exp, String act)
+       private static void assertReadLong(long exp, String act)
                        throws ConfigInvalidException {
                final Config c = parse("[s]\na = " + act + "\n");
                assertEquals(exp, c.getLong("s", null, "a", 0L));
        }
 
-       private Config parse(final String content) throws ConfigInvalidException {
+       private static Config parse(final String content)
+                       throws ConfigInvalidException {
                final Config c = new Config(null);
                c.fromText(content);
                return c;
index dd7d335c8164a822bc9b6a0892e51c1157094be6..dca34a0e16258174080052f0e82496967fdbbe7c 100644 (file)
@@ -61,7 +61,8 @@ public class T0002_TreeTest extends SampleDataRepositoryTestCase {
        private static final ObjectId SOME_FAKE_ID = ObjectId.fromString(
                        "0123456789abcdef0123456789abcdef01234567");
 
-       private int compareNamesUsingSpecialCompare(String a,String b) throws UnsupportedEncodingException {
+       private static int compareNamesUsingSpecialCompare(String a, String b)
+                       throws UnsupportedEncodingException {
                char lasta = '\0';
                byte[] abytes;
                if (a.length() > 0 && a.charAt(a.length()-1) == '/') {
index 8b4a5f4dbc1a33a6f799d99662935a6bce6be3d5..905f215f2c2abe0d2e108d6914c298dee61e10b9 100644 (file)
@@ -183,12 +183,13 @@ public class CherryPickTest extends RepositoryTestCase {
                assertFalse(tw.next());
        }
 
-       private void assertCorrectId(final DirCache treeT, final TreeWalk tw) {
+       private static void assertCorrectId(final DirCache treeT, final TreeWalk tw) {
                assertEquals(treeT.getEntry(tw.getPathString()).getObjectId(), tw
                                .getObjectId(0));
        }
 
-       private ObjectId commit(final ObjectInserter odi, final DirCache treeB,
+       private static ObjectId commit(final ObjectInserter odi,
+                       final DirCache treeB,
                        final ObjectId[] parentIds) throws Exception {
                final CommitBuilder c = new CommitBuilder();
                c.setTreeId(treeB.writeTree(odi));
index 81add84094b1200f800431bfe095926d6ab6988e..4f9c22eb1850beae1e66b0722599ddfb1db31e62 100644 (file)
@@ -373,12 +373,13 @@ public class SimpleMergeTest extends SampleDataRepositoryTestCase {
                assertFalse(merge);
        }
 
-       private void assertCorrectId(final DirCache treeT, final TreeWalk tw) {
+       private static void assertCorrectId(final DirCache treeT, final TreeWalk tw) {
                assertEquals(treeT.getEntry(tw.getPathString()).getObjectId(), tw
                                .getObjectId(0));
        }
 
-       private ObjectId commit(final ObjectInserter odi, final DirCache treeB,
+       private static ObjectId commit(final ObjectInserter odi,
+                       final DirCache treeB,
                        final ObjectId[] parentIds) throws Exception {
                final CommitBuilder c = new CommitBuilder();
                c.setTreeId(treeB.writeTree(odi));
index 99d8593847b1958d3d3ce9df5bb62a623a892e75..22fc4c70c847d429496719f7248d0e988aae0468 100644 (file)
@@ -68,7 +68,7 @@ public class FileSnapshotTest {
                FileUtils.delete(trash, FileUtils.RECURSIVE | FileUtils.SKIP_MISSING);
        }
 
-       private void waitNextSec(File f) {
+       private static void waitNextSec(File f) {
                long initialLastModified = f.lastModified();
                do {
                        f.setLastModified(System.currentTimeMillis());
@@ -144,7 +144,7 @@ public class FileSnapshotTest {
                return f;
        }
 
-       private void append(File f, byte b) throws IOException {
+       private static void append(File f, byte b) throws IOException {
                FileOutputStream os = new FileOutputStream(f, true);
                try {
                        os.write(b);
index ca46da2a628ca4f6fbd2279af18b93b782c040db..11082bd1f3ea22f6129328bdffdb71bc01ad9b88 100644 (file)
@@ -303,14 +303,14 @@ public class PackFileTest extends LocalDiskRepositoryTestCase {
                in.close();
        }
 
-       private byte[] clone(int first, byte[] base) {
+       private static byte[] clone(int first, byte[] base) {
                byte[] r = new byte[base.length];
                System.arraycopy(base, 1, r, 1, r.length - 1);
                r[0] = (byte) first;
                return r;
        }
 
-       private byte[] delta(byte[] base, byte[] dest) throws IOException {
+       private static byte[] delta(byte[] base, byte[] dest) throws IOException {
                ByteArrayOutputStream tmp = new ByteArrayOutputStream();
                DeltaEncoder de = new DeltaEncoder(tmp, base.length, dest.length);
                de.insert(dest, 0, 1);
@@ -318,7 +318,7 @@ public class PackFileTest extends LocalDiskRepositoryTestCase {
                return tmp.toByteArray();
        }
 
-       private void packHeader(TemporaryBuffer.Heap pack, int cnt)
+       private static void packHeader(TemporaryBuffer.Heap pack, int cnt)
                        throws IOException {
                final byte[] hdr = new byte[8];
                NB.encodeInt32(hdr, 0, 2);
@@ -327,7 +327,7 @@ public class PackFileTest extends LocalDiskRepositoryTestCase {
                pack.write(hdr, 0, 8);
        }
 
-       private void objectHeader(TemporaryBuffer.Heap pack, int type, int sz)
+       private static void objectHeader(TemporaryBuffer.Heap pack, int type, int sz)
                        throws IOException {
                byte[] buf = new byte[8];
                int nextLength = sz >>> 4;
@@ -342,7 +342,7 @@ public class PackFileTest extends LocalDiskRepositoryTestCase {
                pack.write(buf, 0, n);
        }
 
-       private void deflate(TemporaryBuffer.Heap pack, final byte[] content)
+       private static void deflate(TemporaryBuffer.Heap pack, final byte[] content)
                        throws IOException {
                final Deflater deflater = new Deflater();
                final byte[] buf = new byte[128];
@@ -356,7 +356,7 @@ public class PackFileTest extends LocalDiskRepositoryTestCase {
                deflater.end();
        }
 
-       private void digest(TemporaryBuffer.Heap buf) throws IOException {
+       private static void digest(TemporaryBuffer.Heap buf) throws IOException {
                MessageDigest md = Constants.newMessageDigest();
                md.update(buf.toByteArray());
                buf.write(md.digest());
index f262d01ea9e226795d18e41f92888c22f116e70d..b6932db596452509aae376b25693d1088117a76a 100644 (file)
@@ -479,7 +479,7 @@ public class PackWriterTest extends SampleDataRepositoryTestCase {
                                                contentB.getId()));
        }
 
-       private void assertContent(PackIndex pi, List<ObjectId> expected) {
+       private static void assertContent(PackIndex pi, List<ObjectId> expected) {
                assertEquals("Pack index has wrong size.", expected.size(),
                                pi.getObjectCount());
                for (int i = 0; i < pi.getObjectCount(); i++)
@@ -489,7 +489,7 @@ public class PackWriterTest extends SampleDataRepositoryTestCase {
                                        expected.contains(pi.getObjectId(i)));
        }
 
-       private PackIndex writePack(FileRepository repo,
+       private static PackIndex writePack(FileRepository repo,
                        Set<? extends ObjectId> want, Set<PackIndex> excludeObjects)
                        throws IOException {
                PackWriter pw = new PackWriter(repo);
index 8bc454a58cd5b95753cc6a543a90643bc0c0832b..0cce2cf255d2cf2f6fc67b886a6844e32456066f 100644 (file)
@@ -863,7 +863,7 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase {
                                "HEAD").getReverseEntries().get(0).getComment());
        }
 
-       private void writeReflog(Repository db, ObjectId newId, String msg,
+       private static void writeReflog(Repository db, ObjectId newId, String msg,
                        String refName) throws IOException {
                RefDirectory refs = (RefDirectory) db.getRefDatabase();
                RefDirectoryUpdate update = refs.newUpdate(refName, true);
index f3a6914beeefbb01e7d2ceac456cd981278b7522..8289fe46848fd5977a29bf6a254b117fd6b0cfc2 100644 (file)
@@ -110,7 +110,7 @@ public class ReflogReaderTest extends SampleDataRepositoryTestCase {
                                e.getComment());
        }
 
-       private String iso(PersonIdent id) {
+       private static String iso(PersonIdent id) {
                final SimpleDateFormat fmt;
                fmt = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
                fmt.setTimeZone(id.getTimeZone());
index f98ae495722b6d72d69108acf35e770109db937f..8aaeb497093e5c32ba4f1510aa0c7a80d83d9afc 100644 (file)
@@ -183,7 +183,7 @@ public class RepositorySetupWorkDirTest extends LocalDiskRepositoryTestCase {
                }
        }
 
-       private File getFile(String... pathComponents) throws IOException {
+       private static File getFile(String... pathComponents) throws IOException {
                String rootPath = new File(new File("target"), "trash").getPath();
                for (String pathComponent : pathComponents)
                        rootPath = rootPath + File.separatorChar + pathComponent;
@@ -192,7 +192,7 @@ public class RepositorySetupWorkDirTest extends LocalDiskRepositoryTestCase {
                return result;
        }
 
-       private void setBare(File gitDir, boolean bare) throws IOException,
+       private static void setBare(File gitDir, boolean bare) throws IOException,
                        ConfigInvalidException {
                FileBasedConfig cfg = configFor(gitDir);
                cfg.setBoolean(ConfigConstants.CONFIG_CORE_SECTION, null,
@@ -200,7 +200,8 @@ public class RepositorySetupWorkDirTest extends LocalDiskRepositoryTestCase {
                cfg.save();
        }
 
-       private void setWorkTree(File gitDir, File workTree) throws IOException,
+       private static void setWorkTree(File gitDir, File workTree)
+                       throws IOException,
                        ConfigInvalidException {
                String path = workTree.getAbsolutePath();
                FileBasedConfig cfg = configFor(gitDir);
@@ -209,7 +210,7 @@ public class RepositorySetupWorkDirTest extends LocalDiskRepositoryTestCase {
                cfg.save();
        }
 
-       private FileBasedConfig configFor(File gitDir) throws IOException,
+       private static FileBasedConfig configFor(File gitDir) throws IOException,
                        ConfigInvalidException {
                File configPath = new File(gitDir, Constants.CONFIG);
                FileBasedConfig cfg = new FileBasedConfig(configPath, FS.DETECTED);
@@ -217,14 +218,14 @@ public class RepositorySetupWorkDirTest extends LocalDiskRepositoryTestCase {
                return cfg;
        }
 
-       private void assertGitdirPath(Repository repo, String... expected)
+       private static void assertGitdirPath(Repository repo, String... expected)
                        throws IOException {
                File exp = getFile(expected).getCanonicalFile();
                File act = repo.getDirectory().getCanonicalFile();
                assertEquals("Wrong Git Directory", exp, act);
        }
 
-       private void assertWorkdirPath(Repository repo, String... expected)
+       private static void assertWorkdirPath(Repository repo, String... expected)
                        throws IOException {
                File exp = getFile(expected).getCanonicalFile();
                File act = repo.getWorkTree().getCanonicalFile();
index 71e58e1058759fa287b64b4ad6abe3de25d996e5..16580b49a0160cf0a0044ef4d8dbf2d4a928f0c6 100644 (file)
@@ -520,14 +520,14 @@ public class UnpackedObjectTest extends LocalDiskRepositoryTestCase {
                }
        }
 
-       private byte[] compressStandardFormat(int type, byte[] data)
+       private static byte[] compressStandardFormat(int type, byte[] data)
                        throws IOException {
                String typeString = Constants.typeString(type);
                String length = String.valueOf(data.length);
                return compressStandardFormat(typeString, length, data);
        }
 
-       private byte[] compressStandardFormat(String type, String length,
+       private static byte[] compressStandardFormat(String type, String length,
                        byte[] data) throws IOException {
                ByteArrayOutputStream out = new ByteArrayOutputStream();
                DeflaterOutputStream d = new DeflaterOutputStream(out);
@@ -540,7 +540,8 @@ public class UnpackedObjectTest extends LocalDiskRepositoryTestCase {
                return out.toByteArray();
        }
 
-       private byte[] compressPackFormat(int type, byte[] data) throws IOException {
+       private static byte[] compressPackFormat(int type, byte[] data)
+                       throws IOException {
                byte[] hdr = new byte[64];
                int rawLength = data.length;
                int nextLength = rawLength >>> 4;
index 88600cefe7c785c66baf33ed4abd23767ce8e857..54bdca9230eb83f747c7ff80ddc18ae7402df26c 100644 (file)
@@ -126,7 +126,7 @@ public class WindowCacheGetTest extends SampleDataRepositoryTestCase {
                checkLimits(cfg);
        }
 
-       private void checkLimits(final WindowCacheConfig cfg) {
+       private static void checkLimits(final WindowCacheConfig cfg) {
                final WindowCache cache = WindowCache.getInstance();
                assertTrue(cache.getOpenFiles() <= cfg.getPackedGitOpenFiles());
                assertTrue(cache.getOpenBytes() <= cfg.getPackedGitLimit());
index 332d802cbc3e7ac4000f7dfc94a62d8cfa40dba6..236f0ee0592705b8cd304f07096f21b6f8d1abb4 100644 (file)
@@ -140,7 +140,7 @@ public class BundleWriterTest extends SampleDataRepositoryTestCase {
                }
        }
 
-       private FetchResult fetchFromBundle(final Repository newRepo,
+       private static FetchResult fetchFromBundle(final Repository newRepo,
                        final byte[] bundle) throws URISyntaxException,
                        NotSupportedException, TransportException {
                final URIish uri = new URIish("in-memory://");
index 9cf01a98e58ad717be3fbc273fce79ece1b47ac7..bacdb3d91f96c2c2192e13594b141da79a886fe0 100644 (file)
@@ -452,7 +452,7 @@ public class PackParserTest extends RepositoryTestCase {
                assertEquals(0x7e, in.read());
        }
 
-       private void packHeader(TemporaryBuffer.Heap tinyPack, int cnt)
+       private static void packHeader(TemporaryBuffer.Heap tinyPack, int cnt)
                        throws IOException {
                final byte[] hdr = new byte[8];
                NB.encodeInt32(hdr, 0, 2);
@@ -462,7 +462,8 @@ public class PackParserTest extends RepositoryTestCase {
                tinyPack.write(hdr, 0, 8);
        }
 
-       private void deflate(TemporaryBuffer.Heap tinyPack, final byte[] content)
+       private static void deflate(TemporaryBuffer.Heap tinyPack,
+                       final byte[] content)
                        throws IOException {
                final Deflater deflater = new Deflater();
                final byte[] buf = new byte[128];
@@ -475,7 +476,7 @@ public class PackParserTest extends RepositoryTestCase {
                } while (!deflater.finished());
        }
 
-       private void digest(TemporaryBuffer.Heap buf) throws IOException {
+       private static void digest(TemporaryBuffer.Heap buf) throws IOException {
                MessageDigest md = Constants.newMessageDigest();
                md.update(buf.toByteArray());
                buf.write(md.digest());
index 9e52bcaa5f95736d1d7cf38ab1b036e1c16f4dcc..8c3ce6196bb23e0b5bb155bd44839e80ee158b48 100644 (file)
@@ -283,7 +283,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                assertSame(PacketLineIn.END, r.readString());
        }
 
-       private void receive(final ReceivePack rp,
+       private static void receive(final ReceivePack rp,
                        final TemporaryBuffer.Heap inBuf, final TemporaryBuffer.Heap outBuf)
                        throws IOException {
                rp.receive(new ByteArrayInputStream(inBuf.toByteArray()), outBuf, null);
@@ -490,7 +490,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                assertSame(PacketLineIn.END, r.readString());
        }
 
-       private void packHeader(TemporaryBuffer.Heap tinyPack, int cnt)
+       private static void packHeader(TemporaryBuffer.Heap tinyPack, int cnt)
                        throws IOException {
                final byte[] hdr = new byte[8];
                NB.encodeInt32(hdr, 0, 2);
@@ -500,7 +500,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                tinyPack.write(hdr, 0, 8);
        }
 
-       private void copy(TemporaryBuffer.Heap tinyPack, ObjectLoader ldr)
+       private static void copy(TemporaryBuffer.Heap tinyPack, ObjectLoader ldr)
                        throws IOException {
                final byte[] buf = new byte[64];
                final byte[] content = ldr.getCachedBytes();
@@ -519,7 +519,8 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                deflate(tinyPack, content);
        }
 
-       private void deflate(TemporaryBuffer.Heap tinyPack, final byte[] content)
+       private static void deflate(TemporaryBuffer.Heap tinyPack,
+                       final byte[] content)
                        throws IOException {
                final Deflater deflater = new Deflater();
                final byte[] buf = new byte[128];
@@ -532,7 +533,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                } while (!deflater.finished());
        }
 
-       private void digest(TemporaryBuffer.Heap buf) throws IOException {
+       private static void digest(TemporaryBuffer.Heap buf) throws IOException {
                MessageDigest md = Constants.newMessageDigest();
                md.update(buf.toByteArray());
                buf.write(md.digest());
index a06149e844826956ea849914103ed6fe004887c0..bf22569dfbc9295938b50bc8c2850a0f8d7d0492 100644 (file)
@@ -462,7 +462,7 @@ public class FileTreeIteratorTest extends RepositoryTestCase {
                assertFalse(tw.next());
        }
 
-       private void assertEntry(String sha1string, String path, TreeWalk tw)
+       private static void assertEntry(String sha1string, String path, TreeWalk tw)
                        throws MissingObjectException, IncorrectObjectTypeException,
                        CorruptObjectException, IOException {
                assertTrue(tw.next());
index 78d8c6b77370230b80b82c7723b81d034260affd..edec6b04787f6630d36188d31db16127398350fe 100644 (file)
@@ -58,6 +58,7 @@ import org.eclipse.jgit.lib.Tree;
 import org.eclipse.jgit.treewalk.filter.TreeFilter;
 import org.junit.Test;
 
+@SuppressWarnings("deprecation")
 public class TreeWalkBasicDiffTest extends RepositoryTestCase {
        @Test
        public void testMissingSubtree_DetectFileAdded_FileModified()
index 4c103c83dac4d0a7995f9c5f286d0c1e76a35a2a..ee33c29eba48980a11d7e92ef05721151a4520ff 100644 (file)
@@ -619,7 +619,7 @@ public class IndexDiffFilterTest extends RepositoryTestCase {
                return treeWalk;
        }
 
-       private void assertPaths(TreeWalk treeWalk, String... paths)
+       private static void assertPaths(TreeWalk treeWalk, String... paths)
                        throws Exception {
                for (int i = 0; i < paths.length; i++) {
                        assertTrue(treeWalk.next());
@@ -628,7 +628,7 @@ public class IndexDiffFilterTest extends RepositoryTestCase {
                assertFalse(treeWalk.next());
        }
 
-       private void assertPath(String path, String... paths) {
+       private static void assertPath(String path, String... paths) {
                for (String p : paths)
                        if (p.equals(path))
                                return;
index 670fbaf2722bee998822c3b83e972a3930c60cf5..cc73c70c5892eca5f7b80f80872073e72d5ff656 100644 (file)
@@ -157,7 +157,7 @@ public class QuotedStringGitPathStyleTest {
                }
        }
 
-       private String octalEscape(int i) {
+       private static String octalEscape(int i) {
                String s = Integer.toOctalString(i);
                while (s.length() < 3) {
                        s = "0" + s;
index df5eb4bd4e94643a90b593329fa8c38b1029ec14..ed62680271ad9c7569320842d2b14a99c46ec8b6 100644 (file)
@@ -137,7 +137,7 @@ public class RawParseUtils_ParsePersonIdentTest {
                assertPersonIdent("Me <me@example.com 1234567890 -0700", null);
        }
 
-       private void assertPersonIdent(String line, PersonIdent expected) {
+       private static void assertPersonIdent(String line, PersonIdent expected) {
                PersonIdent actual = RawParseUtils.parsePersonIdent(line);
                assertEquals(expected, actual);
        }
index f11c30b65b086fa253a86b328115686565d64cc5..4b7ab26f491071ecb6c38a7d4c7082c07dcac296 100644 (file)
@@ -450,7 +450,7 @@ public class RefListTest {
                assertSame(REF_B, two.get(0));
        }
 
-       private RefList<Ref> toList(Ref... refs) {
+       private static RefList<Ref> toList(Ref... refs) {
                RefList.Builder<Ref> b = new RefList.Builder<Ref>(refs.length);
                b.addAll(refs, 0, refs.length);
                return b.toRefList();
index b43fe48be56791010edd4d75f8944eb863f7ff49..78ab27a851c28b536bfd11ab07d085d016e1e8ed 100644 (file)
@@ -480,7 +480,7 @@ public class RefMapTest {
                assertEquals(1, map.size());
        }
 
-       private RefList<Ref> toList(Ref... refs) {
+       private static RefList<Ref> toList(Ref... refs) {
                RefList.Builder<Ref> b = new RefList.Builder<Ref>(refs.length);
                b.addAll(refs, 0, refs.length);
                return b.toRefList();
index 84b35b4dcdca1f6e5e149bac05f9457be08d4147..0bf78f390086d71f3b819509c11324f0e7854144 100644 (file)
@@ -63,7 +63,7 @@ public class RelativeDateFormatterTest {
                SystemReader.setInstance(new MockSystemReader());
        }
 
-       private void assertFormat(long ageFromNow, long timeUnit,
+       private static void assertFormat(long ageFromNow, long timeUnit,
                        String expectedFormat) {
                Date d = new Date(SystemReader.getInstance().getCurrentTime()
                                - ageFromNow * timeUnit);
index bd1524563bbcae92bc32ebc1dc455076b4c2dac1..ed2a4f21027b18204fe24bfcb665ac0e28ea7697 100644 (file)
@@ -94,7 +94,8 @@ public class EolCanonicalizingInputStreamTest {
                test(asBytes("1\r\n2\r\n3\0"), asBytes("1\n2\n3\0"), false);
        }
 
-       private void test(byte[] input, byte[] expected, boolean detectBinary) throws IOException {
+       private static void test(byte[] input, byte[] expected,
+                       boolean detectBinary) throws IOException {
                final InputStream bis1 = new ByteArrayInputStream(input);
                final InputStream cis1 = new EolCanonicalizingInputStream(bis1, detectBinary);
                int index1 = 0;
index 0e6f78ab49a6af7700b2f2d7c5b331b77cd35140..fd26bfa7f9acd2772393660ec27f673d6558949f 100644 (file)
@@ -135,7 +135,7 @@ public class AwtCredentialsProvider extends CredentialsProvider {
                }
        }
 
-       private boolean interactive(URIish uri, CredentialItem[] items) {
+       private static boolean interactive(URIish uri, CredentialItem[] items) {
                final GridBagConstraints gbc = new GridBagConstraints(0, 0, 1, 1, 1, 1,
                                GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
                                new Insets(0, 0, 0, 0), 0, 0);