diff options
author | Robin Rosenberg <robin.rosenberg@dewire.com> | 2012-12-15 11:57:04 +0100 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2012-12-27 12:08:06 -0500 |
commit | a57dd1c1649cb85a2d47690bcea8a6acdc68ce35 (patch) | |
tree | 6c846d6dd1ebe008d4eb41650a5e98d4dfbbc30f /org.eclipse.jgit.test/tst/org/eclipse/jgit/api | |
parent | 04bc9b3ddcaa8f1535d90a2f712706c6c5597cd4 (diff) | |
download | jgit-a57dd1c1649cb85a2d47690bcea8a6acdc68ce35.tar.gz jgit-a57dd1c1649cb85a2d47690bcea8a6acdc68ce35.zip |
Declare essentially static methods as static
Change-Id: I83ca25fb569c0dbc36eb374d5437fcf2b65a6f68
Diffstat (limited to 'org.eclipse.jgit.test/tst/org/eclipse/jgit/api')
8 files changed, 17 insertions, 14 deletions
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java index ab2027ce72..f2377f160e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/AddCommandTest.java @@ -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); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java index 3c38edb86e..5513b44603 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/ApplyCommandTest.java @@ -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) { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java index 7e1c22cb7d..fd726ba931 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/BlameCommandTest.java @@ -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'); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java index aa0018bc2a..24ca21a971 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java @@ -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}"); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/HugeFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/HugeFileTest.java index 10b6ba48b3..273b09ded8 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/HugeFileTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/HugeFileTest.java @@ -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()); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java index 21ac3ad4eb..589845ef67 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/MergeCommandTest.java @@ -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(); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java index eaed8d8b8b..53df609800 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandTest.java @@ -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; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandWithRebaseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandWithRebaseTest.java index 2f2faf8228..6978136479 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandWithRebaseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PullCommandWithRebaseTest.java @@ -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; |