diff options
Diffstat (limited to 'org.eclipse.jgit.test')
56 files changed, 110 insertions, 110 deletions
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java index 3f9ef12507..f26952ea76 100644 --- a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java +++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java @@ -147,7 +147,7 @@ public class EGitPatchHistoryTest { assertTrue("Missed files in " + cid, files.isEmpty()); } - private static void dump(final byte[] buf) { + private static void dump(byte[] buf) { String str; try { str = new String(buf, 0, buf.length - 1, "ISO-8859-1"); 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 172807c43d..1dd329a9e7 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 @@ -64,7 +64,7 @@ public class ApplyCommandTest extends RepositoryTestCase { private RawText b; - private ApplyResult init(final String name) throws Exception { + private ApplyResult init(String name) throws Exception { return init(name, true, true); } @@ -273,7 +273,7 @@ public class ApplyCommandTest extends RepositoryTestCase { assertFalse(new File(db.getWorkTree(), "NonASCIIDel").exists()); } - private static byte[] readFile(final String patchFile) throws IOException { + private static byte[] readFile(String patchFile) throws IOException { final InputStream in = getTestResource(patchFile); if (in == null) { fail("No " + patchFile + " test vector"); @@ -291,7 +291,7 @@ public class ApplyCommandTest extends RepositoryTestCase { } } - private static InputStream getTestResource(final String patchFile) { + private static InputStream getTestResource(String patchFile) { return ApplyCommandTest.class.getClassLoader() .getResourceAsStream("org/eclipse/jgit/diff/" + patchFile); } 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 f37aa13d6d..7a1d222ca0 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 @@ -136,7 +136,7 @@ public class BlameCommandTest extends RepositoryTestCase { testRename("subdir/file1.txt", "otherdir/file1.txt"); } - private void testRename(final String sourcePath, final String destPath) + private void testRename(String sourcePath, String destPath) throws Exception { try (Git git = new Git(db)) { String[] content1 = new String[] { "a", "b", "c" }; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java index 354b9c6a6f..fbc2cf67e1 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CherryPickCommandTest.java @@ -338,7 +338,7 @@ public class CherryPickCommandTest extends RepositoryTestCase { } } - private RevCommit prepareCherryPick(final Git git) throws Exception { + private RevCommit prepareCherryPick(Git git) throws Exception { // create, add and commit file a writeTrashFile("a", "a"); git.add().addFilepattern("a").call(); 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 6f7df4bd84..9af003d424 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 @@ -1699,7 +1699,7 @@ public class MergeCommandTest extends RepositoryTestCase { .getWorkTree(), path)); } - private static RevCommit addAllAndCommit(final Git git) throws Exception { + private static RevCommit addAllAndCommit(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/PushCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java index e0c1499030..1af37e25f5 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java @@ -152,7 +152,7 @@ public class PushCommandTest extends RepositoryTestCase { } } - private File writeHookFile(final String name, final String data) + private File writeHookFile(String name, String data) throws IOException { File path = new File(db.getWorkTree() + "/.git/hooks/", name); JGitTestUtil.write(path, data); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java index ea631045cc..d77c4e131e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RevertCommandTest.java @@ -379,7 +379,7 @@ public class RevertCommandTest extends RepositoryTestCase { } } - private RevCommit prepareRevert(final Git git) throws Exception { + private RevCommit prepareRevert(Git git) throws Exception { // create, add and commit file a writeTrashFile("a", "a"); git.add().addFilepattern("a").call(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashCreateCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashCreateCommandTest.java index b9f9f5b499..3b582d714d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashCreateCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/StashCreateCommandTest.java @@ -94,7 +94,7 @@ public class StashCreateCommandTest extends RepositoryTestCase { untrackedFile = writeTrashFile("untracked.txt", "content"); } - private void validateStashedCommit(final RevCommit commit) + private void validateStashedCommit(RevCommit commit) throws IOException { validateStashedCommit(commit, 2); } @@ -140,7 +140,7 @@ public class StashCreateCommandTest extends RepositoryTestCase { return walk; } - private List<DiffEntry> diffWorkingAgainstHead(final RevCommit commit) + private List<DiffEntry> diffWorkingAgainstHead(RevCommit commit) throws IOException { try (TreeWalk walk = createTreeWalk()) { walk.addTree(commit.getParent(0).getTree()); @@ -149,7 +149,7 @@ public class StashCreateCommandTest extends RepositoryTestCase { } } - private List<DiffEntry> diffIndexAgainstHead(final RevCommit commit) + private List<DiffEntry> diffIndexAgainstHead(RevCommit commit) throws IOException { try (TreeWalk walk = createTreeWalk()) { walk.addTree(commit.getParent(0).getTree()); @@ -158,7 +158,7 @@ public class StashCreateCommandTest extends RepositoryTestCase { } } - private List<DiffEntry> diffIndexAgainstWorking(final RevCommit commit) + private List<DiffEntry> diffIndexAgainstWorking(RevCommit commit) throws IOException { try (TreeWalk walk = createTreeWalk()) { walk.addTree(commit.getParent(1).getTree()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterReflowTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterReflowTest.java index 49e5d1b3d4..0e344f5f28 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterReflowTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffFormatterReflowTest.java @@ -146,7 +146,7 @@ public class DiffFormatterReflowTest { assertFormatted("Z.patch"); } - private void init(final String name) throws IOException { + private void init(String name) throws IOException { a = new RawText(readFile(name + "_PreImage")); b = new RawText(readFile(name + "_PostImage")); file = parseTestPatchFile(name + ".patch").getFiles().get(0); @@ -156,13 +156,13 @@ public class DiffFormatterReflowTest { assertFormatted(JGitTestUtil.getName() + ".out"); } - private void assertFormatted(final String name) throws IOException { + private void assertFormatted(String name) throws IOException { fmt.format(file, a, b); final String exp = RawParseUtils.decode(readFile(name)); assertEquals(exp, RawParseUtils.decode(out.toByteArray())); } - private byte[] readFile(final String patchFile) throws IOException { + private byte[] readFile(String patchFile) throws IOException { final InputStream in = getClass().getResourceAsStream(patchFile); if (in == null) { fail("No " + patchFile + " test vector"); @@ -180,7 +180,7 @@ public class DiffFormatterReflowTest { } } - private Patch parseTestPatchFile(final String patchFile) throws IOException { + private Patch parseTestPatchFile(String patchFile) throws IOException { try (InputStream in = getClass().getResourceAsStream(patchFile)) { if (in == null) { fail("No " + patchFile + " test vector"); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java index 80d4329858..0b261840c2 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java @@ -229,7 +229,7 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase { assertEquals(intentToAdd, entry.isIntentToAdd()); } - private static File pathOf(final String name) { + private static File pathOf(String name) { return JGitTestUtil.getTestResourceFile(name); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java index 05fa007904..86e2852872 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheEntryTest.java @@ -183,7 +183,7 @@ public class DirCacheEntryTest { copyMetaDataHelper(true); } - private static void copyMetaDataHelper(final boolean keepStage) { + private static void copyMetaDataHelper(boolean keepStage) { DirCacheEntry e = new DirCacheEntry("some/path", DirCacheEntry.STAGE_2); e.setAssumeValid(false); e.setCreationTime(2L); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheLargePathTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheLargePathTest.java index ef3e61144d..dfc136ce26 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheLargePathTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheLargePathTest.java @@ -81,7 +81,7 @@ public class DirCacheLargePathTest extends RepositoryTestCase { testLongPath(16384); } - private void testLongPath(final int len) throws CorruptObjectException, + private void testLongPath(int len) throws CorruptObjectException, IOException { final String longPath = makeLongPath(len); final String shortPath = "~~~ shorter-path"; @@ -119,7 +119,7 @@ public class DirCacheLargePathTest extends RepositoryTestCase { } } - private static String makeLongPath(final int len) { + private static String makeLongPath(int len) { final StringBuilder r = new StringBuilder(len); for (int i = 0; i < len; i++) r.append('a' + (i % 26)); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java index 4813d28017..2895b30263 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java @@ -210,14 +210,14 @@ public class ConcurrentRepackTest extends RepositoryTestCase { config.install(); } - private RevObject parse(final AnyObjectId id) + private RevObject parse(AnyObjectId id) throws MissingObjectException, IOException { try (RevWalk rw = new RevWalk(db)) { return rw.parseAny(id); } } - private File[] pack(final Repository src, final RevObject... list) + private File[] pack(Repository src, RevObject... list) throws IOException { try (PackWriter pw = new PackWriter(src)) { for (final RevObject o : list) { @@ -233,7 +233,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase { } } - private static void write(final File[] files, final PackWriter pw) + private static void write(File[] files, PackWriter pw) throws IOException { final long begin = files[0].getParentFile().lastModified(); NullProgressMonitor m = NullProgressMonitor.INSTANCE; @@ -251,7 +251,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase { touch(begin, files[0].getParentFile()); } - private static void delete(final File[] list) throws IOException { + private static void delete(File[] list) throws IOException { final long begin = list[0].getParentFile().lastModified(); for (final File f : list) { FileUtils.delete(f); @@ -260,7 +260,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase { touch(begin, list[0].getParentFile()); } - private static void touch(final long begin, final File dir) { + private static void touch(long begin, File dir) { while (begin >= dir.lastModified()) { try { Thread.sleep(25); @@ -271,12 +271,12 @@ public class ConcurrentRepackTest extends RepositoryTestCase { } } - private File fullPackFileName(final ObjectId name, final String suffix) { + private File fullPackFileName(ObjectId name, String suffix) { final File packdir = db.getObjectDatabase().getPackDirectory(); return new File(packdir, "pack-" + name.name() + suffix); } - private RevObject writeBlob(final Repository repo, final String data) + private RevObject writeBlob(Repository repo, String data) throws IOException { final byte[] bytes = Constants.encode(data); final ObjectId id; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java index 128c1edde1..04fccf3561 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackFileTest.java @@ -367,7 +367,7 @@ public class PackFileTest extends LocalDiskRepositoryTestCase { pack.write(buf, 0, n); } - private static void deflate(TemporaryBuffer.Heap pack, final byte[] content) + private static void deflate(TemporaryBuffer.Heap pack, byte[] content) throws IOException { final Deflater deflater = new Deflater(); final byte[] buf = new byte[128]; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java index 3711f83656..ed427d8895 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java @@ -835,7 +835,7 @@ public class PackWriterTest extends SampleDataRepositoryTestCase { verifyOpenPack(thin); } - private void createVerifyOpenPack(final List<RevObject> objectSource) + private void createVerifyOpenPack(List<RevObject> objectSource) throws MissingObjectException, IOException { NullProgressMonitor m = NullProgressMonitor.INSTANCE; writer = new PackWriter(config, db.newObjectReader()); @@ -846,7 +846,7 @@ public class PackWriterTest extends SampleDataRepositoryTestCase { verifyOpenPack(false); } - private void verifyOpenPack(final boolean thin) throws IOException { + private void verifyOpenPack(boolean thin) throws IOException { final byte[] packData = os.toByteArray(); if (thin) { @@ -868,13 +868,13 @@ public class PackWriterTest extends SampleDataRepositoryTestCase { assertNotNull("have PackFile after parsing", pack); } - private PackParser index(final byte[] packData) throws IOException { + private PackParser index(byte[] packData) throws IOException { if (inserter == null) inserter = dst.newObjectInserter(); return inserter.newPackParser(new ByteArrayInputStream(packData)); } - private void verifyObjectsOrder(final ObjectId objectsOrder[]) { + private void verifyObjectsOrder(ObjectId objectsOrder[]) { final List<PackIndex.MutableEntry> entries = new ArrayList<>(); for (MutableEntry me : pack) { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java index 592d0c8671..757ebb2987 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefUpdateTest.java @@ -93,13 +93,13 @@ public class RefUpdateTest extends SampleDataRepositoryTestCase { } } - private RefUpdate updateRef(final String name) throws IOException { + private RefUpdate updateRef(String name) throws IOException { final RefUpdate ref = db.updateRef(name); ref.setNewObjectId(db.resolve(Constants.HEAD)); return ref; } - private void delete(final RefUpdate ref, final Result expected) + private void delete(RefUpdate ref, Result expected) throws IOException { delete(ref, expected, true, true); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java index 91255007ef..a549d32df9 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java @@ -747,7 +747,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { } } - private ObjectId insertCommit(final CommitBuilder builder) + private ObjectId insertCommit(CommitBuilder builder) throws IOException, UnsupportedEncodingException { try (ObjectInserter oi = db.newObjectInserter()) { ObjectId id = oi.insert(builder); @@ -764,7 +764,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase { } } - private ObjectId insertTag(final TagBuilder tag) throws IOException, + private ObjectId insertTag(TagBuilder tag) throws IOException, UnsupportedEncodingException { try (ObjectInserter oi = db.newObjectInserter()) { ObjectId id = oi.insert(tag); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java index 9ac794ed8e..bee11cd71a 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java @@ -124,7 +124,7 @@ public class WindowCacheGetTest extends SampleDataRepositoryTestCase { checkLimits(cfg); } - private static void checkLimits(final WindowCacheConfig cfg) { + private static void checkLimits(WindowCacheConfig cfg) { final WindowCache cache = WindowCache.getInstance(); assertTrue(cache.getOpenFiles() <= cfg.getPackedGitOpenFiles()); assertTrue(cache.getOpenBytes() <= cfg.getPackedGitLimit()); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java index 1684afa4e1..ae52ad5917 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftree/RefTreeDatabaseTest.java @@ -631,7 +631,7 @@ public class RefTreeDatabaseTest { name); } - private void symref(final String name, final String dst) + private void symref(String name, String dst) throws IOException { commit(new Function() { @Override @@ -648,7 +648,7 @@ public class RefTreeDatabaseTest { }); } - private void update(final String name, final ObjectId id) + private void update(String name, ObjectId id) throws IOException { commit(new Function() { @Override diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java index 87bb082485..1ecdf21d45 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/BranchConfigTest.java @@ -160,7 +160,7 @@ public class BranchConfigTest { assertTrue(new BranchConfig(c, "true").isRebase()); } - private static Config parse(final String content) { + private static Config parse(String content) { final Config c = new Config(null); try { c.fromText(content); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java index 7862005ebc..c4c4da8165 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java @@ -914,12 +914,12 @@ public class ConfigTest { assertEquals(exp, c.getLong("s", null, "a", 0L)); } - private static Config parse(final String content) + private static Config parse(String content) throws ConfigInvalidException { return parse(content, null); } - private static Config parse(final String content, Config baseConfig) + private static Config parse(String content, Config baseConfig) throws ConfigInvalidException { final Config c = new Config(baseConfig); c.fromText(content); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java index 22c66cec16..b8e8a12d53 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java @@ -1607,7 +1607,7 @@ public class ObjectCheckerTest { checker.checkTree(encodeASCII(b.toString())); } - private static void entry(StringBuilder b, final String modeName) { + private static void entry(StringBuilder b, String modeName) { b.append(modeName); b.append('\0'); for (int i = 0; i < OBJECT_ID_LENGTH; i++) @@ -1647,7 +1647,7 @@ public class ObjectCheckerTest { checker.setSkipList(null); } - private static ObjectIdSet set(final ObjectId... ids) { + private static ObjectIdSet set(ObjectId... ids) { return new ObjectIdSet() { @Override public boolean contains(AnyObjectId objectId) { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java index d431a8910b..87e901fcfe 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ValidRefNameTest.java @@ -51,7 +51,7 @@ import org.eclipse.jgit.util.SystemReader; import org.junit.Test; public class ValidRefNameTest { - private static void assertValid(final boolean exp, final String name) { + private static void assertValid(boolean exp, String name) { SystemReader instance = SystemReader.getInstance(); try { setUnixSystemReader(); @@ -81,7 +81,7 @@ public class ValidRefNameTest { }); } - private static void assertInvalidOnWindows(final String name) { + private static void assertInvalidOnWindows(String name) { SystemReader instance = SystemReader.getInstance(); try { setUnixSystemReader(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java index 4948b373d0..19f6dcbc59 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CherryPickTest.java @@ -183,7 +183,7 @@ public class CherryPickTest extends RepositoryTestCase { assertFalse(tw.next()); } - private static void assertCorrectId(final DirCache treeT, final TreeWalk tw) { + private static void assertCorrectId(DirCache treeT, TreeWalk tw) { assertEquals(treeT.getEntry(tw.getPathString()).getObjectId(), tw .getObjectId(0)); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CrissCrossMergeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CrissCrossMergeTest.java index ee99aa1379..aaa08a9e31 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CrissCrossMergeTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/CrissCrossMergeTest.java @@ -783,7 +783,7 @@ public class CrissCrossMergeTest extends RepositoryTestCase { } } - private void setIndex(final ObjectId id, String path) + private void setIndex(ObjectId id, String path) throws MissingObjectException, IOException { DirCache lockedDircache; DirCacheEditor dcedit; diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java index 951568e7bb..dd2c2e84b6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/merge/SimpleMergeTest.java @@ -403,7 +403,7 @@ public class SimpleMergeTest extends SampleDataRepositoryTestCase { assertFalse(merge); } - private static void assertCorrectId(final DirCache treeT, final TreeWalk tw) { + private static void assertCorrectId(DirCache treeT, TreeWalk tw) { assertEquals(treeT.getEntry(tw.getPathString()).getObjectId(), tw .getObjectId(0)); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java index 6027aff716..6c107f983d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/EditListTest.java @@ -89,7 +89,7 @@ public class EditListTest { assertEquals(new Edit(23 - 1, 25 - 1, 22 - 1, 28 - 1), e.get(2)); } - private Patch parseTestPatchFile(final String patchFile) throws IOException { + private Patch parseTestPatchFile(String patchFile) throws IOException { try (InputStream in = getClass().getResourceAsStream(patchFile)) { if (in == null) { fail("No " + patchFile + " test vector"); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java index 7b4e014449..24fbda1adb 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/FileHeaderTest.java @@ -433,30 +433,30 @@ public class FileHeaderTest { assertTrue(ObjectId.fromString(nid).startsWith(fh.getNewId())); } - private static void assertParse(final FileHeader fh) { + private static void assertParse(FileHeader fh) { int ptr = fh.parseGitFileName(0, fh.buf.length); assertTrue(ptr > 0); ptr = fh.parseGitHeaders(ptr, fh.buf.length); assertTrue(ptr > 0); } - private static FileHeader data(final String in) { + private static FileHeader data(String in) { return new FileHeader(Constants.encodeASCII(in), 0); } - private static FileHeader header(final String path) { + private static FileHeader header(String path) { return data(gitLine(path) + "--- " + path + "\n"); } - private static String gitLine(final String path) { + private static String gitLine(String path) { return "a/" + path + " b/" + path + "\n"; } - private static FileHeader dqHeader(final String path) { + private static FileHeader dqHeader(String path) { return data(dqGitLine(path) + "--- " + path + "\n"); } - private static String dqGitLine(final String path) { + private static String dqGitLine(String path) { return "\"a/" + path + "\" \"b/" + path + "\"\n"; } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java index 8da199f7c6..7b5868a393 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/patch/GetTextTest.java @@ -134,7 +134,7 @@ public class GetTextTest { } } - private String readTestPatchFile(final Charset cs) throws IOException { + private String readTestPatchFile(Charset cs) throws IOException { final String patchFile = JGitTestUtil.getName() + ".patch"; try (InputStream in = getClass().getResourceAsStream(patchFile)) { if (in == null) { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java index 87c8547812..ad8327ff4e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/FooterLineTest.java @@ -353,7 +353,7 @@ public class FooterLineTest extends RepositoryTestCase { assertFalse("not CC", line.matches(FooterKey.CC)); } - private RevCommit parse(final String msg) throws IOException { + private RevCommit parse(String msg) throws IOException { final StringBuilder buf = new StringBuilder(); buf.append("tree " + ObjectId.zeroId().name() + "\n"); buf.append("author A. U. Thor <a@example.com> 1 +0000\n"); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java index 9fc96212c7..cfefac3aa1 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevCommitParseTest.java @@ -138,7 +138,7 @@ public class RevCommitParseTest extends RepositoryTestCase { assertEquals(TimeZone.getTimeZone("GMT" + committerTimeZone), cCommitter.getTimeZone()); } - private RevCommit create(final String msg) throws Exception { + private RevCommit create(String msg) throws Exception { final StringBuilder b = new StringBuilder(); b.append("tree 9788669ad918b6fcce64af8882fc9a81cb6aba67\n"); b.append("author A U. Thor <a_u_thor@example.com> 1218123387 +0700\n"); @@ -483,7 +483,7 @@ public class RevCommitParseTest extends RepositoryTestCase { assertEquals(shortMsg, c.getShortMessage()); } - private static ObjectId id(final String str) { + private static ObjectId id(String str) { return ObjectId.fromString(str); } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java index 8e9507961b..e11cef7c92 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevTagParseTest.java @@ -82,7 +82,7 @@ public class RevTagParseTest extends RepositoryTestCase { testOneType(Constants.OBJ_TAG); } - private void testOneType(final int typeCode) throws Exception { + private void testOneType(int typeCode) throws Exception { final ObjectId id = id("9788669ad918b6fcce64af8882fc9a81cb6aba67"); final StringBuilder b = new StringBuilder(); b.append("object " + id.name() + "\n"); @@ -202,7 +202,7 @@ public class RevTagParseTest extends RepositoryTestCase { assertNull(c.getTaggerIdent()); } - private RevTag create(final String msg) throws Exception { + private RevTag create(String msg) throws Exception { final StringBuilder b = new StringBuilder(); b.append("object 9788669ad918b6fcce64af8882fc9a81cb6aba67\n"); b.append("type tree\n"); @@ -480,7 +480,7 @@ public class RevTagParseTest extends RepositoryTestCase { assertEquals(src.getMessage(), p.getFullMessage()); } - private static ObjectId id(final String str) { + private static ObjectId id(String str) { return ObjectId.fromString(str); } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFollowFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFollowFilterTest.java index ab2705cbec..70050270d3 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFollowFilterTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkFollowFilterTest.java @@ -75,7 +75,7 @@ public class RevWalkFollowFilterTest extends RevWalkTestCase { diffCollector = new DiffCollector(); } - protected FollowFilter follow(final String followPath) { + protected FollowFilter follow(String followPath) { FollowFilter followFilter = FollowFilter.create(followPath, new Config().get(DiffConfig.KEY)); followFilter.setRenameCallback(diffCollector); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter1Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter1Test.java index 6ec529c319..b55a45aa6c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter1Test.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter1Test.java @@ -54,7 +54,7 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter; import org.junit.Test; public class RevWalkPathFilter1Test extends RevWalkTestCase { - protected void filter(final String path) { + protected void filter(String path) { rw.setTreeFilter(AndTreeFilter.create(PathFilterGroup .createFromStrings(Collections.singleton(path)), TreeFilter.ANY_DIFF)); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java index 631e3956fc..70b4e154ad 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java @@ -102,7 +102,7 @@ public class RevWalkPathFilter6012Test extends RevWalkTestCase { } } - protected void check(final RevCommit... order) throws Exception { + protected void check(RevCommit... order) throws Exception { markStart(i); final StringBuilder act = new StringBuilder(); for (final RevCommit z : rw) { @@ -121,7 +121,7 @@ public class RevWalkPathFilter6012Test extends RevWalkTestCase { assertEquals(exp.toString(), act.toString()); } - protected void filter(final String path) { + protected void filter(String path) { rw.setTreeFilter(AndTreeFilter.create(PathFilterGroup .createFromStrings(Collections.singleton(path)), TreeFilter.ANY_DIFF)); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java index f12cc0872f..544398219f 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkTestCase.java @@ -74,38 +74,38 @@ public abstract class RevWalkTestCase extends RepositoryTestCase { return util.getDate(); } - protected void tick(final int secDelta) { + protected void tick(int secDelta) { util.tick(secDelta); } - protected RevBlob blob(final String content) throws Exception { + protected RevBlob blob(String content) throws Exception { return util.blob(content); } - protected DirCacheEntry file(final String path, final RevBlob blob) + protected DirCacheEntry file(String path, RevBlob blob) throws Exception { return util.file(path, blob); } - protected RevTree tree(final DirCacheEntry... entries) throws Exception { + protected RevTree tree(DirCacheEntry... entries) throws Exception { return util.tree(entries); } - protected RevObject get(final RevTree tree, final String path) + protected RevObject get(RevTree tree, String path) throws Exception { return util.get(tree, path); } - protected RevCommit commit(final RevCommit... parents) throws Exception { + protected RevCommit commit(RevCommit... parents) throws Exception { return util.commit(parents); } - protected RevCommit commit(final RevTree tree, final RevCommit... parents) + protected RevCommit commit(RevTree tree, RevCommit... parents) throws Exception { return util.commit(tree, parents); } - protected RevCommit commit(final int secDelta, final RevCommit... parents) + protected RevCommit commit(int secDelta, RevCommit... parents) throws Exception { return util.commit(secDelta, parents); } @@ -115,7 +115,7 @@ public abstract class RevWalkTestCase extends RepositoryTestCase { return util.commit(secDelta, tree, parents); } - protected RevTag tag(final String name, final RevObject dst) + protected RevTag tag(String name, RevObject dst) throws Exception { return util.tag(name, dst); } @@ -125,19 +125,19 @@ public abstract class RevWalkTestCase extends RepositoryTestCase { return util.commit(); } - protected <T extends RevObject> T parseBody(final T t) throws Exception { + protected <T extends RevObject> T parseBody(T t) throws Exception { return util.parseBody(t); } - protected void markStart(final RevCommit commit) throws Exception { + protected void markStart(RevCommit commit) throws Exception { rw.markStart(commit); } - protected void markUninteresting(final RevCommit commit) throws Exception { + protected void markUninteresting(RevCommit commit) throws Exception { rw.markUninteresting(commit); } - protected void assertCommit(final RevCommit exp, final RevCommit act) { + protected void assertCommit(RevCommit exp, RevCommit act) { assertSame(exp, act); } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java index 10bea0a8b5..a26ae10af3 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkUtilsReachableTest.java @@ -109,7 +109,7 @@ public class RevWalkUtilsReachableTest extends RevWalkTestCase { } } - private Ref branch(final String name, final RevCommit dst) throws Exception { + private Ref branch(String name, RevCommit dst) throws Exception { return Git.wrap(db).branchCreate().setName(name) .setStartPoint(dst.name()).call(); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java index 76404aba91..4e5d56acb2 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/NetRCTest.java @@ -74,7 +74,7 @@ public class NetRCTest extends RepositoryTestCase { configFile = new File(home, ".netrc"); } - private void config(final String data) throws IOException { + private void config(String data) throws IOException { try (OutputStreamWriter fw = new OutputStreamWriter( new FileOutputStream(configFile), CHARSET)) { fw.write(data); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java index 886f577d98..abf80ecd4d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/OpenSshConfigTest.java @@ -90,7 +90,7 @@ public class OpenSshConfigTest extends RepositoryTestCase { osc = new OpenSshConfig(home, configFile); } - private void config(final String data) throws IOException { + private void config(String data) throws IOException { long lastMtime = configFile.lastModified(); do { try (final OutputStreamWriter fw = new OutputStreamWriter( diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java index 982bae8394..8b1d860059 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineInTest.java @@ -326,7 +326,7 @@ public class PacketLineInTest { // test support - private void init(final String msg) { + private void init(String msg) { rawIn = new ByteArrayInputStream(Constants.encodeASCII(msg)); in = new PacketLineIn(rawIn); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineOutTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineOutTest.java index dd9a0d3bb5..391a701b8e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineOutTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PacketLineOutTest.java @@ -173,7 +173,7 @@ public class PacketLineOutTest { assertEquals(1, flushCnt[0]); } - private void assertBuffer(final String exp) throws IOException { + private void assertBuffer(String exp) throws IOException { assertEquals(exp, new String(rawOut.toByteArray(), Constants.CHARACTER_ENCODING)); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RemoteConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RemoteConfigTest.java index a0cf0d2dbc..9aabd71d97 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RemoteConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RemoteConfigTest.java @@ -67,12 +67,12 @@ public class RemoteConfigTest { config = new Config(); } - private void readConfig(final String dat) throws ConfigInvalidException { + private void readConfig(String dat) throws ConfigInvalidException { config = new Config(); config.fromText(dat); } - private void checkConfig(final String exp) { + private void checkConfig(String exp) { assertEquals(exp, config.toText()); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java index 4571619603..4d3e162240 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/SideBandOutputStreamTest.java @@ -259,7 +259,7 @@ public class SideBandOutputStreamTest { } } - private void assertBuffer(final String exp) throws IOException { + private void assertBuffer(String exp) throws IOException { assertEquals(exp, new String(rawOut.toByteArray(), Constants.CHARACTER_ENCODING)); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java index f5e97c2dc2..57eec0b58e 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java @@ -91,7 +91,7 @@ public class CanonicalTreeParserTest { hash_sometree), entry(m644, "foo", hash_foo)); } - private static byte[] mktree(final byte[]... data) throws Exception { + private static byte[] mktree(byte[]... data) throws Exception { final ByteArrayOutputStream out = new ByteArrayOutputStream(); for (final byte[] e : data) out.write(e); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java index e34cb97798..0e009b9540 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorTest.java @@ -821,7 +821,7 @@ public class FileTreeIteratorTest extends RepositoryTestCase { assertEquals(sha1string, tw.getObjectId(1).getName() /* 1=filetree here */); } - private static String nameOf(final AbstractTreeIterator i) { + private static String nameOf(AbstractTreeIterator i) { return RawParseUtils.decode(Constants.CHARSET, i.path, 0, i.pathLen); } } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorWithTimeControl.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorWithTimeControl.java index 717a2f3b2c..fc79d4586d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorWithTimeControl.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/FileTreeIteratorWithTimeControl.java @@ -93,7 +93,7 @@ public class FileTreeIteratorWithTimeControl extends FileTreeIterator { } @Override - public AbstractTreeIterator createSubtreeIterator(final ObjectReader reader) { + public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) { return new FileTreeIteratorWithTimeControl(this, ((FileEntry) current()).getFile(), fs, modTimes); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java index 6ad47c2956..87fe00b1c6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java @@ -180,7 +180,7 @@ public class PostOrderTreeWalkTest extends RepositoryTestCase { } } - private DirCacheEntry makeFile(final String path) throws Exception { + private DirCacheEntry makeFile(String path) throws Exception { return createEntry(path, REGULAR_FILE); } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/AlwaysCloneTreeFilter.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/AlwaysCloneTreeFilter.java index 8e2cca44ae..d9cfb622a8 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/AlwaysCloneTreeFilter.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/AlwaysCloneTreeFilter.java @@ -52,7 +52,7 @@ class AlwaysCloneTreeFilter extends TreeFilter { } @Override - public boolean include(final TreeWalk walker) { + public boolean include(TreeWalk walker) { return false; } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java index 6fed233051..81467c2d01 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/ChangeIdUtilTest.java @@ -680,15 +680,15 @@ public class ChangeIdUtilTest { "\n")); } - private void hookDoesNotModify(final String in) throws Exception { + private void hookDoesNotModify(String in) throws Exception { assertEquals(in, call(in)); } - private String call(final String body) throws Exception { + private String call(String body) throws Exception { return call(body, false); } - private String call(final String body, boolean replaceExisting) throws Exception { + private String call(String body, boolean replaceExisting) throws Exception { ObjectId computeChangeId = ChangeIdUtil.computeChangeId(treeId1, parentId1, author, committer, body); if (computeChangeId == null) diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java index a680ef9f9c..e34c3cebd6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/HookTest.java @@ -241,7 +241,7 @@ public class HookTest extends RepositoryTestCase { } } - private File writeHookFile(final String name, final String data) + private File writeHookFile(String name, String data) throws IOException { File path = new File(db.getWorkTree() + "/.git/hooks/", name); JGitTestUtil.write(path, data); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java index d2d44ffdc8..830f20e5c3 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/NBTest.java @@ -338,7 +338,7 @@ public class NBTest { assertOutput(b(0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff), out, 3); } - private static void prepareOutput(final byte[] buf) { + private static void prepareOutput(byte[] buf) { for (int i = 0; i < buf.length; i++) buf[i] = (byte) (0x77 + i); } @@ -353,11 +353,11 @@ public class NBTest { assertEquals((byte) (0x77 + i), buf[i]); } - private static byte[] b(final int a, final int b) { + private static byte[] b(int a, int b) { return new byte[] { (byte) a, (byte) b }; } - private static byte[] padb(final int len, final int a, final int b) { + private static byte[] padb(int len, int a, int b) { final byte[] r = new byte[len + 2]; for (int i = 0; i < len; i++) r[i] = (byte) 0xaf; @@ -370,7 +370,7 @@ public class NBTest { return new byte[] { (byte) a, (byte) b, (byte) c }; } - private static byte[] b(final int a, final int b, final int c, final int d) { + private static byte[] b(int a, int b, int c, int d) { return new byte[] { (byte) a, (byte) b, (byte) c, (byte) d }; } diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneStyleTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneStyleTest.java index 65078763e7..49ad55f42d 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneStyleTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneStyleTest.java @@ -52,14 +52,14 @@ import org.eclipse.jgit.lib.Constants; import org.junit.Test; public class QuotedStringBourneStyleTest { - private static void assertQuote(final String in, final String exp) { + private static void assertQuote(String in, String exp) { final String r = BOURNE.quote(in); assertNotSame(in, r); assertFalse(in.equals(r)); assertEquals('\'' + exp + '\'', r); } - private static void assertDequote(final String exp, final String in) { + private static void assertDequote(String exp, String in) { final byte[] b = Constants.encode('\'' + in + '\''); final String r = BOURNE.dequote(b, 0, b.length); assertEquals(exp, r); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneUserPathStyleTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneUserPathStyleTest.java index 7463528b56..17f1b77e0b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneUserPathStyleTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringBourneUserPathStyleTest.java @@ -52,14 +52,14 @@ import org.eclipse.jgit.lib.Constants; import org.junit.Test; public class QuotedStringBourneUserPathStyleTest { - private static void assertQuote(final String in, final String exp) { + private static void assertQuote(String in, String exp) { final String r = BOURNE_USER_PATH.quote(in); assertNotSame(in, r); assertFalse(in.equals(r)); assertEquals('\'' + exp + '\'', r); } - private static void assertDequote(final String exp, final String in) { + private static void assertDequote(String exp, String in) { final byte[] b = Constants.encode('\'' + in + '\''); final String r = BOURNE_USER_PATH.dequote(b, 0, b.length); assertEquals(exp, r); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringGitPathStyleTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringGitPathStyleTest.java index a6f33451ce..9a0c96e171 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringGitPathStyleTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/QuotedStringGitPathStyleTest.java @@ -54,14 +54,14 @@ import org.eclipse.jgit.lib.Constants; import org.junit.Test; public class QuotedStringGitPathStyleTest { - private static void assertQuote(final String exp, final String in) { + private static void assertQuote(String exp, String in) { final String r = GIT_PATH.quote(in); assertNotSame(in, r); assertFalse(in.equals(r)); assertEquals('"' + exp + '"', r); } - private static void assertDequote(final String exp, final String in) { + private static void assertDequote(String exp, String in) { final byte[] b = ('"' + in + '"').getBytes(ISO_8859_1); final String r = GIT_PATH.dequote(b, 0, b.length); assertEquals(exp, r); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_HexParseTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_HexParseTest.java index f5b56e7b78..f3c046d4a9 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_HexParseTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_HexParseTest.java @@ -81,7 +81,7 @@ public class RawParseUtils_HexParseTest { assertNotHex('.'); } - private static void assertNotHex(final char c) { + private static void assertNotHex(char c) { try { RawParseUtils.parseHexInt4((byte) c); fail("Incorrectly acccepted " + c); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefListTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefListTest.java index 5a1468a8b6..d124d7365c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefListTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RefListTest.java @@ -456,7 +456,7 @@ public class RefListTest { return b.toRefList(); } - private static Ref newRef(final String name) { + private static Ref newRef(String name) { return new ObjectIdRef.Unpeeled(Ref.Storage.LOOSE, name, ID); } } |