]> source.dussan.org Git - jgit.git/commitdiff
Remove further unnecessary 'final' keywords 88/122788/2
authorHan-Wen Nienhuys <hanwen@google.com>
Wed, 16 May 2018 14:34:16 +0000 (16:34 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Fri, 18 May 2018 15:59:45 +0000 (17:59 +0200)
Remove it from

 * package private functions.

 * try blocks

 * for loops

this was done with the following python script:

$ cat f.py
import sys
import re
import os

def replaceFinal(m):
  return m.group(1) + "(" +  m.group(2).replace('final ', '') + ")"

methodDecl = re.compile(r"^([\t ]*[a-zA-Z_ ]+)\(([^)]*)\)")

def subst(fn):
  input = open(fn)
  os.rename(fn, fn + "~")

  dest = open(fn, 'w')
  for l in input:
    l = methodDecl.sub(replaceFinal, l)
    dest.write(l)
  dest.close()

for root, dirs, files in os.walk(".", topdown=False):
  for f in files:
    if not f.endswith('.java'):
      continue

    full = os.path.join(root, f)
    print full
    subst(full)

Change-Id: If533a75a417594fc893e7c669d2c1f0f6caeb7ca
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
203 files changed:
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/AsIsFileService.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java
org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/XInputStream.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/TreeFilterTest.java
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java
org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
org.eclipse.jgit/src/org/eclipse/jgit/errors/CompoundException.java
org.eclipse.jgit/src/org/eclipse/jgit/errors/MissingBundlePrerequisiteException.java
org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteWindow.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/DeltaBaseCache.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndex.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java
org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java
org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java
org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java
org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java
org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java
org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java
org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockObjQueue.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BoundaryGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DelayRevQueue.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FixUninterestingGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/MergeBaseGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PendingGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AuthorRevFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitterRevFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MessageRevFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonClient.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchHeadRecord.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchResult.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/OperationResult.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java
org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkRemoteObjectDatabase.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java
org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java
org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
org.eclipse.jgit/src/org/eclipse/jgit/util/LongMap.java
org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
org.eclipse.jgit/src/org/eclipse/jgit/util/io/InterruptTimer.java

index 7f826d4f2730952cd79fedc0455e0e8e79007d92..9e9f25e61174cdbc72a647fd2cbe3bfc5642aff8 100644 (file)
@@ -66,7 +66,7 @@ import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
 class AsIsFileFilter implements Filter {
        private final AsIsFileService asIs;
 
-       AsIsFileFilter(final AsIsFileService getAnyFile) {
+       AsIsFileFilter(AsIsFileService getAnyFile) {
                this.asIs = getAnyFile;
        }
 
index 09f110d9b3c5fd305f3e4273fcf4d818d6462288..05510a05b0795e74e4be63f1f579246a0526722b 100644 (file)
@@ -84,7 +84,7 @@ final class FileSender {
 
        private long end;
 
-       FileSender(final File path) throws FileNotFoundException {
+       FileSender(File path) throws FileNotFoundException {
                this.path = path;
                this.source = new RandomAccessFile(path, "r");
 
index 1c523a0623b7c813cacd103b7f5fcf78cd7436fb..62f075c73ca1fb01efe72079a51ee5f32c9814ab 100644 (file)
@@ -75,7 +75,7 @@ abstract class ObjectFileServlet extends HttpServlet {
                }
 
                @Override
-               String etag(final FileSender sender) throws IOException {
+               String etag(FileSender sender) throws IOException {
                        return Long.toHexString(sender.getLastModified());
                }
        }
@@ -88,7 +88,7 @@ abstract class ObjectFileServlet extends HttpServlet {
                }
 
                @Override
-               String etag(final FileSender sender) throws IOException {
+               String etag(FileSender sender) throws IOException {
                        return sender.getTailChecksum();
                }
        }
@@ -111,7 +111,7 @@ abstract class ObjectFileServlet extends HttpServlet {
 
        private final String contentType;
 
-       ObjectFileServlet(final String contentType) {
+       ObjectFileServlet(String contentType) {
                this.contentType = contentType;
        }
 
index 2ff385dbec9d7f330ff2cb7371956fd2bbb1e1a3..9601c8cafa0891f86b98ffe24673a7e961f34213 100644 (file)
@@ -238,7 +238,7 @@ public final class ServletUtils {
                return content;
        }
 
-       static boolean acceptsGzipEncoding(final HttpServletRequest req) {
+       static boolean acceptsGzipEncoding(HttpServletRequest req) {
                return acceptsGzipEncoding(req.getHeader(HDR_ACCEPT_ENCODING));
        }
 
index 6417877e1bc52d95437766b844e58a60c431c3c5..92009c57312e3b5c10eef3cba59db3225a7a4ea0 100644 (file)
@@ -75,7 +75,7 @@ abstract class SmartServiceInfoRefs implements Filter {
 
        private final Filter[] filters;
 
-       SmartServiceInfoRefs(final String service, final List<Filter> filters) {
+       SmartServiceInfoRefs(String service, List<Filter> filters) {
                this.svc = service;
                this.filters = filters.toArray(new Filter[filters.size()]);
        }
index 5cac868b9ff350046720f17f468714164ceb141a..b2466d0e3e030d23d2d0ce0ee0ba1265ab80cd51 100644 (file)
@@ -64,7 +64,7 @@ class TextFileServlet extends HttpServlet {
 
        private final String fileName;
 
-       TextFileServlet(final String name) {
+       TextFileServlet(String name) {
                this.fileName = name;
        }
 
index bf2d6dbb4df123c9b9b02e97212e55114e55c2bd..010810508ad2ad5c655351b6aa11711f62a4e9e6 100644 (file)
@@ -87,11 +87,11 @@ class RegexPipeline extends UrlPipeline {
        static class Binder extends ServletBinderImpl {
                private final Pattern pattern;
 
-               Binder(final String p) {
+               Binder(String p) {
                        pattern = Pattern.compile(p);
                }
 
-               Binder(final Pattern p) {
+               Binder(Pattern p) {
                        pattern = p;
                }
 
@@ -110,7 +110,7 @@ class RegexPipeline extends UrlPipeline {
        }
 
        @Override
-       boolean match(final HttpServletRequest req) {
+       boolean match(HttpServletRequest req) {
                final String pathInfo = req.getPathInfo();
                return pathInfo != null && pattern.matcher(pathInfo).matches();
        }
index 6742c9f7217bbeef82b06e2ce4b81d5e6ea7023e..4fd99c6ef33ddfa710e2de952315985d3cc9bb32 100644 (file)
@@ -67,7 +67,7 @@ class SuffixPipeline extends UrlPipeline {
        static class Binder extends ServletBinderImpl {
                private final String suffix;
 
-               Binder(final String suffix) {
+               Binder(String suffix) {
                        this.suffix = suffix;
                }
 
@@ -89,7 +89,7 @@ class SuffixPipeline extends UrlPipeline {
        }
 
        @Override
-       boolean match(final HttpServletRequest req) {
+       boolean match(HttpServletRequest req) {
                final String pathInfo = req.getPathInfo();
                return pathInfo != null && pathInfo.endsWith(suffix);
        }
index 56e4e2288988c509e8fc889f156072f8e1a1ef2e..c02399a23f55ec7fbe3d8e48e36ef5e470785a8b 100644 (file)
@@ -79,7 +79,7 @@ abstract class UrlPipeline {
        /** Instance that must generate the response; never null. */
        private final HttpServlet servlet;
 
-       UrlPipeline(final Filter[] filters, final HttpServlet servlet) {
+       UrlPipeline(Filter[] filters, HttpServlet servlet) {
                this.filters = filters;
                this.servlet = servlet;
        }
@@ -99,7 +99,7 @@ abstract class UrlPipeline {
         * @throws ServletException
         *             a filter or servlet is unable to initialize.
         */
-       void init(final ServletContext context, final Set<Object> inited)
+       void init(ServletContext context, Set<Object> inited)
                        throws ServletException {
                for (Filter ref : filters)
                        initFilter(ref, context, inited);
@@ -165,7 +165,7 @@ abstract class UrlPipeline {
         *            destroyed a second time. Filters and servlets that are first
         *            destroyed by this pipeline will be added to this set.
         */
-       void destroy(final Set<Object> destroyed) {
+       void destroy(Set<Object> destroyed) {
                for (Filter ref : filters)
                        destroyFilter(ref, destroyed);
                destroyServlet(servlet, destroyed);
@@ -230,7 +230,7 @@ abstract class UrlPipeline {
 
                private int filterIdx;
 
-               Chain(final Filter[] filters, final HttpServlet servlet) {
+               Chain(Filter[] filters, HttpServlet servlet) {
                        this.filters = filters;
                        this.servlet = servlet;
                }
index 11ad5e0e1a5cde93c0e7feea1737d907cab6f7b1..9a928b1e2044d7c8dfaf9fab2496aa56d7ccc4de 100644 (file)
@@ -73,7 +73,7 @@ public class AsIsFileService {
        private static class ServiceConfig {
                final boolean enabled;
 
-               ServiceConfig(final Config cfg) {
+               ServiceConfig(Config cfg) {
                        enabled = cfg.getBoolean("http", "getanyfile", true);
                }
        }
index fbd155c0dc9a2c6b875602273393ad4f89cfd62c..06a8f5effe9194bf4dcbcb277c6174051b004cee 100644 (file)
@@ -74,7 +74,7 @@ public class DefaultReceivePackFactory implements
 
                final boolean enabled;
 
-               ServiceConfig(final Config cfg) {
+               ServiceConfig(Config cfg) {
                        set = cfg.getString("http", null, "receivepack") != null;
                        enabled = cfg.getBoolean("http", "receivepack", false);
                }
index e6df77b836b7cc0088b0c80d3cc8684ecae62d80..30edc15166d2dd12f5e832272e3c64cbe3313fde 100644 (file)
@@ -64,7 +64,7 @@ public class DefaultUploadPackFactory implements
        private static class ServiceConfig {
                final boolean enabled;
 
-               ServiceConfig(final Config cfg) {
+               ServiceConfig(Config cfg) {
                        enabled = cfg.getBoolean("http", "uploadpack", true);
                }
        }
index e94a792ff245bb20a7e06c88c8c8f4a4c8ce04f9..298bf2170ca5229751f7822e7953f7008495d720 100644 (file)
@@ -133,7 +133,7 @@ public class AsIsServiceTest extends LocalDiskRepositoryTestCase {
 
                private final String host;
 
-               R(final String user, final String host) {
+               R(String user, String host) {
                        super(new Request(null, null) /* can't pass null, sigh */);
                        this.user = user;
                        this.host = host;
index b24e2dfc7bb87d2cbde8e47e2d9d099d79a5be89..ade1e1d2be61ba991d1c1d93897d6ba20a0cf39a 100644 (file)
@@ -205,7 +205,7 @@ public class DefaultReceivePackFactoryTest extends LocalDiskRepositoryTestCase {
 
                private final String host;
 
-               R(final String user, final String host) {
+               R(String user, String host) {
                        super(new Request(null, null) /* can't pass null, sigh */);
                        this.user = user;
                        this.host = host;
index ce24d64b7b84ba1f9dce62df7542730857c157e0..268c281e29af3bc7d0ebda3fa2f72724c5698f7d 100644 (file)
@@ -161,7 +161,7 @@ public class DefaultUploadPackFactoryTest extends LocalDiskRepositoryTestCase {
 
                private final String host;
 
-               R(final String user, final String host) {
+               R(String user, String host) {
                        super(new Request(null, null) /* can't pass null, sigh */);
                        this.user = user;
                        this.host = host;
index 8d08c038d09d98191cdcfa77af16c9735caa5fd1..82476dea4d77c350561e068a1088c7197a3a4565 100644 (file)
@@ -67,7 +67,7 @@ public class AccessEvent {
 
        private final Map<String, String> responseHeaders;
 
-       AccessEvent(final Request req, final Response rsp) {
+       AccessEvent(Request req, Response rsp) {
                method = req.getMethod();
                uri = req.getRequestURI();
                requestHeaders = cloneHeaders(req);
index 4891c01945af3a083f93eecf5656446957378083..d23c0d3c22067ecfe78717db4f3e1cb4520ec62a 100644 (file)
@@ -318,7 +318,7 @@ public class TestRepository<R extends Repository> {
        public RevTree tree(DirCacheEntry... entries) throws Exception {
                final DirCache dc = DirCache.newInCore();
                final DirCacheBuilder b = dc.builder();
-               for (final DirCacheEntry e : entries)
+               for (DirCacheEntry e : entries)
                        b.add(e);
                b.finish();
                ObjectId root;
@@ -962,7 +962,7 @@ public class TestRepository<R extends Repository> {
        public class BranchBuilder {
                private final String ref;
 
-               BranchBuilder(final String ref) {
+               BranchBuilder(String ref) {
                        this.ref = ref;
                }
 
index 8a8f49c1b0f5dbc025d3390168646a4c7ddaa24c..09f8d0aeaf226cefec03ae865531041cb499e596 100644 (file)
@@ -122,7 +122,7 @@ public class UploadTest extends LfsServerTest {
 
                ExecutorService e = Executors.newFixedThreadPool(count);
                try {
-                       for (final Path p : paths) {
+                       for (Path p : paths) {
                                e.submit(new Callable<Void>() {
                                        @Override
                                        public Void call() throws Exception {
index d2688579149366249a20f98b85c48b4dae317a99..bdd1b39c0d5b0acdfd6e64d727ed524d7e61eb26 100644 (file)
@@ -173,7 +173,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
                return r << (16 - n) * 4;
        }
 
-       static long mask(final int nibbles, final long word, final long v) {
+       static long mask(int nibbles, long word, long v) {
                final long b = (word - 1) * 16;
                if (b + 16 <= nibbles) {
                        // We have all of the bits required for this word.
index cdb297eb1cc833eb52773558c5dc9391b88f7191..078892263946bc11f19de09f266fc16a2234a025 100644 (file)
@@ -476,7 +476,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
        private static final char[] hexchar = { '0', '1', '2', '3', '4', '5', '6',
                        '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
 
-       static void formatHexChar(final char[] dst, final int p, long w) {
+       static void formatHexChar(char[] dst, int p, long w) {
                int o = p + 15;
                while (o >= p && w != 0) {
                        dst[o--] = hexchar[(int) (w & 0xf)];
index 69eb1989d7428995b0c760d0cf70ca07245b7a06..44ad79defc17afa6f0b8598d12de05ba7bd24488 100644 (file)
@@ -157,7 +157,7 @@ public class CLIGitCommand extends Main {
        }
 
        @Override
-       void init(final TextBuiltin cmd) throws IOException {
+       void init(TextBuiltin cmd) throws IOException {
                cmd.outs = result.out;
                cmd.errs = result.err;
                super.init(cmd);
index 2b6ea2a0e96990896d7c11dbbd61791bc3f486bf..9223e0fcd14046d063f68bfcd4e468aa5ee3bc05 100644 (file)
@@ -77,7 +77,7 @@ abstract class AbstractFetchCommand extends TextBuiltin {
        protected void showFetchResult(FetchResult r) throws IOException {
                try (ObjectReader reader = db.newObjectReader()) {
                        boolean shownURI = false;
-                       for (final TrackingRefUpdate u : r.getTrackingRefUpdates()) {
+                       for (TrackingRefUpdate u : r.getTrackingRefUpdates()) {
                                if (!verbose && u.getResult() == RefUpdate.Result.NO_CHANGE)
                                        continue;
 
index cce889b76e807c5df1332c81f34b106a73c2f374..f4f8d8f50fbbfd7e7fb80714cca9d18c836e54d6 100644 (file)
@@ -105,7 +105,7 @@ class AmazonS3Client extends TextBuiltin {
                        }
 
                } else if ("ls".equals(op) || "list".equals(op)) { //$NON-NLS-1$//$NON-NLS-2$
-                       for (final String k : s3.list(bucket, key))
+                       for (String k : s3.list(bucket, key))
                                outw.println(k);
 
                } else if ("rm".equals(op) || "delete".equals(op)) { //$NON-NLS-1$ //$NON-NLS-2$
index 65d60bce5aebcf670820d243aec7da072ca414fb..a88354deba937f612671b79d9c76862dd36917cd 100644 (file)
@@ -292,7 +292,7 @@ class Branch extends TextBuiltin {
                                addRefs(refs, Constants.R_REMOTES);
 
                                try (ObjectReader reader = db.newObjectReader()) {
-                                       for (final Entry<String, Ref> e : printRefs.entrySet()) {
+                                       for (Entry<String, Ref> e : printRefs.entrySet()) {
                                                final Ref ref = e.getValue();
                                                printHead(reader, e.getKey(),
                                                                current.equals(ref.getName()), ref);
@@ -303,7 +303,7 @@ class Branch extends TextBuiltin {
        }
 
        private void addRefs(Collection<Ref> refs, String prefix) {
-               for (final Ref ref : RefComparator.sort(refs)) {
+               for (Ref ref : RefComparator.sort(refs)) {
                        final String name = ref.getName();
                        if (name.startsWith(prefix))
                                addRef(name.substring(name.indexOf('/', 5) + 1), ref);
index e699326a0b8d8f426c7ff2cf226f52b17133c2d8..5754d7c44f3347efee88699ee748ad57e58f143e 100644 (file)
@@ -107,7 +107,7 @@ public class CommandCatalog {
         */
        public static CommandRef[] common() {
                final ArrayList<CommandRef> common = new ArrayList<>();
-               for (final CommandRef c : INSTANCE.commands.values())
+               for (CommandRef c : INSTANCE.commands.values())
                        if (c.isCommon())
                                common.add(c);
                return toSortedArray(common);
index 4df446fe8fcbaa220645380f8108d1a332027ea0..1773de5d78036dd575e5eb0d21dd03a0e3e2da98 100644 (file)
@@ -66,11 +66,11 @@ public class CommandRef {
 
        boolean common;
 
-       CommandRef(final Class<? extends TextBuiltin> clazz) {
+       CommandRef(Class<? extends TextBuiltin> clazz) {
                this(clazz, guessName(clazz));
        }
 
-       CommandRef(final Class<? extends TextBuiltin> clazz, final Command cmd) {
+       CommandRef(Class<? extends TextBuiltin> clazz, Command cmd) {
                this(clazz, cmd.name().length() > 0 ? cmd.name() : guessName(clazz));
                usage = cmd.usage();
                common = cmd.common();
@@ -88,7 +88,7 @@ public class CommandRef {
                        s.append("debug-"); //$NON-NLS-1$
 
                boolean lastWasDash = true;
-               for (final char c : clazz.getSimpleName().toCharArray()) {
+               for (char c : clazz.getSimpleName().toCharArray()) {
                        if (Character.isUpperCase(c)) {
                                if (!lastWasDash)
                                        s.append('-');
index d0ada67fc4fa27890d1033dcbcfd672b9acf9b32..319b5e39dc53b151e8a9d006d8adc41d5aace3ce 100644 (file)
@@ -142,7 +142,7 @@ class Daemon extends TextBuiltin {
                        packConfig.setExecutor(Executors.newFixedThreadPool(threads));
 
                final FileResolver<DaemonClient> resolver = new FileResolver<>();
-               for (final File f : directory) {
+               for (File f : directory) {
                        outw.println(MessageFormat.format(CLIText.get().exporting, f.getAbsolutePath()));
                        resolver.exportDirectory(f);
                }
@@ -157,14 +157,14 @@ class Daemon extends TextBuiltin {
                if (0 <= timeout)
                        d.setTimeout(timeout);
 
-               for (final String n : enable)
+               for (String n : enable)
                        service(d, n).setEnabled(true);
-               for (final String n : disable)
+               for (String n : disable)
                        service(d, n).setEnabled(false);
 
-               for (final String n : canOverride)
+               for (String n : canOverride)
                        service(d, n).setOverridable(true);
-               for (final String n : forbidOverride)
+               for (String n : forbidOverride)
                        service(d, n).setOverridable(false);
                if (ketchServerType == KetchServerType.LEADER) {
                        startKetchLeader(d);
index 510406345f94c39611d7ecd954fa0b93f0d06833..42aabc2f4935ea2a993dc85786fb30ea3c310423 100644 (file)
@@ -75,9 +75,9 @@ class DiffTree extends TextBuiltin {
        /** {@inheritDoc} */
        @Override
        protected void run() throws Exception {
-               try (final TreeWalk walk = new TreeWalk(db)) {
+               try (TreeWalk walk = new TreeWalk(db)) {
                        walk.setRecursive(recursive);
-                       for (final AbstractTreeIterator i : trees)
+                       for (AbstractTreeIterator i : trees)
                                walk.addTree(i);
                        walk.setFilter(AndTreeFilter.create(TreeFilter.ANY_DIFF, pathFilter));
 
index 0d8b7ec00581317ad9e3c2ae81f23c3eab77a6ab..ad92a78f695bc76c0e37b9088c08aa8a09de8d57 100644 (file)
@@ -266,7 +266,7 @@ class Log extends RevWalkTextBuiltin {
 
                outw.println();
                final String[] lines = c.getFullMessage().split("\n"); //$NON-NLS-1$
-               for (final String s : lines) {
+               for (String s : lines) {
                        outw.print("    "); //$NON-NLS-1$
                        outw.print(s);
                        outw.println();
index 9079233587ef296aa38363b1210bcbe738fa1bb1..2711c1572930c1dcce5fdc78a115b7bbb1cd9ef6 100644 (file)
@@ -83,7 +83,7 @@ class LsRemote extends TextBuiltin {
                        }
                });
                refs.addAll(command.call());
-               for (final Ref r : refs) {
+               for (Ref r : refs) {
                        show(r.getObjectId(), r.getName());
                        if (r.getPeeledObjectId() != null)
                                show(r.getPeeledObjectId(), r.getName() + "^{}"); //$NON-NLS-1$
index c57f9f2c3732392864a246db2afdb144db2322cd..01fa7eeb81d2e9ca82e79c437ad278c885f3a41c 100644 (file)
@@ -73,7 +73,7 @@ class LsTree extends TextBuiltin {
        /** {@inheritDoc} */
        @Override
        protected void run() throws Exception {
-               try (final TreeWalk walk = new TreeWalk(db)) {
+               try (TreeWalk walk = new TreeWalk(db)) {
                        walk.reset(); // drop the first empty tree, which we do not need here
                        if (paths.size() > 0)
                                walk.setFilter(PathFilterGroup.createFromStrings(paths));
index e303f385a8f8855f1418d16b8411ca434b4ab811..ac53de976798164d4f071a816ee7556a483724ed 100644 (file)
@@ -256,12 +256,12 @@ public class Main {
                                writer.println(CLIText.get().mostCommonlyUsedCommandsAre);
                                final CommandRef[] common = CommandCatalog.common();
                                int width = 0;
-                               for (final CommandRef c : common) {
+                               for (CommandRef c : common) {
                                        width = Math.max(width, c.getName().length());
                                }
                                width += 2;
 
-                               for (final CommandRef c : common) {
+                               for (CommandRef c : common) {
                                        writer.print(' ');
                                        writer.print(c.getName());
                                        for (int i = c.getName().length(); i < width; i++) {
@@ -296,7 +296,7 @@ public class Main {
                }
        }
 
-       void init(final TextBuiltin cmd) throws IOException {
+       void init(TextBuiltin cmd) throws IOException {
                if (cmd.requiresRepository()) {
                        cmd.init(openGitDir(gitdir), null);
                } else {
index 62a88aeed6b05f487e0fa92c1e338b815c3d3382..6842d8ddbfc0b3c34ff131c38d9348c518718bc9 100644 (file)
@@ -68,7 +68,7 @@ class MergeBase extends TextBuiltin {
        /** {@inheritDoc} */
        @Override
        protected void run() throws Exception {
-               for (final RevCommit c : commits)
+               for (RevCommit c : commits)
                        argWalk.markStart(c);
                argWalk.setRevFilter(RevFilter.MERGE_BASE);
                int max = all ? Integer.MAX_VALUE : 1;
index 309dca2a7f43628913ca7e8b3e9861a67f63c81e..be8ad374d3087b78bcc949961197395017d38d1c 100644 (file)
@@ -149,7 +149,7 @@ class Push extends TextBuiltin {
                boolean everythingUpToDate = true;
 
                // at first, print up-to-date ones...
-               for (final RemoteRefUpdate rru : result.getRemoteUpdates()) {
+               for (RemoteRefUpdate rru : result.getRemoteUpdates()) {
                        if (rru.getStatus() == Status.UP_TO_DATE) {
                                if (verbose)
                                        printRefUpdateResult(reader, uri, result, rru);
@@ -157,13 +157,13 @@ class Push extends TextBuiltin {
                                everythingUpToDate = false;
                }
 
-               for (final RemoteRefUpdate rru : result.getRemoteUpdates()) {
+               for (RemoteRefUpdate rru : result.getRemoteUpdates()) {
                        // ...then successful updates...
                        if (rru.getStatus() == Status.OK)
                                printRefUpdateResult(reader, uri, result, rru);
                }
 
-               for (final RemoteRefUpdate rru : result.getRemoteUpdates()) {
+               for (RemoteRefUpdate rru : result.getRemoteUpdates()) {
                        // ...finally, others (problematic)
                        if (rru.getStatus() != Status.OK
                                        && rru.getStatus() != Status.UP_TO_DATE)
index 21e37cd8c95aacb640b349a4d53cf2250c79b528..ac08cd6ac39189a51da73e11fed3ab1ae8d8d729 100644 (file)
@@ -87,7 +87,7 @@ class RevParse extends TextBuiltin {
                                                CLIText.format(CLIText.get().needSingleRevision));
                        }
 
-                       for (final ObjectId o : commits) {
+                       for (ObjectId o : commits) {
                                outw.println(o.name());
                        }
                }
index 1178f8801728b8c55ede3b9bf39581ed58e84e6c..15abeac96ecb4ad05c344591165f1fe1e147bf0e 100644 (file)
@@ -99,22 +99,22 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
        }
 
        @Option(name = "--date-order")
-       void enableDateOrder(final boolean on) {
+       void enableDateOrder(boolean on) {
                enableRevSort(RevSort.COMMIT_TIME_DESC, on);
        }
 
        @Option(name = "--topo-order")
-       void enableTopoOrder(final boolean on) {
+       void enableTopoOrder(boolean on) {
                enableRevSort(RevSort.TOPO, on);
        }
 
        @Option(name = "--reverse")
-       void enableReverse(final boolean on) {
+       void enableReverse(boolean on) {
                enableRevSort(RevSort.REVERSE, on);
        }
 
        @Option(name = "--boundary")
-       void enableBoundary(final boolean on) {
+       void enableBoundary(boolean on) {
                enableRevSort(RevSort.BOUNDARY, on);
        }
 
@@ -130,17 +130,17 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
        private final List<RevFilter> revLimiter = new ArrayList<>();
 
        @Option(name = "--author")
-       void addAuthorRevFilter(final String who) {
+       void addAuthorRevFilter(String who) {
                revLimiter.add(AuthorRevFilter.create(who));
        }
 
        @Option(name = "--committer")
-       void addCommitterRevFilter(final String who) {
+       void addCommitterRevFilter(String who) {
                revLimiter.add(CommitterRevFilter.create(who));
        }
 
        @Option(name = "--grep")
-       void addCMessageRevFilter(final String msg) {
+       void addCMessageRevFilter(String msg) {
                revLimiter.add(MessageRevFilter.create(msg));
        }
 
@@ -151,7 +151,7 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
        @Override
        protected void run() throws Exception {
                walk = createWalk();
-               for (final RevSort s : sorting)
+               for (RevSort s : sorting)
                        walk.sort(s, true);
 
                if (pathFilter == TreeFilter.ALL) {
@@ -187,7 +187,7 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
                                throw die(MessageFormat.format(CLIText.get().cannotResolve, Constants.HEAD));
                        commits.add(walk.parseCommit(head));
                }
-               for (final RevCommit c : commits) {
+               for (RevCommit c : commits) {
                        final RevCommit real = argWalk == walk ? c : walk.parseCommit(c);
                        if (c.has(RevFlag.UNINTERESTING))
                                walk.markUninteresting(real);
@@ -233,7 +233,7 @@ abstract class RevWalkTextBuiltin extends TextBuiltin {
         */
        protected int walkLoop() throws Exception {
                int n = 0;
-               for (final RevCommit c : walk) {
+               for (RevCommit c : walk) {
                        if (++n > maxCount && maxCount >= 0)
                                break;
                        show(c);
index fb1e6d0a50a96eca2b1c2fae21aca56003b38752..89a15fe4d82d27e5d97c4c7b6d7866cdcf149d06 100644 (file)
@@ -248,7 +248,7 @@ class Show extends TextBuiltin {
 
                outw.println();
                final String[] lines = tag.getFullMessage().split("\n"); //$NON-NLS-1$
-               for (final String s : lines) {
+               for (String s : lines) {
                        outw.print("    "); //$NON-NLS-1$
                        outw.print(s);
                        outw.println();
@@ -259,7 +259,7 @@ class Show extends TextBuiltin {
 
        private void show(RevTree obj) throws MissingObjectException,
                        IncorrectObjectTypeException, CorruptObjectException, IOException {
-               try (final TreeWalk walk = new TreeWalk(db)) {
+               try (TreeWalk walk = new TreeWalk(db)) {
                        walk.reset();
                        walk.addTree(obj);
 
@@ -292,7 +292,7 @@ class Show extends TextBuiltin {
 
                outw.println();
                final String[] lines = c.getFullMessage().split("\n"); //$NON-NLS-1$
-               for (final String s : lines) {
+               for (String s : lines) {
                        outw.print("    "); //$NON-NLS-1$
                        outw.print(s);
                        outw.println();
index 0cc5dbc47ec0bc280a41a6ba31d03c56fe7a7969..6318a633ca7b69fee53164df21ec220d105012cc 100644 (file)
@@ -57,7 +57,7 @@ class ShowRef extends TextBuiltin {
        /** {@inheritDoc} */
        @Override
        protected void run() throws Exception {
-               for (final Ref r : getSortedRefs()) {
+               for (Ref r : getSortedRefs()) {
                        show(r.getObjectId(), r.getName());
                        if (r.getPeeledObjectId() != null)
                                show(r.getPeeledObjectId(), r.getName() + "^{}"); //$NON-NLS-1$
index 7b3854212ee422086cd7875ed68521780227520f..7e5b5451b6932a1d0ec2b831d7048b4505c8a521 100644 (file)
@@ -129,7 +129,7 @@ public abstract class TextBuiltin {
        /** RevWalk used during command line parsing, if it was required. */
        protected RevWalk argWalk;
 
-       final void setCommandName(final String name) {
+       final void setCommandName(String name) {
                commandName = name;
        }
 
@@ -361,7 +361,7 @@ public abstract class TextBuiltin {
                return db;
        }
 
-       ObjectId resolve(final String s) throws IOException {
+       ObjectId resolve(String s) throws IOException {
                final ObjectId r = db.resolve(s);
                if (r == null)
                        throw die(MessageFormat.format(CLIText.get().notARevision, s));
index a133b05379ce1369c39af3e59ea8a37520ee8d8b..2d16fefa711f8e3eff3149efda96ff5c546e65f1 100644 (file)
@@ -222,7 +222,7 @@ class RebuildCommitGraph extends TextBuiltin {
 
                ObjectId newId;
 
-               ToRewrite(final ObjectId o, final long t, final ObjectId[] p) {
+               ToRewrite(ObjectId o, long t, ObjectId[] p) {
                        oldId = o;
                        commitTime = t;
                        oldParents = p;
index a960ec6dd3ca8bb5d9463218f673880c5136a24b..af56d65c0f6e4e6d30fa217992fa0378ce1678d9 100644 (file)
@@ -65,11 +65,11 @@ class ShowCommands extends TextBuiltin {
                final CommandRef[] list = CommandCatalog.all();
 
                int width = 0;
-               for (final CommandRef c : list)
+               for (CommandRef c : list)
                        width = Math.max(width, c.getName().length());
                width += 2;
 
-               for (final CommandRef c : list) {
+               for (CommandRef c : list) {
                        errw.print(c.isCommon() ? '*' : ' ');
                        errw.print(' ');
 
@@ -87,7 +87,7 @@ class ShowCommands extends TextBuiltin {
                /** */
                USAGE {
                        @Override
-                       void print(ThrowingPrintWriter err, final CommandRef c) throws IOException {
+                       void print(ThrowingPrintWriter err, CommandRef c) throws IOException {
                                String usage = c.getUsage();
                                if (usage != null && usage.length() > 0)
                                        err.print(CLIText.get().resourceBundle().getString(usage));
@@ -97,7 +97,7 @@ class ShowCommands extends TextBuiltin {
                /** */
                CLASSES {
                        @Override
-                       void print(ThrowingPrintWriter err, final CommandRef c) throws IOException {
+                       void print(ThrowingPrintWriter err, CommandRef c) throws IOException {
                                err.print(c.getImplementationClassName());
                        }
                },
@@ -105,7 +105,7 @@ class ShowCommands extends TextBuiltin {
                /** */
                URLS {
                        @Override
-                       void print(ThrowingPrintWriter err, final CommandRef c) throws IOException {
+                       void print(ThrowingPrintWriter err, CommandRef c) throws IOException {
                                final ClassLoader ldr = c.getImplementationClassLoader();
 
                                String cn = c.getImplementationClassName();
index f26952ea763c54c63952ebe302396ac6927c6483..79d8d0e10b0002083f7512f93d555eca6b2873f6 100644 (file)
@@ -85,7 +85,7 @@ public class EGitPatchHistoryTest {
 
                int errors;
 
-               PatchReader(final HashMap<String, HashMap<String, StatInfo>> s)
+               PatchReader(HashMap<String, HashMap<String, StatInfo>> s)
                                throws IOException {
                        super(new String[] { "-p" });
                        stats = s;
@@ -103,7 +103,7 @@ public class EGitPatchHistoryTest {
                        p.parse(buf, 0, buf.length - 1);
                        assertEquals("File count " + cid, files.size(), p.getFiles().size());
                        if (!p.getErrors().isEmpty()) {
-                               for (final FormatError e : p.getErrors()) {
+                               for (FormatError e : p.getErrors()) {
                                        System.out.println("error " + e.getMessage());
                                        System.out.println("  at " + e.getLineText());
                                }
@@ -111,7 +111,7 @@ public class EGitPatchHistoryTest {
                                fail("Unexpected error in " + cid);
                        }
 
-                       for (final FileHeader fh : p.getFiles()) {
+                       for (FileHeader fh : p.getFiles()) {
                                final String fileName;
                                if (fh.getChangeType() != FileHeader.ChangeType.DELETE)
                                        fileName = fh.getNewPath();
@@ -121,7 +121,7 @@ public class EGitPatchHistoryTest {
                                final String nid = fileName + " in " + cid;
                                assertNotNull("No " + nid, s);
                                int added = 0, deleted = 0;
-                               for (final HunkHeader h : fh.getHunks()) {
+                               for (HunkHeader h : fh.getHunks()) {
                                        added += h.getOldImage().getLinesAdded();
                                        deleted += h.getOldImage().getLinesDeleted();
                                }
@@ -188,7 +188,7 @@ public class EGitPatchHistoryTest {
        static abstract class CommitReader {
                private Process proc;
 
-               CommitReader(final String[] args) throws IOException {
+               CommitReader(String[] args) throws IOException {
                        final String[] realArgs = new String[3 + args.length + 1];
                        realArgs[0] = "git";
                        realArgs[1] = "log";
index cc21b473ecc2e29f093fa4d131aa892efd775bf0..bbd6ec0bde84c0d1ed4e5c8c31183a61769aa9bc 100644 (file)
@@ -1289,7 +1289,7 @@ public class CommitOnlyTest extends RepositoryTestCase {
                return null;
        }
 
-       static private String getHead(final Git git, final String path)
+       static private String getHead(Git git, String path)
                        throws Exception {
                try {
                        final Repository repo = git.getRepository();
index 2b108870f9fb8dc2329e727aa4991f813921bf9d..3598f3a4a18e32496de701193cfe090a56d6cd35 100644 (file)
@@ -78,7 +78,7 @@ public class DirCacheBuilderIteratorTest extends RepositoryTestCase {
 
                final int expIdx = 2;
                final DirCacheBuilder b = dc.builder();
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(new DirCacheBuildIterator(b));
                        tw.setRecursive(true);
                        tw.setFilter(PathFilterGroup.createFromStrings(Collections
index 0b261840c219c11bc5f5507c9ddd510c223d9a1e..c362e7497c2a42e307f3cdb6befa6b75c626eb9c 100644 (file)
@@ -99,7 +99,7 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase {
                assertEquals(ls.size(), dc.getEntryCount());
                {
                        final Iterator<CGitIndexRecord> rItr = ls.values().iterator();
-                       try (final TreeWalk tw = new TreeWalk(db)) {
+                       try (TreeWalk tw = new TreeWalk(db)) {
                                tw.setRecursive(true);
                                tw.addTree(new DirCacheIterator(dc));
                                while (rItr.hasNext()) {
@@ -180,7 +180,7 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase {
                assertEquals(cList.size(), jTree.getEntrySpan());
 
                final ArrayList<CGitLsTreeRecord> subtrees = new ArrayList<>();
-               for (final CGitLsTreeRecord r : cTree.values()) {
+               for (CGitLsTreeRecord r : cTree.values()) {
                        if (FileMode.TREE.equals(r.mode))
                                subtrees.add(r);
                }
@@ -268,7 +268,7 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase {
 
                final String path;
 
-               CGitIndexRecord(final String line) {
+               CGitIndexRecord(String line) {
                        final int tab = line.indexOf('\t');
                        final int sp1 = line.indexOf(' ');
                        final int sp2 = line.indexOf(' ', sp1 + 1);
@@ -286,7 +286,7 @@ public class DirCacheCGitCompatabilityTest extends LocalDiskRepositoryTestCase {
 
                final String path;
 
-               CGitLsTreeRecord(final String line) {
+               CGitLsTreeRecord(String line) {
                        final int tab = line.indexOf('\t');
                        final int sp1 = line.indexOf(' ');
                        final int sp2 = line.indexOf(' ', sp1 + 1);
index dd242e5a1a41200b35d306ac1d6be265975f8871..82565fceec4d3d3a77b368d20c9115d47a62dd01 100644 (file)
@@ -76,7 +76,7 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
                final DirCache dc = DirCache.newInCore();
                assertEquals(0, dc.getEntryCount());
 
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(new DirCacheIterator(dc));
                        assertFalse(tw.next());
                }
@@ -126,7 +126,7 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
                b.finish();
 
                final DirCacheIterator i = new DirCacheIterator(dc);
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(i);
                        int pathIdx = 0;
                        while (tw.next()) {
@@ -164,7 +164,7 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
                final int expPos[] = { 0, -1, 4 };
 
                final DirCacheIterator i = new DirCacheIterator(dc);
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(i);
                        tw.setRecursive(false);
                        int pathIdx = 0;
@@ -205,7 +205,7 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
                b.finish();
 
                final DirCacheIterator i = new DirCacheIterator(dc);
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(i);
                        tw.setRecursive(true);
                        int pathIdx = 0;
@@ -240,7 +240,7 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
                        b.add(ents[i]);
                b.finish();
 
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(new DirCacheIterator(dc));
                        tw.setRecursive(true);
                        int pathIdx = 0;
@@ -402,7 +402,7 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
                        b.add(ents[i]);
                b.finish();
 
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        for (int victimIdx = 0; victimIdx < paths.length; victimIdx++) {
                                tw.reset();
                                tw.addTree(new DirCacheIterator(dc));
@@ -430,7 +430,7 @@ public class DirCacheIteratorTest extends RepositoryTestCase {
                final DirCache dc = DirCache.read(path, FS.DETECTED);
                assertEquals(2, dc.getEntryCount());
 
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.setRecursive(true);
                        tw.addTree(new DirCacheIterator(dc));
 
index 2895b30263fb638cdcee3fd6c9c977cd57235703..643daa5c9585f11ff8cdb0e0e22ea62c865a6a92 100644 (file)
@@ -220,7 +220,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase {
        private File[] pack(Repository src, RevObject... list)
                        throws IOException {
                try (PackWriter pw = new PackWriter(src)) {
-                       for (final RevObject o : list) {
+                       for (RevObject o : list) {
                                pw.addObject(o);
                        }
 
@@ -253,7 +253,7 @@ public class ConcurrentRepackTest extends RepositoryTestCase {
 
        private static void delete(File[] list) throws IOException {
                final long begin = list[0].getParentFile().lastModified();
-               for (final File f : list) {
+               for (File f : list) {
                        FileUtils.delete(f);
                        assertFalse(f + " was removed", f.exists());
                }
index ed427d8895517aba0143b2fdaf3f83646e946bd5..04bed09af34e41f7c67948ccad43491a1be06670 100644 (file)
@@ -368,7 +368,7 @@ public class PackWriterTest extends SampleDataRepositoryTestCase {
                                ObjectId.fromString("902d5476fa249b7abc9d84c611577a81381f0327"),
                                ObjectId.fromString("6ff87c4664981e4397625791c8ea3bbb5f2279a3") ,
                                ObjectId.fromString("5b6e7c66c276e7610d4a73c70ec1a1f7c1003259") };
-               try (final RevWalk parser = new RevWalk(db)) {
+               try (RevWalk parser = new RevWalk(db)) {
                        final RevObject forcedOrderRevs[] = new RevObject[forcedOrder.length];
                        for (int i = 0; i < forcedOrder.length; i++)
                                forcedOrderRevs[i] = parser.parseAny(forcedOrder[i]);
index a549d32df986551f1231b35f388dd0a86f9ca2f6..e113db12acc654216e85bcc3fa31e5d19b4ec0f4 100644 (file)
@@ -305,7 +305,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
                // object (as it already exists in the pack).
                //
                final Repository newdb = createBareRepository();
-               try (final ObjectInserter oi = newdb.newObjectInserter()) {
+               try (ObjectInserter oi = newdb.newObjectInserter()) {
                        final ObjectId treeId = oi.insert(new TreeFormatter());
                        assertEquals("4b825dc642cb6eb9a060e54bf8d69288fbee4904",
                                        treeId.name());
@@ -373,7 +373,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
 
        @Test
        public void test007_Open() throws IOException {
-               try (final FileRepository db2 = new FileRepository(db.getDirectory())) {
+               try (FileRepository db2 = new FileRepository(db.getDirectory())) {
                        assertEquals(db.getDirectory(), db2.getDirectory());
                        assertEquals(db.getObjectDatabase().getDirectory(), db2
                                        .getObjectDatabase().getDirectory());
@@ -557,7 +557,7 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
        @Test
        public void test026_CreateCommitMultipleparents() throws IOException {
                final ObjectId treeId;
-               try (final ObjectInserter oi = db.newObjectInserter()) {
+               try (ObjectInserter oi = db.newObjectInserter()) {
                        final ObjectId blobId = oi.insert(Constants.OBJ_BLOB,
                                        "and this is the data in me\n".getBytes(Constants.CHARSET
                                                        .name()));
index bee11cd71a7520d09d1cacacc99646094c78db60..82ad28ed217d2511e829c0b3a5fce040dffa0a2c 100644 (file)
@@ -133,7 +133,7 @@ public class WindowCacheGetTest extends SampleDataRepositoryTestCase {
        }
 
        private void doCacheTests() throws IOException {
-               for (final TestObject o : toLoad) {
+               for (TestObject o : toLoad) {
                        final ObjectLoader or = db.open(o.id, o.type);
                        assertNotNull(or);
                        assertEquals(o.type, or.getType());
@@ -145,7 +145,7 @@ public class WindowCacheGetTest extends SampleDataRepositoryTestCase {
 
                int type;
 
-               void setType(final String typeStr) throws CorruptObjectException {
+               void setType(String typeStr) throws CorruptObjectException {
                        final byte[] typeRaw = Constants.encode(typeStr + " ");
                        final MutableInteger ptr = new MutableInteger();
                        type = Constants.decodeTypeString(id, typeRaw, (byte) ' ', ptr);
index 46f9ee3fff250cf7dfe144400a97868ed946c5cc..910999c1012edc242c3037220084d244e3dfe240 100644 (file)
@@ -53,7 +53,7 @@ import org.eclipse.jgit.util.NB;
 class XInputStream extends BufferedInputStream {
        private final byte[] intbuf = new byte[8];
 
-       XInputStream(final InputStream s) {
+       XInputStream(InputStream s) {
                super(s);
        }
 
@@ -63,7 +63,7 @@ class XInputStream extends BufferedInputStream {
                return b;
        }
 
-       synchronized void readFully(final byte[] b, int o, int len)
+       synchronized void readFully(byte[] b, int o, int len)
                        throws IOException {
                int r;
                while (len > 0 && (r = read(b, o, len)) > 0) {
index 122a3973d0f560e77a57b98e2fffb74c0741d1db..8e389ae25268616086fcc692fd4c4ead83d1b69f 100644 (file)
@@ -76,7 +76,7 @@ public class RevObjectTest extends RevWalkTestCase {
 
                final RevCommit a2;
                final RevCommit b2;
-               try (final RevWalk rw2 = new RevWalk(db)) {
+               try (RevWalk rw2 = new RevWalk(db)) {
                        a2 = rw2.parseCommit(a1);
                        b2 = rw2.parseCommit(b1);
                }
index 70b4e154ad78c4b09e837cfb0331128075fef68c..cef55210f05779732390a2d7d422ca19fc3fcdb8 100644 (file)
@@ -105,14 +105,14 @@ public class RevWalkPathFilter6012Test extends RevWalkTestCase {
        protected void check(RevCommit... order) throws Exception {
                markStart(i);
                final StringBuilder act = new StringBuilder();
-               for (final RevCommit z : rw) {
+               for (RevCommit z : rw) {
                        final String name = byName.get(z);
                        assertNotNull(name);
                        act.append(name);
                        act.append(' ');
                }
                final StringBuilder exp = new StringBuilder();
-               for (final RevCommit z : order) {
+               for (RevCommit z : order) {
                        final String name = byName.get(z);
                        assertNotNull(name);
                        exp.append(name);
index 104a69c9f797bacb9360a614a8433c86e97fef7d..611cd0cef237f443133ca4d6066e802092133cf0 100644 (file)
@@ -422,7 +422,7 @@ public class PushProcessTest extends SampleDataRepositoryTestCase {
                        PushConnection {
                MockPushConnection() {
                        final Map<String, Ref> refsMap = new HashMap<>();
-                       for (final Ref r : advertisedRefs)
+                       for (Ref r : advertisedRefs)
                                refsMap.put(r.getName(), r);
                        available(refsMap);
                }
@@ -443,7 +443,7 @@ public class PushProcessTest extends SampleDataRepositoryTestCase {
                public void push(ProgressMonitor monitor,
                                Map<String, RemoteRefUpdate> refsToUpdate)
                                throws TransportException {
-                       for (final RemoteRefUpdate rru : refsToUpdate.values()) {
+                       for (RemoteRefUpdate rru : refsToUpdate.values()) {
                                assertEquals(Status.NOT_ATTEMPTED, rru.getStatus());
                                rru.setStatus(connectionUpdateStatus);
                        }
index 7aae7b0c32b0e20af3b009a5d1a7e1e64a454215..b77042220f60c08e8b28d46184baa09c4e751ac5 100644 (file)
@@ -136,7 +136,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                try (TransportLocal t = new TransportLocal(src, uriOf(dst),
                                dst.getDirectory()) {
                        @Override
-                       ReceivePack createReceivePack(final Repository db) {
+                       ReceivePack createReceivePack(Repository db) {
                                db.close();
                                dst.incrementOpen();
 
@@ -203,7 +203,7 @@ public class ReceivePackAdvertiseRefsHookTest extends LocalDiskRepositoryTestCas
                        throws Exception {
                return new TransportLocal(src, uriOf(dst), dst.getDirectory()) {
                        @Override
-                       ReceivePack createReceivePack(final Repository db) {
+                       ReceivePack createReceivePack(Repository db) {
                                db.close();
                                dst.incrementOpen();
 
index d4c47d37e3da1950d8fcf69243d77b9b6359958a..c239922d71a71cb0c96f85c57c01f397082037a2 100644 (file)
@@ -142,7 +142,7 @@ public class TransportTest extends SampleDataRepositoryTestCase {
                assertEquals(12, result.size());
                boolean foundA = false;
                boolean foundB = false;
-               for (final RemoteRefUpdate rru : result) {
+               for (RemoteRefUpdate rru : result) {
                        if ("refs/heads/a".equals(rru.getSrcRef())
                                        && "refs/heads/test/a".equals(rru.getRemoteName()))
                                foundA = true;
@@ -174,7 +174,7 @@ public class TransportTest extends SampleDataRepositoryTestCase {
                assertEquals(2, result.size());
                boolean foundA = false;
                boolean foundC = false;
-               for (final RemoteRefUpdate rru : result) {
+               for (RemoteRefUpdate rru : result) {
                        if ("refs/heads/a".equals(rru.getSrcRef())
                                        && "refs/heads/b".equals(rru.getRemoteName()))
                                foundA = true;
@@ -233,7 +233,7 @@ public class TransportTest extends SampleDataRepositoryTestCase {
                assertEquals(2, result.size());
                boolean foundA = false;
                boolean foundC = false;
-               for (final RemoteRefUpdate rru : result) {
+               for (RemoteRefUpdate rru : result) {
                        if ("refs/heads/a".equals(rru.getSrcRef())
                                        && "refs/heads/b".equals(rru.getRemoteName())) {
                                foundA = true;
index 57eec0b58e7e379f8659acf2b426b0afbea69190..6195e640fbb90d0572675ea9166cc44fab74d48f 100644 (file)
@@ -93,7 +93,7 @@ public class CanonicalTreeParserTest {
 
        private static byte[] mktree(byte[]... data) throws Exception {
                final ByteArrayOutputStream out = new ByteArrayOutputStream();
-               for (final byte[] e : data)
+               for (byte[] e : data)
                        out.write(e);
                return out.toByteArray();
        }
index 87fe00b1c64f70a628dfcbb0fbc0a42a18ec2cef..232422edf6b3e05943b6a6a629bfb30b454f3a6c 100644 (file)
@@ -60,14 +60,14 @@ import org.junit.Test;
 public class PostOrderTreeWalkTest extends RepositoryTestCase {
        @Test
        public void testInitialize_NoPostOrder() throws Exception {
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        assertFalse(tw.isPostOrderTraversal());
                }
        }
 
        @Test
        public void testInitialize_TogglePostOrder() throws Exception {
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        assertFalse(tw.isPostOrderTraversal());
                        tw.setPostOrderTraversal(true);
                        assertTrue(tw.isPostOrderTraversal());
@@ -78,7 +78,7 @@ public class PostOrderTreeWalkTest extends RepositoryTestCase {
 
        @Test
        public void testResetDoesNotAffectPostOrder() throws Exception {
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.setPostOrderTraversal(true);
                        assertTrue(tw.isPostOrderTraversal());
                        tw.reset();
@@ -104,7 +104,7 @@ public class PostOrderTreeWalkTest extends RepositoryTestCase {
                b.finish();
                assertEquals(4, tree.getEntryCount());
 
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.setPostOrderTraversal(false);
                        tw.addTree(new DirCacheIterator(tree));
 
@@ -132,7 +132,7 @@ public class PostOrderTreeWalkTest extends RepositoryTestCase {
                b.finish();
                assertEquals(4, tree.getEntryCount());
 
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.setPostOrderTraversal(true);
                        tw.addTree(new DirCacheIterator(tree));
 
@@ -166,7 +166,7 @@ public class PostOrderTreeWalkTest extends RepositoryTestCase {
                b.finish();
                assertEquals(4, tree.getEntryCount());
 
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.setPostOrderTraversal(true);
                        tw.addTree(new DirCacheIterator(tree));
 
index d921aabdc15a735a201950d38dbdbcfbd588ed0c..71a2f327c8414bfa13c8e51ede739cc794ffe83d 100644 (file)
@@ -254,7 +254,7 @@ public class PathFilterGroupTest {
                }
        }
 
-       TreeWalk fakeWalk(final String path) throws IOException {
+       TreeWalk fakeWalk(String path) throws IOException {
                DirCache dc = DirCache.newInCore();
                DirCacheEditor dce = dc.editor();
                dce.add(new DirCacheEditor.PathEdit(path) {
@@ -274,7 +274,7 @@ public class PathFilterGroupTest {
                return ret;
        }
 
-       TreeWalk fakeWalkAtSubtree(final String path) throws IOException {
+       TreeWalk fakeWalkAtSubtree(String path) throws IOException {
                DirCache dc = DirCache.newInCore();
                DirCacheEditor dce = dc.editor();
                dce.add(new DirCacheEditor.PathEdit(path + "/README") {
index 38adda31204af2cdccd3b6bfbad51f33ee187ee2..148d5ac8205b75a71e05c2aff8a13d1e4e765f1c 100644 (file)
@@ -113,7 +113,7 @@ public class PathSuffixFilterTest extends RepositoryTestCase {
 
        private List<String> getMatchingPaths(String suffixFilter,
                        final ObjectId treeId, boolean recursiveWalk) throws IOException {
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.setFilter(PathSuffixFilter.create(suffixFilter));
                        tw.setRecursive(recursiveWalk);
                        tw.addTree(treeId);
index c3423b6fb10938c4a5c2fefc61fd35b9e154be71..8686c4f0946cfc297a618d79062367015623a02e 100644 (file)
@@ -55,7 +55,7 @@ import org.junit.Test;
 public class TreeFilterTest extends RepositoryTestCase {
        @Test
        public void testALL_IncludesAnything() throws Exception {
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(new EmptyTreeIterator());
                        assertTrue(TreeFilter.ALL.include(tw));
                }
@@ -73,7 +73,7 @@ public class TreeFilterTest extends RepositoryTestCase {
 
        @Test
        public void testNotALL_IncludesNothing() throws Exception {
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(new EmptyTreeIterator());
                        assertFalse(TreeFilter.ALL.negate().include(tw));
                }
@@ -81,7 +81,7 @@ public class TreeFilterTest extends RepositoryTestCase {
 
        @Test
        public void testANY_DIFF_IncludesSingleTreeCase() throws Exception {
-               try (final TreeWalk tw = new TreeWalk(db)) {
+               try (TreeWalk tw = new TreeWalk(db)) {
                        tw.addTree(new EmptyTreeIterator());
                        assertTrue(TreeFilter.ANY_DIFF.include(tw));
                }
index e73dab2ce695557b50a271cc8fc8e96ed025456b..edcce126bb7635e92ae22a6177d87acac6960728 100644 (file)
@@ -248,7 +248,7 @@ public class TemporaryBufferTest {
        public void testInCoreInputStream() throws IOException {
                final int cnt = 256;
                final byte[] test = new TestRng(getName()).nextBytes(cnt);
-               try (final TemporaryBuffer.Heap b = new TemporaryBuffer.Heap(cnt + 4)) {
+               try (TemporaryBuffer.Heap b = new TemporaryBuffer.Heap(cnt + 4)) {
                        b.write(test);
                        InputStream in = b.openInputStream();
                        byte[] act = new byte[cnt];
index dcf27b4a7d3edbf662765e0a2eee7405ab81d30b..b1fffd82f9be1914f11952b8cc8576439e7a40ca 100644 (file)
@@ -66,11 +66,11 @@ final class AWTPlotRenderer extends AbstractPlotRenderer<SwingLane, Color>
 
        transient Graphics2D g;
 
-       AWTPlotRenderer(final GraphCellRender c) {
+       AWTPlotRenderer(GraphCellRender c) {
                cell = c;
        }
 
-       void paint(final Graphics in, final PlotCommit<SwingLane> commit) {
+       void paint(Graphics in, PlotCommit<SwingLane> commit) {
                g = (Graphics2D) in.create();
                try {
                        final int h = cell.getHeight();
@@ -138,7 +138,7 @@ final class AWTPlotRenderer extends AbstractPlotRenderer<SwingLane, Color>
                return myLane != null ? myLane.color : Color.black;
        }
 
-       void paintTriangleDown(final int cx, final int y, final int h) {
+       void paintTriangleDown(int cx, int y, int h) {
                final int tipX = cx;
                final int tipY = y + h;
                final int baseX1 = cx - 10 / 2;
index 3f9217d1c3b6882d78ecbe97237970f820f2d8b4..943a3256fbaf3db8ae054a7d58bf008132d42306 100644 (file)
@@ -175,7 +175,7 @@ public class CommitGraphPane extends JTable {
                        }
                }
 
-               PersonIdent authorFor(final PlotCommit<SwingLane> c) {
+               PersonIdent authorFor(PlotCommit<SwingLane> c) {
                        if (c != lastCommit) {
                                lastCommit = c;
                                lastAuthor = c.getAuthorIdent();
@@ -259,7 +259,7 @@ public class CommitGraphPane extends JTable {
                        strokeCache[i] = new BasicStroke(i);
        }
 
-       static Stroke stroke(final int width) {
+       static Stroke stroke(int width) {
                if (width < strokeCache.length)
                        return strokeCache[width];
                return new BasicStroke(width);
index a05d962553e4fd56c9a10008a01e9bb766d33a6b..5c06bac1f2752428a02289a75b7ed1130d5330bd 100644 (file)
@@ -315,7 +315,7 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
                        specs.add(wcrs);
                else if (branchesToClone != null
                                && branchesToClone.size() > 0) {
-                       for (final String selectedRef : branchesToClone)
+                       for (String selectedRef : branchesToClone)
                                if (wcrs.matchSource(selectedRef))
                                        specs.add(wcrs.expandFromSource(selectedRef));
                }
@@ -410,7 +410,7 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
                }
 
                Ref foundBranch = null;
-               for (final Ref r : result.getAdvertisedRefs()) {
+               for (Ref r : result.getAdvertisedRefs()) {
                        final String n = r.getName();
                        if (!n.startsWith(Constants.R_HEADS))
                                continue;
@@ -444,7 +444,7 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
                        throws MissingObjectException, IncorrectObjectTypeException,
                        IOException {
                final RevCommit commit;
-               try (final RevWalk rw = new RevWalk(clonedRepo)) {
+               try (RevWalk rw = new RevWalk(clonedRepo)) {
                        commit = rw.parseCommit(ref.getObjectId());
                }
                return commit;
index 31987036a5228c9fbd34da5776f83e31dff8787a..13ce4e7690ac93d89bdd0fd636530e3fb730a5ed 100644 (file)
@@ -360,7 +360,7 @@ public class ResetCommand extends GitCommand<Ref> {
 
        private void resetIndexForPaths(ObjectId commitTree) {
                DirCache dc = null;
-               try (final TreeWalk tw = new TreeWalk(repo)) {
+               try (TreeWalk tw = new TreeWalk(repo)) {
                        dc = repo.lockDirCache();
                        DirCacheBuilder builder = dc.builder();
 
index 088aa15e579da60c1e9df0b71b93f73603669dd5..d2f4be84bd16e709f63afe25143fe4ac66f5169a 100644 (file)
@@ -154,7 +154,7 @@ public class RmCommand extends GitCommand<DirCache> {
                DirCache dc = null;
 
                List<String> actuallyDeletedFiles = new ArrayList<>();
-               try (final TreeWalk tw = new TreeWalk(repo)) {
+               try (TreeWalk tw = new TreeWalk(repo)) {
                        dc = repo.lockDirCache();
                        DirCacheBuilder builder = dc.builder();
                        tw.reset(); // drop the first empty tree, which we do not need here
index 82c7a4b6c721763861da7483dd2d76f1df3c6719..c32890d8a49c32baa721dae585d3a4d0b5d7e6a6 100644 (file)
@@ -195,7 +195,7 @@ public class StashCreateCommand extends GitCommand<RevCommit> {
 
        private RevCommit parseCommit(final ObjectReader reader,
                        final ObjectId headId) throws IOException {
-               try (final RevWalk walk = new RevWalk(reader)) {
+               try (RevWalk walk = new RevWalk(reader)) {
                        return walk.parseCommit(headId);
                }
        }
index 2eb313f60339e39b4a5f31d54aa30c912b0dad40..106737805c86e28c0aec38c1c0b34c3734a13b3d 100644 (file)
@@ -108,7 +108,7 @@ final class ReverseWalk extends RevWalk {
                        return children.length;
                }
 
-               ReverseCommit getChild(final int nth) {
+               ReverseCommit getChild(int nth) {
                        return children[nth];
                }
        }
index 646f264e093f4c65a2092d8f7b18a143a166050d..caaffe349b8ae6fa33deae57f04d2b45ef1baf57 100644 (file)
@@ -359,7 +359,7 @@ if (k < beginK || k > endK)
                        abstract int getLeft(int x);
                        abstract int getRight(int x);
                        abstract boolean isBetter(int left, int right);
-                       abstract void adjustMinMaxK(final int k, final int x);
+                       abstract void adjustMinMaxK(int k, int x);
                        abstract boolean meets(int d, int k, int x, long snake);
 
                        final long newSnake(int k, int x) {
@@ -469,22 +469,22 @@ if (k < beginK || k > endK)
                        }
 
                        @Override
-                       final int getLeft(final int x) {
+                       final int getLeft(int x) {
                                return x;
                        }
 
                        @Override
-                       final int getRight(final int x) {
+                       final int getRight(int x) {
                                return x + 1;
                        }
 
                        @Override
-                       final boolean isBetter(final int left, final int right) {
+                       final boolean isBetter(int left, int right) {
                                return left > right;
                        }
 
                        @Override
-                       final void adjustMinMaxK(final int k, final int x) {
+                       final void adjustMinMaxK(int k, int x) {
                                if (x >= endA || k + x >= endB) {
                                        if (k > backward.middleK)
                                                maxK = k;
@@ -517,22 +517,22 @@ if (k < beginK || k > endK)
                        }
 
                        @Override
-                       final int getLeft(final int x) {
+                       final int getLeft(int x) {
                                return x - 1;
                        }
 
                        @Override
-                       final int getRight(final int x) {
+                       final int getRight(int x) {
                                return x;
                        }
 
                        @Override
-                       final boolean isBetter(final int left, final int right) {
+                       final boolean isBetter(int left, int right) {
                                return left < right;
                        }
 
                        @Override
-                       final void adjustMinMaxK(final int k, final int x) {
+                       final void adjustMinMaxK(int k, int x) {
                                if (x <= beginA || k + x <= beginB) {
                                        if (k > forward.middleK)
                                                maxK = k;
index 09c0351b804fa054f16ed9046622ba5e7741dd7d..5897ffb758ba1fac4f949bfb84801f098ae8983f 100644 (file)
@@ -157,7 +157,7 @@ public class SimilarityIndex {
                }
        }
 
-       void hash(byte[] raw, int ptr, final int end) throws TableFullException {
+       void hash(byte[] raw, int ptr, int end) throws TableFullException {
                final boolean text = !RawText.isBinary(raw);
                hashedCnt = 0;
                while (ptr < end) {
index 752c0175861610a1f8300276644a6d8ab927d731..14653fe17f3f2f734a16425febcda3738bca152a 100644 (file)
@@ -121,11 +121,11 @@ public class DirCache {
                }
        };
 
-       static int cmp(final DirCacheEntry a, final DirCacheEntry b) {
+       static int cmp(DirCacheEntry a, DirCacheEntry b) {
                return cmp(a.path, a.path.length, b);
        }
 
-       static int cmp(final byte[] aPath, final int aLen, final DirCacheEntry b) {
+       static int cmp(byte[] aPath, int aLen, DirCacheEntry b) {
                return cmp(aPath, aLen, b.path, b.path.length);
        }
 
@@ -404,7 +404,7 @@ public class DirCache {
                return new DirCacheEditor(this, entryCnt + 16);
        }
 
-       void replace(final DirCacheEntry[] e, final int cnt) {
+       void replace(DirCacheEntry[] e, int cnt) {
                sortedEntries = e;
                entryCnt = cnt;
                tree = null;
@@ -648,7 +648,7 @@ public class DirCache {
                }
        }
 
-       void writeTo(File dir, final OutputStream os) throws IOException {
+       void writeTo(File dir, OutputStream os) throws IOException {
                final MessageDigest foot = Constants.newMessageDigest();
                final DigestOutputStream dos = new DigestOutputStream(os, foot);
 
@@ -848,7 +848,7 @@ public class DirCache {
                return nextIdx;
        }
 
-       int nextEntry(final byte[] p, final int pLen, int nextIdx) {
+       int nextEntry(byte[] p, int pLen, int nextIdx) {
                while (nextIdx < entryCnt) {
                        final DirCacheEntry next = sortedEntries[nextIdx];
                        if (!DirCacheTree.peq(p, next.path, pLen))
index 19408b0592813a3bda06c79b0ab7f8ab8c366014..fee9f51000cc7857210a743f76b0d936e62834de 100644 (file)
@@ -312,7 +312,7 @@ public class DirCacheEntry {
                System.arraycopy(src.info, src.infoOffset, info, 0, INFO_LEN);
        }
 
-       void write(final OutputStream os) throws IOException {
+       void write(OutputStream os) throws IOException {
                final int len = isExtended() ? INFO_LEN_EXTENDED : INFO_LEN;
                final int pathLen = path.length;
                os.write(info, infoOffset, len);
@@ -719,7 +719,7 @@ public class DirCacheEntry {
         * @param keepStage
         *            if true, the stage attribute will not be copied
         */
-       void copyMetaData(final DirCacheEntry src, boolean keepStage) {
+       void copyMetaData(DirCacheEntry src, boolean keepStage) {
                int origflags = NB.decodeUInt16(info, infoOffset + P_FLAGS);
                int newflags = NB.decodeUInt16(src.info, src.infoOffset + P_FLAGS);
                System.arraycopy(src.info, src.infoOffset, info, infoOffset, INFO_LEN);
@@ -771,7 +771,7 @@ public class DirCacheEntry {
                }
        }
 
-       static String toString(final byte[] path) {
+       static String toString(byte[] path) {
                return Constants.CHARSET.decode(ByteBuffer.wrap(path)).toString();
        }
 
index 575b9a25f4682f8cf111386b4b3ba0eed1d6a468..19c916f8109908a1c4d6743eaf2b20e9524fd1ca 100644 (file)
@@ -124,7 +124,7 @@ public class DirCacheIterator extends AbstractTreeIterator {
                        parseEntry();
        }
 
-       DirCacheIterator(final DirCacheIterator p, final DirCacheTree dct) {
+       DirCacheIterator(DirCacheIterator p, DirCacheTree dct) {
                super(p, p.path, p.pathLen + 1);
                cache = p.cache;
                tree = dct;
index e9f1fcd9235b9ba4ca38dd5e647732f23791893c..b605f3ca8e8639a0734defc03eb5471407eade3d 100644 (file)
@@ -185,7 +185,7 @@ public class DirCacheTree {
                childCnt = subcnt;
        }
 
-       void write(final byte[] tmp, final OutputStream os) throws IOException {
+       void write(byte[] tmp, OutputStream os) throws IOException {
                int ptr = tmp.length;
                tmp[--ptr] = '\n';
                ptr = RawParseUtils.formatBase10(tmp, ptr, childCnt);
@@ -404,7 +404,7 @@ public class DirCacheTree {
                return encodedName.length;
        }
 
-       final boolean contains(final byte[] a, int aOff, final int aLen) {
+       final boolean contains(byte[] a, int aOff, int aLen) {
                final byte[] e = encodedName;
                final int eLen = e.length;
                for (int eOff = 0; eOff < eLen && aOff < aLen; eOff++, aOff++)
@@ -531,7 +531,7 @@ public class DirCacheTree {
                children[n] = null;
        }
 
-       static boolean peq(final byte[] a, final byte[] b, int aLen) {
+       static boolean peq(byte[] a, byte[] b, int aLen) {
                if (b.length < aLen)
                        return false;
                for (aLen--; aLen >= 0; aLen--)
index 7192138b1586129ed94d03fb39d68ddef6674477..1df70e3501fbda3d623d542f7b6d8f79326f6447 100644 (file)
@@ -59,7 +59,7 @@ public class CompoundException extends Exception {
        private static String format(Collection<Throwable> causes) {
                final StringBuilder msg = new StringBuilder();
                msg.append(JGitText.get().failureDueToOneOfTheFollowing);
-               for (final Throwable c : causes) {
+               for (Throwable c : causes) {
                        msg.append("  "); //$NON-NLS-1$
                        msg.append(c.getMessage());
                        msg.append("\n"); //$NON-NLS-1$
index 9efc21e7c702810db6cec647f0c2bfde0273f287..b37d20d58f9ab89c0187e5ce9b20491d8d9485c7 100644 (file)
@@ -59,7 +59,7 @@ public class MissingBundlePrerequisiteException extends TransportException {
        private static String format(Map<ObjectId, String> missingCommits) {
                final StringBuilder r = new StringBuilder();
                r.append(JGitText.get().missingPrerequisiteCommits);
-               for (final Map.Entry<ObjectId, String> e : missingCommits.entrySet()) {
+               for (Map.Entry<ObjectId, String> e : missingCommits.entrySet()) {
                        r.append("\n  "); //$NON-NLS-1$
                        r.append(e.getKey().name());
                        if (e.getValue() != null)
index eb98a3acd8e6b03900e10141e06b80a551dd54c0..1dc5931ca2126d72bc3cc3692593807adfc82f83 100644 (file)
@@ -61,7 +61,7 @@ final class GroupHead extends AbstractHead {
 
        private final boolean inverse;
 
-       GroupHead(String pattern, final String wholePattern)
+       GroupHead(String pattern, String wholePattern)
                        throws InvalidPatternException {
                super(false);
                this.characterClasses = new ArrayList<>();
@@ -214,7 +214,7 @@ final class GroupHead extends AbstractHead {
        private static final class OneCharacterPattern implements CharacterPattern {
                private char expectedCharacter;
 
-               OneCharacterPattern(final char c) {
+               OneCharacterPattern(char c) {
                        this.expectedCharacter = c;
                }
 
index 2068b0d896729ead4dc9b1a759489b6ed02fd301..45e6ed2947c9276aea670fc56be97b61929b20cb 100644 (file)
@@ -47,7 +47,7 @@ package org.eclipse.jgit.fnmatch;
 final class RestrictedWildCardHead extends AbstractHead {
        private final char excludedCharacter;
 
-       RestrictedWildCardHead(final char excludedCharacter, final boolean star) {
+       RestrictedWildCardHead(char excludedCharacter, boolean star) {
                super(star);
                this.excludedCharacter = excludedCharacter;
        }
index 8e9ed5d0d86fd798d0d1683d1aa26578eb937aab..ca54ee22ea21f1b1ba8446e7c169baa46bc3b8bd 100644 (file)
@@ -497,7 +497,7 @@ public abstract class DfsObjDatabase extends ObjectDatabase {
                } while (!packList.compareAndSet(o, n));
        }
 
-       PackList scanPacks(final PackList original) throws IOException {
+       PackList scanPacks(PackList original) throws IOException {
                PackList o, n;
                synchronized (packList) {
                        do {
index 3a04d70dbbdca938813256cd6a50cbb2146e570f..5f4dee226402893c15557e522581719e1989bb8d 100644 (file)
@@ -60,7 +60,7 @@ class DfsObjectToPack extends ObjectToPack {
        /** Length of the data section of the object. */
        long length;
 
-       DfsObjectToPack(AnyObjectId src, final int type) {
+       DfsObjectToPack(AnyObjectId src, int type) {
                super(src, type);
        }
 
index 07b607c18918d70312cc56984295043b73b5ddb6..c6fdeb0d1f6d5f02cd147176b99febaa6e709dce 100644 (file)
@@ -58,7 +58,7 @@ import org.eclipse.jgit.internal.storage.pack.PackOutputStream;
 final class ByteArrayWindow extends ByteWindow {
        private final byte[] array;
 
-       ByteArrayWindow(final PackFile pack, final long o, final byte[] b) {
+       ByteArrayWindow(PackFile pack, long o, byte[] b) {
                super(pack, o, b.length);
                array = b;
        }
index 343d36922f91f70ca7c2a064e0de7ceda8cf03c1..8e7904f8823cc77586d30b40d82a9f856ceb827a 100644 (file)
@@ -60,7 +60,7 @@ import org.eclipse.jgit.internal.storage.pack.PackOutputStream;
 final class ByteBufferWindow extends ByteWindow {
        private final ByteBuffer buffer;
 
-       ByteBufferWindow(final PackFile pack, final long o, final ByteBuffer b) {
+       ByteBufferWindow(PackFile pack, long o, ByteBuffer b) {
                super(pack, o, b.capacity());
                buffer = b;
        }
index a3146dbb523bb26343849b6e243fed05c76ffe26..60073f39d348453489fb44de290ce0239cb0458b 100644 (file)
@@ -86,7 +86,7 @@ abstract class ByteWindow {
                return (int) (end - start);
        }
 
-       final boolean contains(final PackFile neededFile, final long neededPos) {
+       final boolean contains(PackFile neededFile, long neededPos) {
                return pack == neededFile && start <= neededPos && neededPos < end;
        }
 
index 945e97950d519009099ed3761621a08bd4090197..7f7ecc268dce20bd5e8b48ab9676fbba56d21fcd 100644 (file)
@@ -205,7 +205,7 @@ class CachedObjectDirectory extends FileObjectDatabase {
        }
 
        @Override
-       ObjectLoader openObject(final WindowCursor curs, final AnyObjectId objectId)
+       ObjectLoader openObject(WindowCursor curs, AnyObjectId objectId)
                        throws IOException {
                return openObject(curs, objectId, null);
        }
index b464a1b79f3c981b473d10e58fa56a564ed1e369..ed73e722321401c4b30ad8c65bb50853aeac8ac5 100644 (file)
@@ -82,7 +82,7 @@ class DeltaBaseCache {
                cache = new Slot[CACHE_SZ];
        }
 
-       Entry get(final PackFile pack, final long position) {
+       Entry get(PackFile pack, long position) {
                Slot e = cache[hash(position)];
                if (e == null)
                        return null;
@@ -168,7 +168,7 @@ class DeltaBaseCache {
 
                final int type;
 
-               Entry(final byte[] aData, final int aType) {
+               Entry(byte[] aData, int aType) {
                        data = aData;
                        type = aType;
                }
index 137a75731123351e6a25aa4658f6afd84d41e734..342e2c842c2d422026f282c286721da548ab184d 100644 (file)
@@ -852,7 +852,7 @@ public class GC {
                }
 
                List<ObjectIdSet> excluded = new LinkedList<>();
-               for (final PackFile f : repo.getObjectDatabase().getPacks()) {
+               for (PackFile f : repo.getObjectDatabase().getPacks()) {
                        checkCancelled();
                        if (f.shouldBeKept())
                                excluded.add(f.getIndex());
index 55eeb95ce57bf4af93fcc0feabd5bbd367a4f133..ed5cbfcf5dbc666b147cfe3e299786a32566e1f5 100644 (file)
@@ -58,7 +58,7 @@ class LocalObjectToPack extends ObjectToPack {
        /** Length of the data section of the object. */
        long length;
 
-       LocalObjectToPack(AnyObjectId src, final int type) {
+       LocalObjectToPack(AnyObjectId src, int type) {
                super(src, type);
        }
 
index 4cab5f8bb83c0315ce251b1ecc10f6c7cb400ef9..51c5702fc26e974f8f7235d5d2963bb2d4d0a73a 100644 (file)
@@ -257,7 +257,7 @@ public class ObjectDirectory extends FileObjectDatabase {
                // Fully close all loaded alternates and clear the alternate list.
                AlternateHandle[] alt = alternates.get();
                if (alt != null && alternates.compareAndSet(alt, null)) {
-                       for(final AlternateHandle od : alt)
+                       for(AlternateHandle od : alt)
                                od.close();
                }
        }
@@ -619,7 +619,7 @@ public class ObjectDirectory extends FileObjectDatabase {
                        WindowCursor curs, Set<AlternateHandle.Id> skips) throws IOException {
                PackList pList = packList.get();
                SEARCH: for (;;) {
-                       for (final PackFile p : pList.packs) {
+                       for (PackFile p : pList.packs) {
                                try {
                                        LocalObjectRepresentation rep = p.representation(curs, otp);
                                        p.resetTransientErrorCount();
@@ -888,7 +888,7 @@ public class ObjectDirectory extends FileObjectDatabase {
                final Set<String> names = listPackDirectory();
                final List<PackFile> list = new ArrayList<>(names.size() >> 2);
                boolean foundNew = false;
-               for (final String indexName : names) {
+               for (String indexName : names) {
                        // Must match "pack-[0-9a-f]{40}.idx" to be an index.
                        //
                        if (indexName.length() != 49 || !indexName.endsWith(".idx")) //$NON-NLS-1$
@@ -931,7 +931,7 @@ public class ObjectDirectory extends FileObjectDatabase {
                        return old;
                }
 
-               for (final PackFile p : forReuse.values()) {
+               for (PackFile p : forReuse.values()) {
                        p.close();
                }
 
@@ -945,7 +945,7 @@ public class ObjectDirectory extends FileObjectDatabase {
 
        private static Map<String, PackFile> reuseMap(PackList old) {
                final Map<String, PackFile> forReuse = new HashMap<>();
-               for (final PackFile p : old.packs) {
+               for (PackFile p : old.packs) {
                        if (p.invalid()) {
                                // The pack instance is corrupted, and cannot be safely used
                                // again. Do not include it in our reuse map.
@@ -974,7 +974,7 @@ public class ObjectDirectory extends FileObjectDatabase {
                if (nameList == null)
                        return Collections.emptySet();
                final Set<String> nameSet = new HashSet<>(nameList.length << 1);
-               for (final String name : nameList) {
+               for (String name : nameList) {
                        if (name.startsWith("pack-")) //$NON-NLS-1$
                                nameSet.add(name);
                }
@@ -1076,7 +1076,7 @@ public class ObjectDirectory extends FileObjectDatabase {
                /** All known packs, sorted by {@link PackFile#SORT}. */
                final PackFile[] packs;
 
-               PackList(final FileSnapshot monitor, final PackFile[] packs) {
+               PackList(FileSnapshot monitor, PackFile[] packs) {
                        this.snapshot = monitor;
                        this.packs = packs;
                }
index e6ae9686a4769b12df7814eb683fa18e9ce5e5a4..e5a54e372c8633cb3aba5826d2fc586466504e7c 100644 (file)
@@ -78,7 +78,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
 
        private Deflater deflate;
 
-       ObjectDirectoryInserter(final FileObjectDatabase dest, final Config cfg) {
+       ObjectDirectoryInserter(FileObjectDatabase dest, Config cfg) {
                db = dest;
                config = cfg.get(WriteConfig.KEY);
        }
@@ -267,7 +267,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
                }
        }
 
-       void writeHeader(OutputStream out, final int type, long len)
+       void writeHeader(OutputStream out, int type, long len)
                        throws IOException {
                out.write(Constants.encodedTypeString(type));
                out.write((byte) ' ');
@@ -279,7 +279,7 @@ class ObjectDirectoryInserter extends ObjectInserter {
                return File.createTempFile("noz", null, db.getDirectory()); //$NON-NLS-1$
        }
 
-       DeflaterOutputStream compress(final OutputStream out) {
+       DeflaterOutputStream compress(OutputStream out) {
                if (deflate == null)
                        deflate = new Deflater(config.getCompression());
                else
index c32ba36010c17df4e1ef7d967b6719aec046e04a..71f64ae11fe96c6f305c0dbfe7dbda3a9f736d24 100644 (file)
@@ -279,7 +279,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
         * @throws IOException
         *             the pack file or the index could not be read.
         */
-       ObjectLoader get(final WindowCursor curs, final AnyObjectId id)
+       ObjectLoader get(WindowCursor curs, AnyObjectId id)
                        throws IOException {
                final long offset = idx().findOffset(id);
                return 0 < offset && !isCorrupt(offset) ? load(curs, offset) : null;
@@ -344,7 +344,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
         * @throws IOException
         *             the index file cannot be loaded into memory.
         */
-       ObjectId findObjectForOffset(final long offset) throws IOException {
+       ObjectId findObjectForOffset(long offset) throws IOException {
                return getReverseIdx().findObject(offset);
        }
 
@@ -692,7 +692,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
                }
        }
 
-       ByteArrayWindow read(final long pos, int size) throws IOException {
+       ByteArrayWindow read(long pos, int size) throws IOException {
                synchronized (readLock) {
                        if (length < pos + size)
                                size = (int) (length - pos);
@@ -703,7 +703,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
                }
        }
 
-       ByteWindow mmap(final long pos, int size) throws IOException {
+       ByteWindow mmap(long pos, int size) throws IOException {
                synchronized (readLock) {
                        if (length < pos + size)
                                size = (int) (length - pos);
@@ -760,7 +760,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
                }
        }
 
-       ObjectLoader load(final WindowCursor curs, long pos)
+       ObjectLoader load(WindowCursor curs, long pos)
                        throws IOException, LargeObjectException {
                try {
                        final byte[] ib = curs.tempId;
@@ -949,7 +949,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
                return hdr;
        }
 
-       int getObjectType(final WindowCursor curs, long pos) throws IOException {
+       int getObjectType(WindowCursor curs, long pos) throws IOException {
                final byte[] ib = curs.tempId;
                for (;;) {
                        readFully(pos, ib, 0, 20, curs);
@@ -996,13 +996,13 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
                }
        }
 
-       long getObjectSize(final WindowCursor curs, final AnyObjectId id)
+       long getObjectSize(WindowCursor curs, AnyObjectId id)
                        throws IOException {
                final long offset = idx().findOffset(id);
                return 0 < offset ? getObjectSize(curs, offset) : -1;
        }
 
-       long getObjectSize(final WindowCursor curs, final long pos)
+       long getObjectSize(WindowCursor curs, long pos)
                        throws IOException {
                final byte[] ib = curs.tempId;
                readFully(pos, ib, 0, 20, curs);
index 66d35bd900ac037789446bf84ecebd02c8fde5d7..4444dd691fb3ddba87bfffe8ee0494b183e8e954 100644 (file)
@@ -113,7 +113,7 @@ class PackIndexV1 extends PackIndex {
        @Override
        public long getOffset64Count() {
                long n64 = 0;
-               for (final MutableEntry e : this) {
+               for (MutableEntry e : this) {
                        if (e.getOffset() >= Integer.MAX_VALUE)
                                n64++;
                }
index 61bb902a970f4062bd2d483a7ad74e7fc8458184..553f7c9a1985f5ebaf651f0c11fff045f55d3372 100644 (file)
@@ -123,7 +123,7 @@ public abstract class PackIndexWriter {
         */
        public static int oldestPossibleFormat(
                        final List<? extends PackedObjectInfo> objs) {
-               for (final PackedObjectInfo oe : objs) {
+               for (PackedObjectInfo oe : objs) {
                        if (!PackIndexWriterV1.canStore(oe))
                                return 2;
                }
@@ -269,11 +269,11 @@ public abstract class PackIndexWriter {
         */
        protected void writeFanOutTable() throws IOException {
                final int[] fanout = new int[256];
-               for (final PackedObjectInfo po : entries)
+               for (PackedObjectInfo po : entries)
                        fanout[po.getFirstByte() & 0xff]++;
                for (int i = 1; i < 256; i++)
                        fanout[i] += fanout[i - 1];
-               for (final int n : fanout) {
+               for (int n : fanout) {
                        NB.encodeInt32(tmp, 0, n);
                        out.write(tmp, 0, 4);
                }
index f220e7a6c6ccb59c7f39623ba232306280fc65ed..877f7c8cd75effe5365fc696d0a5592c38d01303 100644 (file)
@@ -58,7 +58,7 @@ import org.eclipse.jgit.util.NB;
  * @see PackIndexV1
  */
 class PackIndexWriterV1 extends PackIndexWriter {
-       static boolean canStore(final PackedObjectInfo oe) {
+       static boolean canStore(PackedObjectInfo oe) {
                // We are limited to 4 GB per pack as offset is 32 bit unsigned int.
                //
                return oe.getOffset() >>> 1 < Integer.MAX_VALUE;
@@ -73,7 +73,7 @@ class PackIndexWriterV1 extends PackIndexWriter {
        protected void writeImpl() throws IOException {
                writeFanOutTable();
 
-               for (final PackedObjectInfo oe : entries) {
+               for (PackedObjectInfo oe : entries) {
                        if (!canStore(oe))
                                throw new IOException(JGitText.get().packTooLargeForIndexVersion1);
                        NB.encodeInt32(tmp, 0, (int) oe.getOffset());
index a18ccaf9eac15c181ad0d6a7204855a7e876098b..9505d35b71098612891167d1d1f8deb9d99adf66 100644 (file)
@@ -76,12 +76,12 @@ class PackIndexWriterV2 extends PackIndexWriter {
        }
 
        private void writeObjectNames() throws IOException {
-               for (final PackedObjectInfo oe : entries)
+               for (PackedObjectInfo oe : entries)
                        oe.copyRawTo(out);
        }
 
        private void writeCRCs() throws IOException {
-               for (final PackedObjectInfo oe : entries) {
+               for (PackedObjectInfo oe : entries) {
                        NB.encodeInt32(tmp, 0, oe.getCRC());
                        out.write(tmp, 0, 4);
                }
@@ -89,7 +89,7 @@ class PackIndexWriterV2 extends PackIndexWriter {
 
        private void writeOffset32() throws IOException {
                int o64 = 0;
-               for (final PackedObjectInfo oe : entries) {
+               for (PackedObjectInfo oe : entries) {
                        final long o = oe.getOffset();
                        if (o <= MAX_OFFSET_32)
                                NB.encodeInt32(tmp, 0, (int) o);
@@ -100,7 +100,7 @@ class PackIndexWriterV2 extends PackIndexWriter {
        }
 
        private void writeOffset64() throws IOException {
-               for (final PackedObjectInfo oe : entries) {
+               for (PackedObjectInfo oe : entries) {
                        final long o = oe.getOffset();
                        if (MAX_OFFSET_32 < o) {
                                NB.encodeInt64(tmp, 0, o);
index fb7eddf6b6677420465517238d65bf4c1493a30a..dfe23ba79c7e8a2e2f5015853f841d6b2bfe12f0 100644 (file)
@@ -107,7 +107,7 @@ public class PackReverseIndex {
 
                long maxOffset = 0;
                int ith = 0;
-               for (final MutableEntry me : index) {
+               for (MutableEntry me : index) {
                        final long o = me.getOffset();
                        offsetsBySha1[ith++] = o;
                        if (o > maxOffset)
index 8e3357fdcb8c9597e41669c55fd052c21bbb0976..a27b99157c04702d78b83b0d6d07fc72e14a6970 100644 (file)
@@ -208,7 +208,7 @@ public class RefDirectory extends RefDatabase {
 
        private List<Integer> retrySleepMs = RETRY_SLEEP_MS;
 
-       RefDirectory(final FileRepository db) {
+       RefDirectory(FileRepository db) {
                final FS fs = db.getFS();
                parent = db;
                gitDir = db.getDirectory();
@@ -434,7 +434,7 @@ public class RefDirectory extends RefDatabase {
 
                RefList.Builder<LooseRef> newLoose;
 
-               LooseScanner(final RefList<LooseRef> curLoose) {
+               LooseScanner(RefList<LooseRef> curLoose) {
                        this.curLoose = curLoose;
                }
 
@@ -1262,14 +1262,14 @@ public class RefDirectory extends RefDatabase {
                return new File(gitDir, name);
        }
 
-       static int levelsIn(final String name) {
+       static int levelsIn(String name) {
                int count = 0;
                for (int p = name.indexOf('/'); p >= 0; p = name.indexOf('/', p + 1))
                        count++;
                return count;
        }
 
-       static void delete(final File file, final int depth) throws IOException {
+       static void delete(File file, int depth) throws IOException {
                delete(file, depth, null);
        }
 
index 202e51f6c81174509b273e93193df10534495c3c..ec7ec73be811661960fa3181a8289b276bc143ef 100644 (file)
@@ -104,7 +104,7 @@ class RefDirectoryRename extends RefRename {
                objId = source.getOldObjectId();
                updateHEAD = needToUpdateHEAD();
                tmp = refdb.newTemporaryUpdate();
-               try (final RevWalk rw = new RevWalk(refdb.getRepository())) {
+               try (RevWalk rw = new RevWalk(refdb.getRepository())) {
                        // First backup the source so its never unreachable.
                        tmp.setNewObjectId(objId);
                        tmp.setForceUpdate(true);
index fb839dff614b47e5a5e2e88a410ba925fc0c38fe..45ce6349a59f133a3bb620b84c866bc24d0dd6f6 100644 (file)
@@ -60,7 +60,7 @@ class RefDirectoryUpdate extends RefUpdate {
        private boolean shouldDeref;
        private LockFile lock;
 
-       RefDirectoryUpdate(final RefDirectory r, final Ref ref) {
+       RefDirectoryUpdate(RefDirectory r, Ref ref) {
                super(ref);
                database = r;
        }
index adb05e4d990c2260b6dc7fd91018eb73bb56817e..cf474afbbe2cad48a8ccf9dd3d8921c230a9b07d 100644 (file)
@@ -266,7 +266,7 @@ public class UnpackedObject {
                }
        }
 
-       static boolean isStandardFormat(final byte[] hdr) {
+       static boolean isStandardFormat(byte[] hdr) {
                /*
                 * We must determine if the buffer contains the standard
                 * zlib-deflated stream or the experimental format based
index c03fb2f835eac78730562a11f291bb4637f4bf9e..8cf1d4e219bc9f5a5b0c97bfdd95366125965387 100644 (file)
@@ -178,7 +178,7 @@ public class WindowCache {
                return cache;
        }
 
-       static final ByteWindow get(final PackFile pack, final long offset)
+       static final ByteWindow get(PackFile pack, long offset)
                        throws IOException {
                final WindowCache c = cache;
                final ByteWindow r = c.getOrLoad(pack, c.toStart(offset));
@@ -193,7 +193,7 @@ public class WindowCache {
                return r;
        }
 
-       static final void purge(final PackFile pack) {
+       static final void purge(PackFile pack) {
                cache.removeAll(pack);
        }
 
@@ -556,7 +556,7 @@ public class WindowCache {
                 */
                volatile boolean dead;
 
-               Entry(final Entry n, final Ref r) {
+               Entry(Entry n, Ref r) {
                        next = n;
                        ref = r;
                }
index 569bfe895f81a625e3efd3533cb8dc553f1f0460..010c142887e23be713cd890377383a230481c946 100644 (file)
@@ -347,7 +347,7 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
                        inf.reset();
        }
 
-       void pin(final PackFile pack, final long position)
+       void pin(PackFile pack, long position)
                        throws IOException {
                final ByteWindow w = window;
                if (w == null || !w.contains(pack, position)) {
index f5e600d55850935862f3eff7d73d4d44a0307dbf..36d6f0aebc562a9bd140b1b589fcfd01cb633a80 100644 (file)
@@ -1526,7 +1526,7 @@ public class PackWriter implements AutoCloseable {
                        // The caller gave us an executor, but it might not do
                        // asynchronous execution.  Wrap everything and hope it
                        // can schedule these for us.
-                       for (final DeltaTask task : taskBlock.tasks) {
+                       for (DeltaTask task : taskBlock.tasks) {
                                executor.execute(new Runnable() {
                                        @Override
                                        public void run() {
index 6acc684bc738385f82bd70f84eb3aab339e5559e..d105d0d2006f448daeeee9540fa01df0c0fd0937 100644 (file)
@@ -165,7 +165,7 @@ public final class AbbreviatedObjectId implements Serializable {
                return r << (8 - n) * 4;
        }
 
-       static int mask(final int nibbles, final int word, final int v) {
+       static int mask(int nibbles, int word, int v) {
                final int b = (word - 1) * 8;
                if (b + 8 <= nibbles) {
                        // We have all of the bits required for this word.
index e7d465b125d867916d249be31cc53745dfc71d51..978dd3a72907108dcf2b36da73c7452d1571efd8 100644 (file)
@@ -481,7 +481,7 @@ public abstract class AnyObjectId implements Comparable<AnyObjectId> {
        private static final char[] hexchar = { '0', '1', '2', '3', '4', '5', '6',
                        '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };
 
-       static void formatHexChar(final char[] dst, final int p, int w) {
+       static void formatHexChar(char[] dst, int p, int w) {
                int o = p + 7;
                while (o >= p && w != 0) {
                        dst[o--] = hexchar[w & 0xf];
index f59cc6961d440fd915e849cc4cac8b211f92070a..0e01cca99b4747fac4170d97b818aa6757522093 100644 (file)
@@ -1010,7 +1010,7 @@ public class Config {
         */
        public String toText() {
                final StringBuilder out = new StringBuilder();
-               for (final ConfigLine e : state.get().entryList) {
+               for (ConfigLine e : state.get().entryList) {
                        if (e.prefix != null)
                                out.append(e.prefix);
                        if (e.section != null && e.name == null) {
@@ -1452,7 +1452,7 @@ public class Config {
 
                private int pos;
 
-               StringReader(final String in) {
+               StringReader(String in) {
                        buf = in.toCharArray();
                }
 
index 011cecccac8c36564cd584870f666447cd2b3ebe..937ba925c50f8a3821f62586e63f60390c746269 100644 (file)
@@ -73,7 +73,7 @@ class ConfigLine {
        /** The text content after entry. */
        String suffix;
 
-       ConfigLine forValue(final String newValue) {
+       ConfigLine forValue(String newValue) {
                final ConfigLine e = new ConfigLine();
                e.prefix = prefix;
                e.section = section;
@@ -91,7 +91,7 @@ class ConfigLine {
                                && eqIgnoreCase(name, aKey);
        }
 
-       boolean match(final String aSection, final String aSubsection) {
+       boolean match(String aSection, String aSubsection) {
                return eqIgnoreCase(section, aSection)
                                && eqSameCase(subsection, aSubsection);
        }
index 89aef7fcf48ba243a519367057d1bd969e6115cb..891c7f23b41c57861fba3d1675c91e6fd320fb9e 100644 (file)
@@ -271,7 +271,7 @@ public class DefaultTypedConfigGetter implements TypedConfigGetter {
        }
 
        private static boolean match(String a, String... cases) {
-               for (final String b : cases) {
+               for (String b : cases) {
                        if (b != null && b.equalsIgnoreCase(a)) {
                                return true;
                        }
index 3abdc0c41a31a8c2ac0994453a20d9fec123a9f7..93add5c66151559b1624abea88d0fd690448d97d 100644 (file)
@@ -122,7 +122,7 @@ public abstract class ObjectDatabase {
         *             the object store cannot be accessed.
         */
        public boolean has(AnyObjectId objectId) throws IOException {
-               try (final ObjectReader or = newReader()) {
+               try (ObjectReader or = newReader()) {
                        return or.has(objectId);
                }
        }
@@ -172,7 +172,7 @@ public abstract class ObjectDatabase {
        public ObjectLoader open(AnyObjectId objectId, int typeHint)
                        throws MissingObjectException, IncorrectObjectTypeException,
                        IOException {
-               try (final ObjectReader or = newReader()) {
+               try (ObjectReader or = newReader()) {
                        return or.open(objectId, typeHint);
                }
        }
index 90a0350dd79092f6502cb430da244cd4ac7f7f86..71ee96363c6c63678bbfd7d685f187f8bdcb54bd 100644 (file)
@@ -116,7 +116,7 @@ public abstract class RefWriter {
        public void writeInfoRefs() throws IOException {
                final StringWriter w = new StringWriter();
                final char[] tmp = new char[Constants.OBJECT_ID_STRING_LENGTH];
-               for (final Ref r : refs) {
+               for (Ref r : refs) {
                        if (Constants.HEAD.equals(r.getName())) {
                                // Historically HEAD has never been published through
                                // the INFO_REFS file. This is a mistake, but its the
@@ -161,7 +161,7 @@ public abstract class RefWriter {
         */
        public void writePackedRefs() throws IOException {
                boolean peeled = false;
-               for (final Ref r : refs) {
+               for (Ref r : refs) {
                        if (r.getStorage().isPacked() && r.isPeeled()) {
                                peeled = true;
                                break;
@@ -177,7 +177,7 @@ public abstract class RefWriter {
                }
 
                final char[] tmp = new char[Constants.OBJECT_ID_STRING_LENGTH];
-               for (final Ref r : refs) {
+               for (Ref r : refs) {
                        if (r.getStorage() != Ref.Storage.PACKED)
                                continue;
 
index 08f0a8a62957a23eb551355b8925faae0c6c1cae..4aeacf508277c988ddddc8d3bbdbef952ec5b9b0 100644 (file)
@@ -116,13 +116,13 @@ public class StrategySimpleTwoWayInCore extends ThreeWayMergeStrategy {
 
                private ObjectId resultTree;
 
-               InCoreMerger(final Repository local) {
+               InCoreMerger(Repository local) {
                        super(local);
                        tw = new NameConflictTreeWalk(local, reader);
                        cache = DirCache.newInCore();
                }
 
-               InCoreMerger(final ObjectInserter inserter) {
+               InCoreMerger(ObjectInserter inserter) {
                        super(inserter);
                        tw = new NameConflictTreeWalk(null, reader);
                        cache = DirCache.newInCore();
index 079d6f6d67202f5c18d677a8b9b17374b91d17f7..95391ec565184362bd052672ad7a8188b2967304 100644 (file)
@@ -80,7 +80,7 @@ public class BinaryHunk {
        /** Inflated length of the data. */
        private int length;
 
-       BinaryHunk(final FileHeader fh, final int offset) {
+       BinaryHunk(FileHeader fh, int offset) {
                file = fh;
                startOffset = offset;
        }
@@ -139,7 +139,7 @@ public class BinaryHunk {
                return length;
        }
 
-       int parseHunk(int ptr, final int end) {
+       int parseHunk(int ptr, int end) {
                final byte[] buf = file.buf;
 
                if (match(buf, ptr, LITERAL) >= 0) {
index 0f8f7aad0292b999dfbdbbe3388c917ff5ca53b1..34075787fb185554c992564e54cce474c5af2e22 100644 (file)
@@ -69,7 +69,7 @@ public class CombinedFileHeader extends FileHeader {
 
        private FileMode[] oldModes;
 
-       CombinedFileHeader(final byte[] b, final int offset) {
+       CombinedFileHeader(byte[] b, int offset) {
                super(b, offset);
        }
 
@@ -154,7 +154,7 @@ public class CombinedFileHeader extends FileHeader {
        }
 
        @Override
-       int parseGitHeaders(int ptr, final int end) {
+       int parseGitHeaders(int ptr, int end) {
                while (ptr < end) {
                        final int eol = nextLF(buf, ptr);
                        if (isHunkHdr(buf, ptr, end) >= 1) {
@@ -220,7 +220,7 @@ public class CombinedFileHeader extends FileHeader {
        }
 
        @Override
-       HunkHeader newHunkHeader(final int offset) {
+       HunkHeader newHunkHeader(int offset) {
                return new CombinedHunkHeader(this, offset);
        }
 
index 3f27bb3b2c1c5fdfc97a378d999f571ae6355a64..d278132c618cd1b82d3ee009551b76468ad8aede 100644 (file)
@@ -64,7 +64,7 @@ public class CombinedHunkHeader extends HunkHeader {
 
        private CombinedOldImage[] old;
 
-       CombinedHunkHeader(final CombinedFileHeader fh, final int offset) {
+       CombinedHunkHeader(CombinedFileHeader fh, int offset) {
                super(fh, offset, null);
                old = new CombinedOldImage[fh.getParentCount()];
                for (int i = 0; i < old.length; i++) {
@@ -125,11 +125,11 @@ public class CombinedHunkHeader extends HunkHeader {
        }
 
        @Override
-       int parseBody(final Patch script, final int end) {
+       int parseBody(Patch script, int end) {
                final byte[] buf = file.buf;
                int c = nextLF(buf, startOffset);
 
-               for (final CombinedOldImage o : old) {
+               for (CombinedOldImage o : old) {
                        o.nDeleted = 0;
                        o.nAdded = 0;
                        o.nContext = 0;
@@ -207,7 +207,7 @@ public class CombinedHunkHeader extends HunkHeader {
        }
 
        @Override
-       void extractFileLines(final OutputStream[] out) throws IOException {
+       void extractFileLines(OutputStream[] out) throws IOException {
                final byte[] buf = file.buf;
                int ptr = startOffset;
                int eol = nextLF(buf, ptr);
index 32cf642305a40b9a3de8da98a467f72b8c4fc4ff..d0a5216e1ecfc4535acbc0764862014d9009317d 100644 (file)
@@ -155,7 +155,7 @@ public class FileHeader extends DiffEntry {
                addHunk(new HunkHeader(this, edits));
        }
 
-       FileHeader(final byte[] b, final int offset) {
+       FileHeader(byte[] b, int offset) {
                buf = b;
                startOffset = offset;
                changeType = ChangeType.MODIFY; // unless otherwise designated
@@ -264,7 +264,7 @@ public class FileHeader extends DiffEntry {
 
                final String[] files = extractFileLines(charsetGuess);
                final int[] offsets = new int[files.length];
-               for (final HunkHeader h : getHunks())
+               for (HunkHeader h : getHunks())
                        h.extractFileLines(r, files, offsets);
                return r.toString();
        }
@@ -284,7 +284,7 @@ public class FileHeader extends DiffEntry {
                try {
                        for (int i = 0; i < tmp.length; i++)
                                tmp[i] = new TemporaryBuffer.Heap(Integer.MAX_VALUE);
-                       for (final HunkHeader h : getHunks())
+                       for (HunkHeader h : getHunks())
                                h.extractFileLines(tmp);
 
                        final String[] r = new String[tmp.length];
@@ -329,7 +329,7 @@ public class FileHeader extends DiffEntry {
                return hunks;
        }
 
-       void addHunk(final HunkHeader h) {
+       void addHunk(HunkHeader h) {
                if (h.getFileHeader() != this)
                        throw new IllegalArgumentException(JGitText.get().hunkBelongsToAnotherFile);
                if (hunks == null)
@@ -337,7 +337,7 @@ public class FileHeader extends DiffEntry {
                hunks.add(h);
        }
 
-       HunkHeader newHunkHeader(final int offset) {
+       HunkHeader newHunkHeader(int offset) {
                return new HunkHeader(this, offset);
        }
 
@@ -370,7 +370,7 @@ public class FileHeader extends DiffEntry {
         */
        public EditList toEditList() {
                final EditList r = new EditList();
-               for (final HunkHeader hunk : hunks)
+               for (HunkHeader hunk : hunks)
                        r.addAll(hunk.toEditList());
                return r;
        }
@@ -384,7 +384,7 @@ public class FileHeader extends DiffEntry {
         *            one past the last position to parse.
         * @return first character after the LF at the end of the line; -1 on error.
         */
-       int parseGitFileName(int ptr, final int end) {
+       int parseGitFileName(int ptr, int end) {
                final int eol = nextLF(buf, ptr);
                final int bol = ptr;
                if (eol >= end) {
@@ -444,7 +444,7 @@ public class FileHeader extends DiffEntry {
                return eol;
        }
 
-       int parseGitHeaders(int ptr, final int end) {
+       int parseGitHeaders(int ptr, int end) {
                while (ptr < end) {
                        final int eol = nextLF(buf, ptr);
                        if (isHunkHdr(buf, ptr, eol) >= 1) {
@@ -514,25 +514,25 @@ public class FileHeader extends DiffEntry {
                return ptr;
        }
 
-       void parseOldName(int ptr, final int eol) {
+       void parseOldName(int ptr, int eol) {
                oldPath = p1(parseName(oldPath, ptr + OLD_NAME.length, eol));
                if (oldPath == DEV_NULL)
                        changeType = ChangeType.ADD;
        }
 
-       void parseNewName(int ptr, final int eol) {
+       void parseNewName(int ptr, int eol) {
                newPath = p1(parseName(newPath, ptr + NEW_NAME.length, eol));
                if (newPath == DEV_NULL)
                        changeType = ChangeType.DELETE;
        }
 
-       void parseNewFileMode(int ptr, final int eol) {
+       void parseNewFileMode(int ptr, int eol) {
                oldMode = FileMode.MISSING;
                newMode = parseFileMode(ptr + NEW_FILE_MODE.length, eol);
                changeType = ChangeType.ADD;
        }
 
-       int parseTraditionalHeaders(int ptr, final int end) {
+       int parseTraditionalHeaders(int ptr, int end) {
                while (ptr < end) {
                        final int eol = nextLF(buf, ptr);
                        if (isHunkHdr(buf, ptr, eol) >= 1) {
@@ -585,7 +585,7 @@ public class FileHeader extends DiffEntry {
                return s > 0 ? r.substring(s + 1) : r;
        }
 
-       FileMode parseFileMode(int ptr, final int end) {
+       FileMode parseFileMode(int ptr, int end) {
                int tmp = 0;
                while (ptr < end - 1) {
                        tmp <<= 3;
@@ -594,7 +594,7 @@ public class FileHeader extends DiffEntry {
                return FileMode.fromBits(tmp);
        }
 
-       void parseIndexLine(int ptr, final int end) {
+       void parseIndexLine(int ptr, int end) {
                // "index $asha1..$bsha1[ $mode]" where $asha1 and $bsha1
                // can be unique abbreviations
                //
@@ -636,7 +636,7 @@ public class FileHeader extends DiffEntry {
         *         for a 3 way-merge returns 3. If this is not a hunk header, 0 is
         *         returned instead.
         */
-       static int isHunkHdr(final byte[] buf, final int start, final int end) {
+       static int isHunkHdr(byte[] buf, int start, int end) {
                int ptr = start;
                while (ptr < end && buf[ptr] == '@')
                        ptr++;
index d022d47833fad9e5bdbd9d698c5f81905ec68ab0..1458945c31c8d1b65cf797d98183f4ca57d992fe 100644 (file)
@@ -120,7 +120,7 @@ public class HunkHeader {
 
        private EditList editList;
 
-       HunkHeader(final FileHeader fh, final int offset) {
+       HunkHeader(FileHeader fh, int offset) {
                this(fh, offset, new OldImage() {
                        @Override
                        public AbbreviatedObjectId getId() {
@@ -129,13 +129,13 @@ public class HunkHeader {
                });
        }
 
-       HunkHeader(final FileHeader fh, final int offset, final OldImage oi) {
+       HunkHeader(FileHeader fh, int offset, OldImage oi) {
                file = fh;
                startOffset = offset;
                old = oi;
        }
 
-       HunkHeader(final FileHeader fh, final EditList editList) {
+       HunkHeader(FileHeader fh, EditList editList) {
                this(fh, fh.buf.length);
                this.editList = editList;
                endOffset = startOffset;
@@ -293,7 +293,7 @@ public class HunkHeader {
                        newLineCount = 1;
        }
 
-       int parseBody(final Patch script, final int end) {
+       int parseBody(Patch script, int end) {
                final byte[] buf = file.buf;
                int c = nextLF(buf, startOffset), last = c;
 
@@ -359,7 +359,7 @@ public class HunkHeader {
                return c;
        }
 
-       void extractFileLines(final OutputStream[] out) throws IOException {
+       void extractFileLines(OutputStream[] out) throws IOException {
                final byte[] buf = file.buf;
                int ptr = startOffset;
                int eol = nextLF(buf, ptr);
index 3a77387f23ad493f67fe26f42ad0913eb9e77e58..052f2a79061da414bd31f8b4adad1cf3d3a306d6 100644 (file)
@@ -373,17 +373,17 @@ public class Patch {
                return c;
        }
 
-       void warn(final byte[] buf, final int ptr, final String msg) {
+       void warn(byte[] buf, int ptr, String msg) {
                addError(new FormatError(buf, ptr, FormatError.Severity.WARNING, msg));
        }
 
-       void error(final byte[] buf, final int ptr, final String msg) {
+       void error(byte[] buf, int ptr, String msg) {
                addError(new FormatError(buf, ptr, FormatError.Severity.ERROR, msg));
        }
 
        private static boolean matchAny(final byte[] buf, final int c,
                        final byte[][] srcs) {
-               for (final byte[] s : srcs) {
+               for (byte[] s : srcs) {
                        if (match(buf, c, s) >= 0)
                                return true;
                }
index c12acb40c202892d1e1189bf3eb9d80c25515444..58e2106fe23961c9b2594693f3b395b393dcfa17 100644 (file)
@@ -99,7 +99,7 @@ public abstract class AbstractPlotRenderer<TLane extends PlotLane, TColor> {
                final TColor myColor = laneColor(myLane);
 
                int maxCenter = myLaneX;
-               for (final TLane passingLane : (TLane[]) commit.passingLanes) {
+               for (TLane passingLane : (TLane[]) commit.passingLanes) {
                        final int cx = laneC(passingLane);
                        final TColor c = laneColor(passingLane);
                        drawLine(c, cx, 0, cx, h, LINE_WIDTH);
index fecc48d5514d666f831b2999d36b67cd1f159a47..9914b0c991bf87943c076aad92f8cf32169b6e90 100644 (file)
@@ -88,15 +88,15 @@ public class PlotCommit<L extends PlotLane> extends RevCommit {
                refs = NO_REFS;
        }
 
-       void addForkingOffLane(final PlotLane f) {
+       void addForkingOffLane(PlotLane f) {
                forkingOffLanes = addLane(f, forkingOffLanes);
        }
 
-       void addPassingLane(final PlotLane c) {
+       void addPassingLane(PlotLane c) {
                passingLanes = addLane(c, passingLanes);
        }
 
-       void addMergingLane(final PlotLane m) {
+       void addMergingLane(PlotLane m) {
                mergingLanes = addLane(m, mergingLanes);
        }
 
@@ -115,7 +115,7 @@ public class PlotCommit<L extends PlotLane> extends RevCommit {
                return lanes;
        }
 
-       void addChild(final PlotCommit c) {
+       void addChild(PlotCommit c) {
                final int cnt = children.length;
                if (cnt == 0)
                        children = new PlotCommit[] { c };
@@ -164,7 +164,7 @@ public class PlotCommit<L extends PlotLane> extends RevCommit {
         * @return true if the given commit built on top of this commit.
         */
        public final boolean isChild(PlotCommit c) {
-               for (final PlotCommit a : children)
+               for (PlotCommit a : children)
                        if (a == c)
                                return true;
                return false;
index d952fa67eade56192fbbbf5a0593c8c68f918dee..5e153164ade4dc40b40bfe1f063e9af2a23b19fe 100644 (file)
@@ -120,7 +120,7 @@ public class PlotCommitList<L extends PlotLane> extends
        @SuppressWarnings("unchecked")
        public void findPassingThrough(final PlotCommit<L> currCommit,
                        final Collection<L> result) {
-               for (final PlotLane p : currCommit.passingLanes)
+               for (PlotLane p : currCommit.passingLanes)
                        result.add((L) p);
        }
 
index 371cd06dda5c2327b7cb957564e6da4eba322694..fcdf79520ae2f73434ea0a87baa2e6a6fe782a04 100644 (file)
@@ -55,7 +55,7 @@ class BlockObjQueue {
                free = new BlockFreeList();
        }
 
-       void add(final RevObject c) {
+       void add(RevObject c) {
                Block b = tail;
                if (b == null) {
                        b = free.newBlock();
@@ -98,7 +98,7 @@ class BlockObjQueue {
                        return b;
                }
 
-               void freeBlock(final Block b) {
+               void freeBlock(Block b) {
                        b.next = next;
                        next = b;
                }
@@ -127,7 +127,7 @@ class BlockObjQueue {
                        return headIndex == tailIndex;
                }
 
-               void add(final RevObject c) {
+               void add(RevObject c) {
                        objects[tailIndex++] = c;
                }
 
index 31612ff66ad5425867f006b895df04d83945320f..79307b5b7c56c7fb29386ee386655360997291a5 100644 (file)
@@ -58,7 +58,7 @@ abstract class BlockRevQueue extends AbstractRevQueue {
                free = new BlockFreeList();
        }
 
-       BlockRevQueue(final Generator s) throws MissingObjectException,
+       BlockRevQueue(Generator s) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                free = new BlockFreeList();
                outputType = s.outputType();
@@ -101,7 +101,7 @@ abstract class BlockRevQueue extends AbstractRevQueue {
                        return b;
                }
 
-               void freeBlock(final Block b) {
+               void freeBlock(Block b) {
                        b.next = next;
                        next = b;
                }
@@ -138,11 +138,11 @@ abstract class BlockRevQueue extends AbstractRevQueue {
                        return headIndex > 0;
                }
 
-               void add(final RevCommit c) {
+               void add(RevCommit c) {
                        commits[tailIndex++] = c;
                }
 
-               void unpop(final RevCommit c) {
+               void unpop(RevCommit c) {
                        commits[--headIndex] = c;
                }
 
index 6be0c8584e8e5aa5f2f2b1056100c535d8633b76..0fd6621e62a63f18e91154d9876deb8fb23951c7 100644 (file)
@@ -54,7 +54,7 @@ class BoundaryGenerator extends Generator {
 
        Generator g;
 
-       BoundaryGenerator(final RevWalk w, final Generator s) {
+       BoundaryGenerator(RevWalk w, Generator s) {
                g = new InitialGenerator(w, s);
        }
 
@@ -64,7 +64,7 @@ class BoundaryGenerator extends Generator {
        }
 
        @Override
-       void shareFreeList(final BlockRevQueue q) {
+       void shareFreeList(BlockRevQueue q) {
                g.shareFreeList(q);
        }
 
@@ -85,7 +85,7 @@ class BoundaryGenerator extends Generator {
 
                private final Generator source;
 
-               InitialGenerator(final RevWalk w, final Generator s) {
+               InitialGenerator(RevWalk w, Generator s) {
                        walk = w;
                        held = new FIFORevQueue();
                        source = s;
@@ -98,7 +98,7 @@ class BoundaryGenerator extends Generator {
                }
 
                @Override
-               void shareFreeList(final BlockRevQueue q) {
+               void shareFreeList(BlockRevQueue q) {
                        q.shareFreeList(held);
                }
 
@@ -107,7 +107,7 @@ class BoundaryGenerator extends Generator {
                                IncorrectObjectTypeException, IOException {
                        RevCommit c = source.next();
                        if (c != null) {
-                               for (final RevCommit p : c.parents)
+                               for (RevCommit p : c.parents)
                                        if ((p.flags & UNINTERESTING) != 0)
                                                held.add(p);
                                return c;
index 795bdf1951f8fd7852aefb873b1c775d700844ca..b86e8762010c91b74e81136c97b4f034b188d925 100644 (file)
@@ -76,7 +76,7 @@ public class DateRevQueue extends AbstractRevQueue {
                super();
        }
 
-       DateRevQueue(final Generator s) throws MissingObjectException,
+       DateRevQueue(Generator s) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                for (;;) {
                        final RevCommit c = s.next();
@@ -181,7 +181,7 @@ public class DateRevQueue extends AbstractRevQueue {
        }
 
        @Override
-       boolean everbodyHasFlag(final int f) {
+       boolean everbodyHasFlag(int f) {
                for (Entry q = head; q != null; q = q.next) {
                        if ((q.commit.flags & f) == 0)
                                return false;
@@ -190,7 +190,7 @@ public class DateRevQueue extends AbstractRevQueue {
        }
 
        @Override
-       boolean anybodyHasFlag(final int f) {
+       boolean anybodyHasFlag(int f) {
                for (Entry q = head; q != null; q = q.next) {
                        if ((q.commit.flags & f) != 0)
                                return true;
index 4a0d19d60dc8f0e4a145b4ac201c685662df0573..c397a01317340b7bf65576e77edc4a5ba8346682 100644 (file)
@@ -69,7 +69,7 @@ final class DelayRevQueue extends Generator {
 
        private int size;
 
-       DelayRevQueue(final Generator g) {
+       DelayRevQueue(Generator g) {
                pending = g;
                delay = new FIFORevQueue();
        }
index ad05186354c62fd3566843fc5d4378481ca57ab7..eaec305b47f73ad8b4909307076bc10154e764bf 100644 (file)
@@ -113,7 +113,7 @@ class DepthGenerator extends Generator {
        }
 
        @Override
-       void shareFreeList(final BlockRevQueue q) {
+       void shareFreeList(BlockRevQueue q) {
                pending.shareFreeList(q);
        }
 
@@ -134,7 +134,7 @@ class DepthGenerator extends Generator {
 
                        int newDepth = c.depth + 1;
 
-                       for (final RevCommit p : c.parents) {
+                       for (RevCommit p : c.parents) {
                                DepthWalk.Commit dp = (DepthWalk.Commit) p;
 
                                // If no depth has been assigned to this commit, assign
index 1bb8715a33ad357a4732ec51bdbce674d9ec6af2..cdb084c15e669168cb8ac3a3859b6f251d67d442 100644 (file)
@@ -63,7 +63,7 @@ public class FIFORevQueue extends BlockRevQueue {
                super();
        }
 
-       FIFORevQueue(final Generator s) throws MissingObjectException,
+       FIFORevQueue(Generator s) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                super(s);
        }
@@ -139,7 +139,7 @@ public class FIFORevQueue extends BlockRevQueue {
        }
 
        @Override
-       boolean everbodyHasFlag(final int f) {
+       boolean everbodyHasFlag(int f) {
                for (Block b = head; b != null; b = b.next) {
                        for (int i = b.headIndex; i < b.tailIndex; i++)
                                if ((b.commits[i].flags & f) == 0)
@@ -149,7 +149,7 @@ public class FIFORevQueue extends BlockRevQueue {
        }
 
        @Override
-       boolean anybodyHasFlag(final int f) {
+       boolean anybodyHasFlag(int f) {
                for (Block b = head; b != null; b = b.next) {
                        for (int i = b.headIndex; i < b.tailIndex; i++)
                                if ((b.commits[i].flags & f) != 0)
@@ -158,7 +158,7 @@ public class FIFORevQueue extends BlockRevQueue {
                return false;
        }
 
-       void removeFlag(final int f) {
+       void removeFlag(int f) {
                final int not_f = ~f;
                for (Block b = head; b != null; b = b.next) {
                        for (int i = b.headIndex; i < b.tailIndex; i++)
index 9d734a7296cab408826e3fb140a9a92daa7fd607..4e6d7e681d80bddceca4156a96165570a80dadca 100644 (file)
@@ -61,7 +61,7 @@ import org.eclipse.jgit.errors.MissingObjectException;
 final class FixUninterestingGenerator extends Generator {
        private final Generator pending;
 
-       FixUninterestingGenerator(final Generator g) {
+       FixUninterestingGenerator(Generator g) {
                pending = g;
        }
 
index 567c8465c6dee317fc47aa50d48d535076baba65..dae3aacb833a23750d26f7092b5bcb2b6cc2db6d 100644 (file)
@@ -95,7 +95,7 @@ public class FollowFilter extends TreeFilter {
 
        private RenameCallback renameCallback;
 
-       FollowFilter(final PathFilter path, final DiffConfig cfg) {
+       FollowFilter(PathFilter path, DiffConfig cfg) {
                this.path = path;
                this.cfg = cfg;
        }
index a95303b6419d12333f21e668db507e25d14092d7..b2c92ea249098200c6048f047a1849fc139e8c45 100644 (file)
@@ -81,7 +81,7 @@ abstract class Generator {
         * @param q
         *            another FIFO queue that wants to share our queue's free list.
         */
-       void shareFreeList(final BlockRevQueue q) {
+       void shareFreeList(BlockRevQueue q) {
                // Do nothing by default.
        }
 
index cbffd91d70e3045cce7b222a8c12f5c6b03470ce..846b8d92fa8c3475666386e7a03507dd3969601a 100644 (file)
@@ -62,7 +62,7 @@ public class LIFORevQueue extends BlockRevQueue {
                super();
        }
 
-       LIFORevQueue(final Generator s) throws MissingObjectException,
+       LIFORevQueue(Generator s) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                super(s);
        }
@@ -103,7 +103,7 @@ public class LIFORevQueue extends BlockRevQueue {
        }
 
        @Override
-       boolean everbodyHasFlag(final int f) {
+       boolean everbodyHasFlag(int f) {
                for (Block b = head; b != null; b = b.next) {
                        for (int i = b.headIndex; i < b.tailIndex; i++)
                                if ((b.commits[i].flags & f) == 0)
@@ -113,7 +113,7 @@ public class LIFORevQueue extends BlockRevQueue {
        }
 
        @Override
-       boolean anybodyHasFlag(final int f) {
+       boolean anybodyHasFlag(int f) {
                for (Block b = head; b != null; b = b.next) {
                        for (int i = b.headIndex; i < b.tailIndex; i++)
                                if ((b.commits[i].flags & f) != 0)
index 755df58cf82816062117495719781a1113651dfd..2fe95318b2e1c30b0f5a7503a2ddc04a589d71d0 100644 (file)
@@ -84,12 +84,12 @@ class MergeBaseGenerator extends Generator {
 
        private CarryStack stack;
 
-       MergeBaseGenerator(final RevWalk w) {
+       MergeBaseGenerator(RevWalk w) {
                walker = w;
                pending = new DateRevQueue();
        }
 
-       void init(final AbstractRevQueue p) throws IOException {
+       void init(AbstractRevQueue p) throws IOException {
                try {
                        for (;;) {
                                final RevCommit c = p.next();
@@ -146,7 +146,7 @@ class MergeBaseGenerator extends Generator {
                                return null;
                        }
 
-                       for (final RevCommit p : c.parents) {
+                       for (RevCommit p : c.parents) {
                                if ((p.flags & IN_PENDING) != 0)
                                        continue;
                                if ((p.flags & PARSED) == 0)
index 94ae2c993c523f088a204911c630d09130cc7a95..e607b7daa04fb5bd43ce6db28ee10e5b5e9442b8 100644 (file)
@@ -140,7 +140,7 @@ class PendingGenerator extends Generator {
                                        produce = filter.include(walker, c);
                                }
 
-                               for (final RevCommit p : c.parents) {
+                               for (RevCommit p : c.parents) {
                                        if ((p.flags & SEEN) != 0)
                                                continue;
                                        if ((p.flags & PARSED) == 0)
index 14222e9d506a245cc4b682a41055ec02faa86810..b67f934f6ede7719a17c030e598bade8537f7c83 100644 (file)
@@ -153,13 +153,13 @@ public class RevCommit extends RevObject {
        }
 
        @Override
-       void parseHeaders(final RevWalk walk) throws MissingObjectException,
+       void parseHeaders(RevWalk walk) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                parseCanonical(walk, walk.getCachedBytes(this));
        }
 
        @Override
-       void parseBody(final RevWalk walk) throws MissingObjectException,
+       void parseBody(RevWalk walk) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                if (buffer == null) {
                        buffer = walk.getCachedBytes(this);
@@ -168,7 +168,7 @@ public class RevCommit extends RevObject {
                }
        }
 
-       void parseCanonical(final RevWalk walk, final byte[] raw)
+       void parseCanonical(RevWalk walk, byte[] raw)
                        throws IOException {
                if (!walk.shallowCommitsInitialized)
                        walk.initializeShallowCommits();
@@ -490,7 +490,7 @@ public class RevCommit extends RevObject {
                return str;
        }
 
-       static boolean hasLF(final byte[] r, int b, final int e) {
+       static boolean hasLF(byte[] r, int b, int e) {
                while (b < e)
                        if (r[b++] == '\n')
                                return true;
@@ -635,7 +635,7 @@ public class RevCommit extends RevObject {
                if (src.isEmpty())
                        return Collections.emptyList();
                final ArrayList<String> r = new ArrayList<>(src.size());
-               for (final FooterLine f : src) {
+               for (FooterLine f : src) {
                        if (f.matches(keyName))
                                r.add(f.getValue());
                }
index 1e79867425575e71cd2d3d97f4295bd12efc89ba..413a5529624ec09660f8045babe8aa5c75e47292 100644 (file)
@@ -85,7 +85,7 @@ public class RevFlag {
 
        final int mask;
 
-       RevFlag(final RevWalk w, final String n, final int m) {
+       RevFlag(RevWalk w, String n, int m) {
                walker = w;
                name = n;
                mask = m;
@@ -107,7 +107,7 @@ public class RevFlag {
        }
 
        static class StaticRevFlag extends RevFlag {
-               StaticRevFlag(final String n, final int m) {
+               StaticRevFlag(String n, int m) {
                        super(null, n, m);
                }
 
index 1c76fe9c17f9f3658f4a6947b2fa0685d348b680..eef9bf33e02a106b25a9d35613c26abd5f2c66d6 100644 (file)
@@ -60,7 +60,7 @@ public abstract class RevObject extends ObjectIdOwnerMap.Entry {
 
        int flags;
 
-       RevObject(final AnyObjectId name) {
+       RevObject(AnyObjectId name) {
                super(name);
        }
 
index 42f26d267a9057e076523075167c264bb3205833..2f21e17455150cbbfd070c00050a1591850c982e 100644 (file)
@@ -147,7 +147,7 @@ public class RevObjectList<E extends RevObject> extends AbstractList<E> {
 
                final int shift;
 
-               Block(final int s) {
+               Block(int s) {
                        shift = s;
                }
        }
index e7fe0f73bc73989c0d265fa3e12e934fd26975bb..0050bac0ae93472b08b1400586b38da0c4f7d708 100644 (file)
@@ -142,13 +142,13 @@ public class RevTag extends RevObject {
        }
 
        @Override
-       void parseHeaders(final RevWalk walk) throws MissingObjectException,
+       void parseHeaders(RevWalk walk) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                parseCanonical(walk, walk.getCachedBytes(this));
        }
 
        @Override
-       void parseBody(final RevWalk walk) throws MissingObjectException,
+       void parseBody(RevWalk walk) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                if (buffer == null) {
                        buffer = walk.getCachedBytes(this);
@@ -157,7 +157,7 @@ public class RevTag extends RevObject {
                }
        }
 
-       void parseCanonical(final RevWalk walk, final byte[] rawTag)
+       void parseCanonical(RevWalk walk, byte[] rawTag)
                        throws CorruptObjectException {
                final MutableInteger pos = new MutableInteger();
                final int oType;
index cf278bbbe7d3b3e8093e49e49ec5dc3fc332af44..a986cfd8ff8a2878f84b71e1d20aaf2bf754090f 100644 (file)
@@ -327,7 +327,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
        public void markStart(Collection<RevCommit> list)
                        throws MissingObjectException, IncorrectObjectTypeException,
                        IOException {
-               for (final RevCommit c : list)
+               for (RevCommit c : list)
                        markStart(c);
        }
 
@@ -1142,7 +1142,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
         *            the flags to carry onto parents, if set on a descendant.
         */
        public void carry(Collection<RevFlag> set) {
-               for (final RevFlag flag : set)
+               for (RevFlag flag : set)
                        carry(flag);
        }
 
@@ -1204,7 +1204,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
                freeFlag(flag.mask);
        }
 
-       void freeFlag(final int mask) {
+       void freeFlag(int mask) {
                retainOnReset &= ~mask;
                if (isNotStarted()) {
                        freeFlags |= mask;
@@ -1264,7 +1264,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
         */
        public final void resetRetain(RevFlag... retainFlags) {
                int mask = 0;
-               for (final RevFlag flag : retainFlags)
+               for (RevFlag flag : retainFlags)
                        mask |= flag.mask;
                reset(mask);
        }
@@ -1286,7 +1286,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
                final int clearFlags = ~retainFlags;
 
                final FIFORevQueue q = new FIFORevQueue();
-               for (final RevCommit c : roots) {
+               for (RevCommit c : roots) {
                        if ((c.flags & clearFlags) == 0)
                                continue;
                        c.flags &= retainFlags;
@@ -1300,7 +1300,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
                                break;
                        if (c.parents == null)
                                continue;
-                       for (final RevCommit p : c.parents) {
+                       for (RevCommit p : c.parents) {
                                if ((p.flags & clearFlags) == 0)
                                        continue;
                                p.flags &= retainFlags;
@@ -1439,7 +1439,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
                return new RevCommit(id);
        }
 
-       void carryFlagsImpl(final RevCommit c) {
+       void carryFlagsImpl(RevCommit c) {
                final int carry = c.flags & carryFlags;
                if (carry != 0)
                        RevCommit.carryFlags(c, carry);
index bb0955ccfdfa378ab13c5fdbe84a1f29d02081c3..1c868ffe08f3f35a8fb55469b4f1ae61284ebaf3 100644 (file)
@@ -76,12 +76,12 @@ class RewriteGenerator extends Generator {
 
        private final Generator source;
 
-       RewriteGenerator(final Generator s) {
+       RewriteGenerator(Generator s) {
                source = s;
        }
 
        @Override
-       void shareFreeList(final BlockRevQueue q) {
+       void shareFreeList(BlockRevQueue q) {
                source.shareFreeList(q);
        }
 
@@ -167,14 +167,14 @@ class RewriteGenerator extends Generator {
                }
 
                if (newCnt == oldList.length) {
-                       for (final RevCommit p : oldList)
+                       for (RevCommit p : oldList)
                                p.flags &= ~DUPLICATE;
                        return oldList;
                }
 
                final RevCommit[] newList = new RevCommit[newCnt];
                newCnt = 0;
-               for (final RevCommit p : oldList) {
+               for (RevCommit p : oldList) {
                        if (p != null) {
                                newList[newCnt++] = p;
                                p.flags &= ~DUPLICATE;
index 1ec629031774885f05451c72b4f87b1158855cc7..eb129a2631a324cbe848405f9aff67a233271b6b 100644 (file)
@@ -66,7 +66,7 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter;
 class StartGenerator extends Generator {
        private final RevWalk walker;
 
-       StartGenerator(final RevWalk w) {
+       StartGenerator(RevWalk w) {
                walker = w;
        }
 
index 7b11d04901245d640d0d5ff5500959c905200d7b..645034351fb84b8fda6ea395a0c8c9682fb35ca4 100644 (file)
@@ -69,7 +69,7 @@ class TopoSortGenerator extends Generator {
         * @throws IncorrectObjectTypeException
         * @throws IOException
         */
-       TopoSortGenerator(final Generator s) throws MissingObjectException,
+       TopoSortGenerator(Generator s) throws MissingObjectException,
                        IncorrectObjectTypeException, IOException {
                pending = new FIFORevQueue();
                outputType = s.outputType() | SORT_TOPO;
@@ -78,7 +78,7 @@ class TopoSortGenerator extends Generator {
                        final RevCommit c = s.next();
                        if (c == null)
                                break;
-                       for (final RevCommit p : c.parents)
+                       for (RevCommit p : c.parents)
                                p.inDegree++;
                        pending.add(c);
                }
@@ -90,7 +90,7 @@ class TopoSortGenerator extends Generator {
        }
 
        @Override
-       void shareFreeList(final BlockRevQueue q) {
+       void shareFreeList(BlockRevQueue q) {
                q.shareFreeList(pending);
        }
 
@@ -113,7 +113,7 @@ class TopoSortGenerator extends Generator {
                        // All of our children have already produced,
                        // so it is OK for us to produce now as well.
                        //
-                       for (final RevCommit p : c.parents) {
+                       for (RevCommit p : c.parents) {
                                if (--p.inDegree == 0 && (p.flags & TOPO_DELAY) != 0) {
                                        // This parent tried to come before us, but we are
                                        // his last child. unpop the parent so it goes right
index 4215f21212792fcdde1cf19ce02685f8f01a3040..dfb83b491ae43d10ea1db7ce9b3e1c5c9de08965 100644 (file)
@@ -123,7 +123,7 @@ public abstract class AndRevFilter extends RevFilter {
 
                private final boolean requiresCommitBody;
 
-               Binary(final RevFilter one, final RevFilter two) {
+               Binary(RevFilter one, RevFilter two) {
                        a = one;
                        b = two;
                        requiresCommitBody = a.requiresCommitBody()
@@ -159,7 +159,7 @@ public abstract class AndRevFilter extends RevFilter {
 
                private final boolean requiresCommitBody;
 
-               List(final RevFilter[] list) {
+               List(RevFilter[] list) {
                        subfilters = list;
 
                        boolean rcb = false;
@@ -172,7 +172,7 @@ public abstract class AndRevFilter extends RevFilter {
                public boolean include(RevWalk walker, RevCommit c)
                                throws MissingObjectException, IncorrectObjectTypeException,
                                IOException {
-                       for (final RevFilter f : subfilters) {
+                       for (RevFilter f : subfilters) {
                                if (!f.include(walker, c))
                                        return false;
                        }
index 8474e6c43fb6408162d65171cd36d686aa7ef2b7..334d4f0144a2aaf50f8ff2269296405ecb1bf3e7 100644 (file)
@@ -81,7 +81,7 @@ public class AuthorRevFilter {
                // Don't permit us to be created.
        }
 
-       static RawCharSequence textFor(final RevCommit cmit) {
+       static RawCharSequence textFor(RevCommit cmit) {
                final byte[] raw = cmit.getRawBuffer();
                final int b = RawParseUtils.author(raw, 0);
                if (b < 0)
@@ -91,7 +91,7 @@ public class AuthorRevFilter {
        }
 
        private static class PatternSearch extends PatternMatchRevFilter {
-               PatternSearch(final String patternText) {
+               PatternSearch(String patternText) {
                        super(patternText, true, true, Pattern.CASE_INSENSITIVE);
                }
 
@@ -107,7 +107,7 @@ public class AuthorRevFilter {
        }
 
        private static class SubStringSearch extends SubStringRevFilter {
-               SubStringSearch(final String patternText) {
+               SubStringSearch(String patternText) {
                        super(patternText);
                }
 
index 002985b1184884f1cc360a49688ecc7578c90a27..38805153ef93784d554733b9a4723b7bbcfd81fd 100644 (file)
@@ -127,7 +127,7 @@ public abstract class CommitTimeRevFilter extends RevFilter {
 
        final int when;
 
-       CommitTimeRevFilter(final long ts) {
+       CommitTimeRevFilter(long ts) {
                when = (int) (ts / 1000);
        }
 
@@ -144,7 +144,7 @@ public abstract class CommitTimeRevFilter extends RevFilter {
        }
 
        private static class Before extends CommitTimeRevFilter {
-               Before(final long ts) {
+               Before(long ts) {
                        super(ts);
                }
 
@@ -163,7 +163,7 @@ public abstract class CommitTimeRevFilter extends RevFilter {
        }
 
        private static class After extends CommitTimeRevFilter {
-               After(final long ts) {
+               After(long ts) {
                        super(ts);
                }
 
@@ -190,7 +190,7 @@ public abstract class CommitTimeRevFilter extends RevFilter {
        private static class Between extends CommitTimeRevFilter {
                private final int until;
 
-               Between(final long since, final long until) {
+               Between(long since, long until) {
                        super(since);
                        this.until = (int) (until / 1000);
                }
index 8d73ce43b8b35ea13c8519d7df62f618ad2e617b..37c840e379cef5740026d54a27e562caeb40b6b2 100644 (file)
@@ -81,7 +81,7 @@ public class CommitterRevFilter {
                // Don't permit us to be created.
        }
 
-       static RawCharSequence textFor(final RevCommit cmit) {
+       static RawCharSequence textFor(RevCommit cmit) {
                final byte[] raw = cmit.getRawBuffer();
                final int b = RawParseUtils.committer(raw, 0);
                if (b < 0)
@@ -91,7 +91,7 @@ public class CommitterRevFilter {
        }
 
        private static class PatternSearch extends PatternMatchRevFilter {
-               PatternSearch(final String patternText) {
+               PatternSearch(String patternText) {
                        super(patternText, true, true, Pattern.CASE_INSENSITIVE);
                }
 
@@ -107,7 +107,7 @@ public class CommitterRevFilter {
        }
 
        private static class SubStringSearch extends SubStringRevFilter {
-               SubStringSearch(final String patternText) {
+               SubStringSearch(String patternText) {
                        super(patternText);
                }
 
index 5621e64633614733d2c587a26a88a5b7933981a7..480aaa38eb856287e3935420439b79e3f80d5c92 100644 (file)
@@ -81,7 +81,7 @@ public class MessageRevFilter {
                // Don't permit us to be created.
        }
 
-       static RawCharSequence textFor(final RevCommit cmit) {
+       static RawCharSequence textFor(RevCommit cmit) {
                final byte[] raw = cmit.getRawBuffer();
                final int b = RawParseUtils.commitMessage(raw, 0);
                if (b < 0)
@@ -90,7 +90,7 @@ public class MessageRevFilter {
        }
 
        private static class PatternSearch extends PatternMatchRevFilter {
-               PatternSearch(final String patternText) {
+               PatternSearch(String patternText) {
                        super(patternText, true, true, Pattern.CASE_INSENSITIVE
                                        | Pattern.DOTALL);
                }
@@ -107,7 +107,7 @@ public class MessageRevFilter {
        }
 
        private static class SubStringSearch extends SubStringRevFilter {
-               SubStringSearch(final String patternText) {
+               SubStringSearch(String patternText) {
                        super(patternText);
                }
 
index 97697349f5f62030e8cdbbe60454a87e2551192a..1cef12f79c230c01943b8f2518aa979d2a42e602 100644 (file)
@@ -121,7 +121,7 @@ public abstract class OrRevFilter extends RevFilter {
 
                private final boolean requiresCommitBody;
 
-               Binary(final RevFilter one, final RevFilter two) {
+               Binary(RevFilter one, RevFilter two) {
                        a = one;
                        b = two;
                        requiresCommitBody = a.requiresCommitBody()
@@ -157,7 +157,7 @@ public abstract class OrRevFilter extends RevFilter {
 
                private final boolean requiresCommitBody;
 
-               List(final RevFilter[] list) {
+               List(RevFilter[] list) {
                        subfilters = list;
 
                        boolean rcb = false;
@@ -170,7 +170,7 @@ public abstract class OrRevFilter extends RevFilter {
                public boolean include(RevWalk walker, RevCommit c)
                                throws MissingObjectException, IncorrectObjectTypeException,
                                IOException {
-                       for (final RevFilter f : subfilters) {
+                       for (RevFilter f : subfilters) {
                                if (f.include(walker, c))
                                        return true;
                        }
index 4d5690bb14bce11c0f537ea47eea4f388970c94a..c67c44b216eb6d55d6984029a9143e8fb4a8659d 100644 (file)
@@ -78,7 +78,7 @@ public abstract class RevFlagFilter extends RevFilter {
         */
        public static RevFilter hasAll(RevFlag... a) {
                final RevFlagSet set = new RevFlagSet();
-               for (final RevFlag flag : a)
+               for (RevFlag flag : a)
                        set.add(flag);
                return new HasAll(set);
        }
@@ -103,7 +103,7 @@ public abstract class RevFlagFilter extends RevFilter {
         */
        public static RevFilter hasAny(RevFlag... a) {
                final RevFlagSet set = new RevFlagSet();
-               for (final RevFlag flag : a)
+               for (RevFlag flag : a)
                        set.add(flag);
                return new HasAny(set);
        }
@@ -121,7 +121,7 @@ public abstract class RevFlagFilter extends RevFilter {
 
        final RevFlagSet flags;
 
-       RevFlagFilter(final RevFlagSet m) {
+       RevFlagFilter(RevFlagSet m) {
                flags = m;
        }
 
@@ -138,7 +138,7 @@ public abstract class RevFlagFilter extends RevFilter {
        }
 
        private static class HasAll extends RevFlagFilter {
-               HasAll(final RevFlagSet m) {
+               HasAll(RevFlagSet m) {
                        super(m);
                }
 
@@ -156,7 +156,7 @@ public abstract class RevFlagFilter extends RevFilter {
        }
 
        private static class HasAny extends RevFlagFilter {
-               HasAny(final RevFlagSet m) {
+               HasAny(RevFlagSet m) {
                        super(m);
                }
 
index 3df5bdb2c93f739297113af29a433a930b2da446..a0fc57ca1f06409373eaff47bf85c3f585c83be9 100644 (file)
@@ -135,7 +135,7 @@ public class AmazonS3 {
 
        private static String toCleanString(List<String> list) {
                final StringBuilder s = new StringBuilder();
-               for (final String v : list) {
+               for (String v : list) {
                        if (s.length() > 0)
                                s.append(',');
                        s.append(v.replaceAll("\n", "").trim()); //$NON-NLS-1$ //$NON-NLS-2$
@@ -548,7 +548,7 @@ public class AmazonS3 {
                return err;
        }
 
-       IOException maxAttempts(final String action, final String key) {
+       IOException maxAttempts(String action, String key) {
                return new IOException(MessageFormat.format(
                                JGitText.get().amazonS3ActionFailedGivingUp, action, key,
                                Integer.valueOf(maxAttempts)));
@@ -597,10 +597,10 @@ public class AmazonS3 {
                return c;
        }
 
-       void authorize(final HttpURLConnection c) throws IOException {
+       void authorize(HttpURLConnection c) throws IOException {
                final Map<String, List<String>> reqHdr = c.getRequestProperties();
                final SortedMap<String, String> sigHdr = new TreeMap<>();
-               for (final Map.Entry<String, List<String>> entry : reqHdr.entrySet()) {
+               for (Map.Entry<String, List<String>> entry : reqHdr.entrySet()) {
                        final String hdr = entry.getKey();
                        if (isSignedHeader(hdr))
                                sigHdr.put(StringUtils.toLowerCase(hdr), toCleanString(entry.getValue()));
@@ -619,7 +619,7 @@ public class AmazonS3 {
                s.append(remove(sigHdr, "date")); //$NON-NLS-1$
                s.append('\n');
 
-               for (final Map.Entry<String, String> e : sigHdr.entrySet()) {
+               for (Map.Entry<String, String> e : sigHdr.entrySet()) {
                        s.append(e.getKey());
                        s.append(':');
                        s.append(e.getValue());
@@ -644,7 +644,7 @@ public class AmazonS3 {
                c.setRequestProperty("Authorization", "AWS " + publicKey + ":" + sec); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        }
 
-       static Properties properties(final File authFile)
+       static Properties properties(File authFile)
                        throws FileNotFoundException, IOException {
                final Properties p = new Properties();
                try (FileInputStream in = new FileInputStream(authFile)) {
@@ -664,7 +664,7 @@ public class AmazonS3 {
 
                private StringBuilder data;
 
-               ListParser(final String bn, final String p) {
+               ListParser(String bn, String p) {
                        bucket = bn;
                        prefix = p;
                }
index 1bda914941dc866e52547b749895d3fc4ed0b53d..38eae1cd4855e4e00159e4fe89d693a693b108c4 100644 (file)
@@ -122,7 +122,7 @@ abstract class BasePackConnection extends BaseConnection {
        /** Extra objects the remote has, but which aren't offered as refs. */
        protected final Set<ObjectId> additionalHaves = new HashSet<>();
 
-       BasePackConnection(final PackTransport packTransport) {
+       BasePackConnection(PackTransport packTransport) {
                transport = (Transport) packTransport;
                local = transport.local;
                uri = transport.uri;
index 6e4b05fe21e1aa030877fccf41876787bb904b85..0dfcd8716e34dd6a5a2ec4d65ea1f2c1ea894abd 100644 (file)
@@ -296,7 +296,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
 
                final boolean minimalNegotiation;
 
-               FetchConfig(final Config c) {
+               FetchConfig(Config c) {
                        allowOfsDelta = c.getBoolean("repack", "usedeltabaseoffset", true); //$NON-NLS-1$ //$NON-NLS-2$
                        minimalNegotiation = c.getBoolean("fetch", "useminimalnegotiation", //$NON-NLS-1$ //$NON-NLS-2$
                                        false);
@@ -420,7 +420,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
 
        private int maxTimeWanted(Collection<Ref> wants) {
                int maxTime = 0;
-               for (final Ref r : wants) {
+               for (Ref r : wants) {
                        try {
                                final RevObject obj = walk.parseAny(r.getObjectId());
                                if (obj instanceof RevCommit) {
@@ -492,7 +492,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
        private boolean sendWants(Collection<Ref> want) throws IOException {
                final PacketLineOut p = statelessRPC ? pckState : pckOut;
                boolean first = true;
-               for (final Ref r : want) {
+               for (Ref r : want) {
                        ObjectId objectId = r.getObjectId();
                        if (objectId == null) {
                                continue;
@@ -806,7 +806,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
        }
 
        private void markRefsAdvertised() {
-               for (final Ref r : getRefs()) {
+               for (Ref r : getRefs()) {
                        markAdvertised(r.getObjectId());
                        if (r.getPeeledObjectId() != null)
                                markAdvertised(r.getPeeledObjectId());
index 5624377b7a5f1e5917a8339c294c67a4f50916ec..69624ff7a334fb8fab4ec12c980c9113b775eb84 100644 (file)
@@ -256,7 +256,7 @@ public abstract class BasePackPushConnection extends BasePackConnection implemen
                                                        pushOptions.toString()));
                }
 
-               for (final RemoteRefUpdate rru : refUpdates) {
+               for (RemoteRefUpdate rru : refUpdates) {
                        if (!capableDeleteRefs && rru.isDelete()) {
                                rru.setStatus(Status.REJECTED_NODELETE);
                                continue;
@@ -294,7 +294,7 @@ public abstract class BasePackPushConnection extends BasePackConnection implemen
        }
 
        private void transmitOptions() throws IOException {
-               for (final String pushOption : pushOptions) {
+               for (String pushOption : pushOptions) {
                        pckOut.writeString(pushOption);
                }
 
@@ -332,17 +332,17 @@ public abstract class BasePackPushConnection extends BasePackConnection implemen
                Set<ObjectId> remoteObjects = new HashSet<>();
                Set<ObjectId> newObjects = new HashSet<>();
 
-               try (final PackWriter writer = new PackWriter(transport.getPackConfig(),
+               try (PackWriter writer = new PackWriter(transport.getPackConfig(),
                                local.newObjectReader())) {
 
-                       for (final Ref r : getRefs()) {
+                       for (Ref r : getRefs()) {
                                // only add objects that we actually have
                                ObjectId oid = r.getObjectId();
                                if (local.hasObject(oid))
                                        remoteObjects.add(oid);
                        }
                        remoteObjects.addAll(additionalHaves);
-                       for (final RemoteRefUpdate r : refUpdates.values()) {
+                       for (RemoteRefUpdate r : refUpdates.values()) {
                                if (!ObjectId.zeroId().equals(r.getNewObjectId()))
                                        newObjects.add(r.getNewObjectId());
                        }
@@ -411,7 +411,7 @@ public abstract class BasePackPushConnection extends BasePackConnection implemen
                                rru.setMessage(message);
                        }
                }
-               for (final RemoteRefUpdate rru : refUpdates.values()) {
+               for (RemoteRefUpdate rru : refUpdates.values()) {
                        if (rru.getStatus() == Status.AWAITING_REPORT)
                                throw new PackProtocolException(MessageFormat.format(
                                                JGitText.get().expectedReportForRefNotReceived , uri, rru.getRemoteName()));
index d78751f89401b82f041b30c95a59b8146b024a59..c426e3c05d0e8ba2c000e564c778d11fe53b5db0 100644 (file)
@@ -340,7 +340,7 @@ public abstract class BaseReceivePack {
                final long maxDiscardBytes;
                final SignedPushConfig signedPush;
 
-               ReceiveConfig(final Config config) {
+               ReceiveConfig(Config config) {
                        allowCreates = true;
                        allowDeletes = !config.getBoolean("receive", "denydeletes", false); //$NON-NLS-1$ //$NON-NLS-2$
                        allowNonFastForwards = !config.getBoolean("receive", //$NON-NLS-1$
@@ -1440,7 +1440,7 @@ public abstract class BaseReceivePack {
         * @return {@code true} if a pack is expected based on the list of commands.
         */
        protected boolean needPack() {
-               for (final ReceiveCommand cmd : commands) {
+               for (ReceiveCommand cmd : commands) {
                        if (cmd.getType() != ReceiveCommand.Type.DELETE)
                                return true;
                }
@@ -1526,21 +1526,21 @@ public abstract class BaseReceivePack {
                }
                parser = null;
 
-               try (final ObjectWalk ow = new ObjectWalk(db)) {
+               try (ObjectWalk ow = new ObjectWalk(db)) {
                        if (baseObjects != null) {
                                ow.sort(RevSort.TOPO);
                                if (!baseObjects.isEmpty())
                                        ow.sort(RevSort.BOUNDARY, true);
                        }
 
-                       for (final ReceiveCommand cmd : commands) {
+                       for (ReceiveCommand cmd : commands) {
                                if (cmd.getResult() != Result.NOT_ATTEMPTED)
                                        continue;
                                if (cmd.getType() == ReceiveCommand.Type.DELETE)
                                        continue;
                                ow.markStart(ow.parseAny(cmd.getNewId()));
                        }
-                       for (final ObjectId have : advertisedHaves) {
+                       for (ObjectId have : advertisedHaves) {
                                RevObject o = ow.parseAny(have);
                                ow.markUninteresting(o);
 
@@ -1596,7 +1596,7 @@ public abstract class BaseReceivePack {
         * Validate the command list.
         */
        protected void validateCommands() {
-               for (final ReceiveCommand cmd : commands) {
+               for (ReceiveCommand cmd : commands) {
                        final Ref ref = cmd.getRef();
                        if (cmd.getResult() != Result.NOT_ATTEMPTED)
                                continue;
@@ -1815,7 +1815,7 @@ public abstract class BaseReceivePack {
                if (unpackError != null) {
                        out.sendString("unpack error " + unpackError.getMessage()); //$NON-NLS-1$
                        if (forClient) {
-                               for (final ReceiveCommand cmd : commands) {
+                               for (ReceiveCommand cmd : commands) {
                                        out.sendString("ng " + cmd.getRefName() //$NON-NLS-1$
                                                        + " n/a (unpacker error)"); //$NON-NLS-1$
                                }
@@ -1825,7 +1825,7 @@ public abstract class BaseReceivePack {
 
                if (forClient)
                        out.sendString("unpack ok"); //$NON-NLS-1$
-               for (final ReceiveCommand cmd : commands) {
+               for (ReceiveCommand cmd : commands) {
                        if (cmd.getResult() == Result.OK) {
                                if (forClient)
                                        out.sendString("ok " + cmd.getRefName()); //$NON-NLS-1$
index 2002c9199e761e7dab1c9f9362812b66efc4a2d0..449f52944762a20b73d27723b69aba9d5fb74613 100644 (file)
@@ -96,7 +96,7 @@ class BundleFetchConnection extends BaseFetchConnection {
 
        private PackLock packLock;
 
-       BundleFetchConnection(Transport transportBundle, final InputStream src) throws TransportException {
+       BundleFetchConnection(Transport transportBundle, InputStream src) throws TransportException {
                transport = transportBundle;
                bin = new BufferedInputStream(src);
                try {
@@ -226,13 +226,13 @@ class BundleFetchConnection extends BaseFetchConnection {
                if (prereqs.isEmpty())
                        return;
 
-               try (final RevWalk rw = new RevWalk(transport.local)) {
+               try (RevWalk rw = new RevWalk(transport.local)) {
                        final RevFlag PREREQ = rw.newFlag("PREREQ"); //$NON-NLS-1$
                        final RevFlag SEEN = rw.newFlag("SEEN"); //$NON-NLS-1$
 
                        final Map<ObjectId, String> missing = new HashMap<>();
                        final List<RevObject> commits = new ArrayList<>();
-                       for (final Map.Entry<ObjectId, String> e : prereqs.entrySet()) {
+                       for (Map.Entry<ObjectId, String> e : prereqs.entrySet()) {
                                ObjectId p = e.getKey();
                                try {
                                        final RevCommit c = rw.parseCommit(p);
@@ -258,7 +258,7 @@ class BundleFetchConnection extends BaseFetchConnection {
                        } catch (IOException e) {
                                throw new TransportException(transport.uri, e.getMessage(), e);
                        }
-                       for (final Ref r : localRefs) {
+                       for (Ref r : localRefs) {
                                try {
                                        rw.markStart(rw.parseCommit(r.getObjectId()));
                                } catch (IOException readError) {
@@ -282,7 +282,7 @@ class BundleFetchConnection extends BaseFetchConnection {
                        }
 
                        if (remaining > 0) {
-                               for (final RevObject o : commits) {
+                               for (RevObject o : commits) {
                                        if (!o.has(SEEN))
                                                missing.put(o, prereqs.get(o));
                                }
index 5779b0d75ec0ba055253d61285fa7312f04ce74b..f2a261bbe6e74f9e831c3f7d8df414368ed6df07 100644 (file)
@@ -221,7 +221,7 @@ public class BundleWriter {
                        final HashSet<ObjectId> inc = new HashSet<>();
                        final HashSet<ObjectId> exc = new HashSet<>();
                        inc.addAll(include.values());
-                       for (final RevCommit r : assume)
+                       for (RevCommit r : assume)
                                exc.add(r.getId());
                        packWriter.setIndexDisabled(true);
                        packWriter.setDeltaBaseAsOffset(true);
@@ -236,7 +236,7 @@ public class BundleWriter {
                        w.write('\n');
 
                        final char[] tmp = new char[Constants.OBJECT_ID_STRING_LENGTH];
-                       for (final RevCommit a : assume) {
+                       for (RevCommit a : assume) {
                                w.write('-');
                                a.copyTo(tmp, w);
                                if (a.getRawBuffer() != null) {
@@ -245,7 +245,7 @@ public class BundleWriter {
                                }
                                w.write('\n');
                        }
-                       for (final Map.Entry<String, ObjectId> e : include.entrySet()) {
+                       for (Map.Entry<String, ObjectId> e : include.entrySet()) {
                                e.getValue().copyTo(tmp, w);
                                w.write(' ');
                                w.write(e.getKey());
index 6563905282711eb3abe8cff647e5fc76090161df..7289ce7b6ce7ccc0fcbf7c51bdcbe144d8f7a5fe 100644 (file)
@@ -209,7 +209,7 @@ public class Daemon {
        public synchronized DaemonService getService(String name) {
                if (!name.startsWith("git-")) //$NON-NLS-1$
                        name = "git-" + name; //$NON-NLS-1$
-               for (final DaemonService s : services) {
+               for (DaemonService s : services) {
                        if (s.getCommandName().equals(name))
                                return s;
                }
@@ -420,7 +420,7 @@ public class Daemon {
                }
        }
 
-       void startClient(final Socket s) {
+       void startClient(Socket s) {
                final DaemonClient dc = new DaemonClient(this);
 
                final SocketAddress peer = s.getRemoteSocketAddress();
@@ -454,8 +454,8 @@ public class Daemon {
                }.start();
        }
 
-       synchronized DaemonService matchService(final String cmd) {
-               for (final DaemonService d : services) {
+       synchronized DaemonService matchService(String cmd) {
+               for (DaemonService d : services) {
                        if (d.handles(cmd))
                                return d;
                }
index 65b2dc61e743ed5bba38e713d7fd3211ec894dd3..51c4918f5664e70c37c4ef6cd602d4a8edd2ae59 100644 (file)
@@ -68,11 +68,11 @@ public class DaemonClient {
 
        private OutputStream rawOut;
 
-       DaemonClient(final Daemon d) {
+       DaemonClient(Daemon d) {
                daemon = d;
        }
 
-       void setRemoteAddress(final InetAddress ia) {
+       void setRemoteAddress(InetAddress ia) {
                peer = ia;
        }
 
@@ -112,7 +112,7 @@ public class DaemonClient {
                return rawOut;
        }
 
-       void execute(final Socket sock) throws IOException,
+       void execute(Socket sock) throws IOException,
                        ServiceNotEnabledException, ServiceNotAuthorizedException {
                rawIn = new BufferedInputStream(sock.getInputStream());
                rawOut = new BufferedOutputStream(sock.getOutputStream());
index 1b24f404d26f23c2d045694f46e2026913ec9f31..6d2bee8dc398eb4f95ee7c354cca2da30f2ff5e0 100644 (file)
@@ -67,7 +67,7 @@ public abstract class DaemonService {
 
        private boolean overridable;
 
-       DaemonService(final String cmdName, final String cfgName) {
+       DaemonService(String cmdName, String cfgName) {
                command = cmdName.startsWith("git-") ? cmdName : "git-" + cmdName; //$NON-NLS-1$ //$NON-NLS-2$
                configKey = cfg -> new ServiceConfig(DaemonService.this, cfg, cfgName);
                overridable = true;
index 421ef21073903ae64c817136828d7d9ad0037b75..34ab361c74b63c042437b6e3841cebba1a9bec67 100644 (file)
@@ -63,7 +63,7 @@ class FetchHeadRecord {
 
        URIish sourceURI;
 
-       void write(final Writer pw) throws IOException {
+       void write(Writer pw) throws IOException {
                final String type;
                final String name;
                if (sourceName.startsWith(R_HEADS)) {
index 1ef1900571d7c9a86ecfa50cc119a057d8fc0661..51f900b2465f3634693c6912ad9ee5a422f34edb 100644 (file)
@@ -106,12 +106,12 @@ class FetchProcess {
 
        private Map<String, Ref> localRefs;
 
-       FetchProcess(final Transport t, final Collection<RefSpec> f) {
+       FetchProcess(Transport t, Collection<RefSpec> f) {
                transport = t;
                toFetch = f;
        }
 
-       void execute(final ProgressMonitor monitor, final FetchResult result)
+       void execute(ProgressMonitor monitor, FetchResult result)
                        throws NotSupportedException, TransportException {
                askFor.clear();
                localUpdates.clear();
@@ -123,7 +123,7 @@ class FetchProcess {
                        executeImp(monitor, result);
                } finally {
                        try {
-                       for (final PackLock lock : packLocks)
+                       for (PackLock lock : packLocks)
                                lock.unlock();
                        } catch (IOException e) {
                                throw new TransportException(e.getMessage(), e);
@@ -139,7 +139,7 @@ class FetchProcess {
                        result.setAdvertisedRefs(transport.getURI(), conn.getRefsMap());
                        result.peerUserAgent = conn.getPeerUserAgent();
                        final Set<Ref> matched = new HashSet<>();
-                       for (final RefSpec spec : toFetch) {
+                       for (RefSpec spec : toFetch) {
                                if (spec.getSource() == null)
                                        throw new TransportException(MessageFormat.format(
                                                        JGitText.get().sourceRefNotSpecifiedForRefspec, spec));
@@ -176,7 +176,7 @@ class FetchProcess {
                                //
                                have.addAll(askFor.keySet());
                                askFor.clear();
-                               for (final Ref r : additionalTags) {
+                               for (Ref r : additionalTags) {
                                        ObjectId id = r.getPeeledObjectId();
                                        if (id == null)
                                                id = r.getObjectId();
@@ -198,7 +198,7 @@ class FetchProcess {
                                .newBatchUpdate()
                                .setAllowNonFastForwards(true)
                                .setRefLogMessage("fetch", true); //$NON-NLS-1$
-               try (final RevWalk walk = new RevWalk(transport.local)) {
+               try (RevWalk walk = new RevWalk(transport.local)) {
                        if (monitor instanceof BatchingProgressMonitor) {
                                ((BatchingProgressMonitor) monitor).setDelayStart(
                                                250, TimeUnit.MILLISECONDS);
@@ -277,12 +277,12 @@ class FetchProcess {
                // new connection has offered to us.
                //
                final HashMap<ObjectId, Ref> avail = new HashMap<>();
-               for (final Ref r : conn.getRefs())
+               for (Ref r : conn.getRefs())
                        avail.put(r.getObjectId(), r);
 
                final Collection<Ref> wants = new ArrayList<>(askFor.values());
                askFor.clear();
-               for (final Ref want : wants) {
+               for (Ref want : wants) {
                        final Ref newRef = avail.get(want.getObjectId());
                        if (newRef != null) {
                                askFor.put(newRef.getObjectId(), newRef);
@@ -320,7 +320,7 @@ class FetchProcess {
                        if (lock.lock()) {
                                try (Writer w = new OutputStreamWriter(
                                                lock.getOutputStream())) {
-                                       for (final FetchHeadRecord h : fetchHeadUpdates) {
+                                       for (FetchHeadRecord h : fetchHeadUpdates) {
                                                h.write(w);
                                                result.add(h);
                                        }
@@ -334,10 +334,10 @@ class FetchProcess {
 
        private boolean askForIsComplete() throws TransportException {
                try {
-                       try (final ObjectWalk ow = new ObjectWalk(transport.local)) {
-                               for (final ObjectId want : askFor.keySet())
+                       try (ObjectWalk ow = new ObjectWalk(transport.local)) {
+                               for (ObjectId want : askFor.keySet())
                                        ow.markStart(ow.parseAny(want));
-                               for (final Ref ref : localRefs().values())
+                               for (Ref ref : localRefs().values())
                                        ow.markUninteresting(ow.parseAny(ref.getObjectId()));
                                ow.checkConnectivity();
                        }
@@ -351,7 +351,7 @@ class FetchProcess {
 
        private void expandWildcard(RefSpec spec, Set<Ref> matched)
                        throws TransportException {
-               for (final Ref src : conn.getRefs()) {
+               for (Ref src : conn.getRefs()) {
                        if (spec.matchSource(src) && matched.add(src))
                                want(src, spec.expandFromSource(src));
                }
@@ -377,7 +377,7 @@ class FetchProcess {
        private Collection<Ref> expandAutoFollowTags() throws TransportException {
                final Collection<Ref> additionalTags = new ArrayList<>();
                final Map<String, Ref> haveRefs = localRefs();
-               for (final Ref r : conn.getRefs()) {
+               for (Ref r : conn.getRefs()) {
                        if (!isTag(r))
                                continue;
 
@@ -401,7 +401,7 @@ class FetchProcess {
 
        private void expandFetchTags() throws TransportException {
                final Map<String, Ref> haveRefs = localRefs();
-               for (final Ref r : conn.getRefs()) {
+               for (Ref r : conn.getRefs()) {
                        if (!isTag(r)) {
                                continue;
                        }
@@ -479,9 +479,9 @@ class FetchProcess {
 
        private void deleteStaleTrackingRefs(FetchResult result,
                        BatchRefUpdate batch) throws IOException {
-               for (final Ref ref : localRefs().values()) {
+               for (Ref ref : localRefs().values()) {
                        final String refname = ref.getName();
-                       for (final RefSpec spec : toFetch) {
+                       for (RefSpec spec : toFetch) {
                                if (spec.matchDestination(refname)) {
                                        final RefSpec s = spec.expandFromDestination(refname);
                                        if (result.getAdvertisedRef(s.getSource()) == null) {
index 2667ec37caf0ba5a3628c5f6418a9912358b553c..ad4c5e9354d3db1b469a7a31887c8b1e1d982aa5 100644 (file)
@@ -68,7 +68,7 @@ public class FetchResult extends OperationResult {
                submodules = new HashMap<>();
        }
 
-       void add(final FetchHeadRecord r) {
+       void add(FetchHeadRecord r) {
                if (!r.notForMerge)
                        forMerge.add(r);
        }
index 56b202eab5ec67682016fb88771309d5034794d2..fb03190b0276c69c3ac0b68883d4a2ce3670c5e7 100644 (file)
@@ -160,10 +160,10 @@ abstract class HttpAuthMethod {
                final Map<String, List<String>> headers = conn.getHeaderFields();
                HttpAuthMethod authentication = Type.NONE.method(EMPTY_STRING);
 
-               for (final Entry<String, List<String>> entry : headers.entrySet()) {
+               for (Entry<String, List<String>> entry : headers.entrySet()) {
                        if (HDR_WWW_AUTHENTICATE.equalsIgnoreCase(entry.getKey())) {
                                if (entry.getValue() != null) {
-                                       for (final String value : entry.getValue()) {
+                                       for (String value : entry.getValue()) {
                                                if (value != null && value.length() != 0) {
                                                        final String[] valuePart = value.split(
                                                                        SCHEMA_NAME_SEPARATOR, 2);
@@ -307,13 +307,13 @@ abstract class HttpAuthMethod {
                }
 
                @Override
-               void authorize(final String username, final String password) {
+               void authorize(String username, String password) {
                        this.user = username;
                        this.pass = password;
                }
 
                @Override
-               void configureRequest(final HttpConnection conn) throws IOException {
+               void configureRequest(HttpConnection conn) throws IOException {
                        String ident = user + ":" + pass; //$NON-NLS-1$
                        String enc = Base64.encodeBytes(ident.getBytes(CHARSET));
                        conn.setRequestProperty(HDR_AUTHORIZATION, type.getSchemeName()
@@ -346,14 +346,14 @@ abstract class HttpAuthMethod {
                }
 
                @Override
-               void authorize(final String username, final String password) {
+               void authorize(String username, String password) {
                        this.user = username;
                        this.pass = password;
                }
 
                @SuppressWarnings("boxing")
                @Override
-               void configureRequest(final HttpConnection conn) throws IOException {
+               void configureRequest(HttpConnection conn) throws IOException {
                        final Map<String, String> r = new LinkedHashMap<>();
 
                        final String realm = params.get("realm"); //$NON-NLS-1$
index 68757803c0853760b5c2b698358611cb4a218b85..e3ef83234309df5f4517e5742dd4e4e5a944caf5 100644 (file)
@@ -145,7 +145,7 @@ public class JschSession implements RemoteSession {
                 * @throws IOException
                 *             on problems opening streams
                 */
-               JschProcess(final String commandName, int tms)
+               JschProcess(String commandName, int tms)
                                throws TransportException, IOException {
                        timeout = tms;
                        try {
index 4cb8393690c7fe24a597d3a1bee507b0bc2c8eb2..f5ccdc8f1373a53cd3d64145f25b3af5322ca6cd 100644 (file)
@@ -186,7 +186,7 @@ public class OpenSshConfig implements ConfigRepository {
        /** State read from the config file, plus {@link Host}s created from it. */
        private State state;
 
-       OpenSshConfig(final File h, final File cfg) {
+       OpenSshConfig(File h, File cfg) {
                home = h;
                configFile = cfg;
                state = new State();
@@ -211,7 +211,7 @@ public class OpenSshConfig implements ConfigRepository {
                // Initialize with default entries at the top of the file, before the
                // first Host block.
                fullConfig.merge(cache.entries.get(HostEntry.DEFAULT_NAME));
-               for (final Map.Entry<String, HostEntry> e : cache.entries.entrySet()) {
+               for (Map.Entry<String, HostEntry> e : cache.entries.entrySet()) {
                        String key = e.getKey();
                        if (isHostMatch(key, hostName)) {
                                fullConfig.merge(e.getValue());
index 0fc24ed9b0d0b635779819d9f46dcc5535b56003..08f7f0d1afb5c82cf20b33237a5f3c1de80274d3 100644 (file)
@@ -133,12 +133,12 @@ public abstract class OperationResult {
                return updates.get(localName);
        }
 
-       void setAdvertisedRefs(final URIish u, final Map<String, Ref> ar) {
+       void setAdvertisedRefs(URIish u, Map<String, Ref> ar) {
                uri = u;
                advertisedRefs = ar;
        }
 
-       void add(final TrackingRefUpdate u) {
+       void add(TrackingRefUpdate u) {
                updates.put(u.getLocalName(), u);
        }
 
@@ -158,7 +158,7 @@ public abstract class OperationResult {
                return messageBuffer != null ? messageBuffer.toString() : ""; //$NON-NLS-1$
        }
 
-       void addMessages(final String msg) {
+       void addMessages(String msg) {
                if (msg != null && msg.length() > 0) {
                        if (messageBuffer == null)
                                messageBuffer = new StringBuilder();
index 8ac7926dc77d05cb5e937950d7d4fbde478a2aa1..49acb4d9d8c41633abe7cf605968b7a270a113a4 100644 (file)
@@ -873,7 +873,7 @@ public abstract class PackParser {
                        baseObjectIds = new ObjectIdSubclassMap<>();
 
                final List<DeltaChain> missing = new ArrayList<>(64);
-               for (final DeltaChain baseId : baseById) {
+               for (DeltaChain baseId : baseById) {
                        if (baseId.head == null)
                                continue;
 
@@ -905,7 +905,7 @@ public abstract class PackParser {
                                                JGitText.get().downloadCancelledDuringIndexing);
                }
 
-               for (final DeltaChain base : missing) {
+               for (DeltaChain base : missing) {
                        if (base.head != null)
                                throw new MissingObjectException(base, "delta base"); //$NON-NLS-1$
                }
@@ -1232,13 +1232,13 @@ public abstract class PackParser {
        }
 
        // Consume cnt bytes from the buffer.
-       void use(final int cnt) {
+       void use(int cnt) {
                bOffset += cnt;
                bAvail -= cnt;
        }
 
        // Ensure at least need bytes are available in in {@link #buf}.
-       int fill(final Source src, final int need) throws IOException {
+       int fill(Source src, int need) throws IOException {
                while (bAvail < need) {
                        int next = bOffset + bAvail;
                        int free = buf.length - next;
@@ -1661,7 +1661,7 @@ public abstract class PackParser {
        private static class DeltaChain extends ObjectIdOwnerMap.Entry {
                UnresolvedDelta head;
 
-               DeltaChain(final AnyObjectId id) {
+               DeltaChain(AnyObjectId id) {
                        super(id);
                }
 
@@ -1672,7 +1672,7 @@ public abstract class PackParser {
                        return r;
                }
 
-               void add(final UnresolvedDelta d) {
+               void add(UnresolvedDelta d) {
                        d.next = head;
                        head = d;
                }
index f64c8efe8404e874d207273cc1e04dad2633f66a..cc556f8af6c480bed09fc42c523e8a35efe987b6 100644 (file)
@@ -122,7 +122,7 @@ public class PacketLineIn {
                this.limit = limit;
        }
 
-       AckNackResult readACK(final MutableObjectId returnedId) throws IOException {
+       AckNackResult readACK(MutableObjectId returnedId) throws IOException {
                final String line = readString();
                if (line.length() == 0)
                        throw new PackProtocolException(JGitText.get().expectedACKNAKFoundEOF);
index b7debe2c3e1d0b156455301c57b6f6a5e7d988fb..470a3c046fb46ad819e269ba0b33c5364987bd32 100644 (file)
@@ -127,7 +127,7 @@ class PushProcess {
                this.toPush = new LinkedHashMap<>();
                this.out = out;
                this.pushOptions = transport.getPushOptions();
-               for (final RemoteRefUpdate rru : toPush) {
+               for (RemoteRefUpdate rru : toPush) {
                        if (this.toPush.put(rru.getRemoteName(), rru) != null)
                                throw new TransportException(MessageFormat.format(
                                                JGitText.get().duplicateRemoteRefUpdateIsIllegal, rru.getRemoteName()));
@@ -150,7 +150,7 @@ class PushProcess {
         *             when some error occurred during operation, like I/O, protocol
         *             error, or local database consistency error.
         */
-       PushResult execute(final ProgressMonitor monitor)
+       PushResult execute(ProgressMonitor monitor)
                        throws NotSupportedException, TransportException {
                try {
                        monitor.beginTask(PROGRESS_OPENING_CONNECTION,
@@ -176,7 +176,7 @@ class PushProcess {
                        }
                        if (!transport.isDryRun())
                                updateTrackingRefs();
-                       for (final RemoteRefUpdate rru : toPush.values()) {
+                       for (RemoteRefUpdate rru : toPush.values()) {
                                final TrackingRefUpdate tru = rru.getTrackingRefUpdate();
                                if (tru != null)
                                        res.add(tru);
@@ -191,7 +191,7 @@ class PushProcess {
                        throws TransportException {
                boolean atomic = transport.isPushAtomic();
                final Map<String, RemoteRefUpdate> result = new LinkedHashMap<>();
-               for (final RemoteRefUpdate rru : toPush.values()) {
+               for (RemoteRefUpdate rru : toPush.values()) {
                        final Ref advertisedRef = connection.getRef(rru.getRemoteName());
                        ObjectId advertisedOld = null;
                        if (advertisedRef != null) {
@@ -277,13 +277,13 @@ class PushProcess {
        }
 
        private void modifyUpdatesForDryRun() {
-               for (final RemoteRefUpdate rru : toPush.values())
+               for (RemoteRefUpdate rru : toPush.values())
                        if (rru.getStatus() == Status.NOT_ATTEMPTED)
                                rru.setStatus(Status.OK);
        }
 
        private void updateTrackingRefs() {
-               for (final RemoteRefUpdate rru : toPush.values()) {
+               for (RemoteRefUpdate rru : toPush.values()) {
                        final Status status = rru.getStatus();
                        if (rru.hasTrackingRefUpdate()
                                        && (status == Status.UP_TO_DATE || status == Status.OK)) {
index 5c52f2c3ed0645a9456a667eca5015e6f21093b5..d61aeb04d26907010e54b306ab6ae9bd3f2493a1 100644 (file)
@@ -818,11 +818,11 @@ public class ReceiveCommand {
                }
        }
 
-       void setRef(final Ref r) {
+       void setRef(Ref r) {
                ref = r;
        }
 
-       void setType(final Type t) {
+       void setType(Type t) {
                type = t;
        }
 
index 31b75b07f5efceab1d397fdd499e14e3d269fedc..35fb0b17a702f8ce3b16198b12e8cf843fd40e4a 100644 (file)
@@ -288,7 +288,7 @@ public class ReceivePack extends BaseReceivePack {
                                if (echoCommandFailures && msgOut != null) {
                                        sendStatusReport(false, unpackError, new Reporter() {
                                                @Override
-                                               void sendString(final String s) throws IOException {
+                                               void sendString(String s) throws IOException {
                                                        msgOut.write(Constants.encode(s + "\n")); //$NON-NLS-1$
                                                }
                                        });
@@ -301,7 +301,7 @@ public class ReceivePack extends BaseReceivePack {
                                }
                                sendStatusReport(true, unpackError, new Reporter() {
                                        @Override
-                                       void sendString(final String s) throws IOException {
+                                       void sendString(String s) throws IOException {
                                                pckOut.writeString(s + "\n"); //$NON-NLS-1$
                                        }
                                });
@@ -309,7 +309,7 @@ public class ReceivePack extends BaseReceivePack {
                        } else if (msgOut != null) {
                                sendStatusReport(false, unpackError, new Reporter() {
                                        @Override
-                                       void sendString(final String s) throws IOException {
+                                       void sendString(String s) throws IOException {
                                                msgOut.write(Constants.encode(s + "\n")); //$NON-NLS-1$
                                        }
                                });
index 859ef2c976c695b252e778e908e250eb8c7eeb6e..b4d78034677b53903137da3d9e7e40dedc454bd2 100644 (file)
@@ -402,7 +402,7 @@ public abstract class RefAdvertiser {
                        first = false;
                        if (!capablities.isEmpty()) {
                                tmpLine.append('\0');
-                               for (final String capName : capablities) {
+                               for (String capName : capablities) {
                                        tmpLine.append(' ');
                                        tmpLine.append(capName);
                                }
index 3569761175e01929a968fbb4e95ee8efe8e5fa76..0a621f19e1d61f7af3d0c08d9f795c911a28d84d 100644 (file)
@@ -120,7 +120,7 @@ public class RemoteConfig implements Serializable {
 
                final List<RemoteConfig> result = new ArrayList<>(names
                                .size());
-               for (final String name : names)
+               for (String name : names)
                        result.add(new RemoteConfig(rc, name));
                return result;
        }
@@ -170,12 +170,12 @@ public class RemoteConfig implements Serializable {
                vlst = rc.getStringList(SECTION, name, KEY_URL);
                Map<String, String> insteadOf = getReplacements(rc, KEY_INSTEADOF);
                uris = new ArrayList<>(vlst.length);
-               for (final String s : vlst) {
+               for (String s : vlst) {
                        uris.add(new URIish(replaceUri(s, insteadOf)));
                }
                String[] plst = rc.getStringList(SECTION, name, KEY_PUSHURL);
                pushURIs = new ArrayList<>(plst.length);
-               for (final String s : plst) {
+               for (String s : plst) {
                        pushURIs.add(new URIish(s));
                }
                if (pushURIs.isEmpty()) {
@@ -227,22 +227,22 @@ public class RemoteConfig implements Serializable {
                final List<String> vlst = new ArrayList<>();
 
                vlst.clear();
-               for (final URIish u : getURIs())
+               for (URIish u : getURIs())
                        vlst.add(u.toPrivateString());
                rc.setStringList(SECTION, getName(), KEY_URL, vlst);
 
                vlst.clear();
-               for (final URIish u : getPushURIs())
+               for (URIish u : getPushURIs())
                        vlst.add(u.toPrivateString());
                rc.setStringList(SECTION, getName(), KEY_PUSHURL, vlst);
 
                vlst.clear();
-               for (final RefSpec u : getFetchRefSpecs())
+               for (RefSpec u : getFetchRefSpecs())
                        vlst.add(u.toString());
                rc.setStringList(SECTION, getName(), KEY_FETCH, vlst);
 
                vlst.clear();
-               for (final RefSpec u : getPushRefSpecs())
+               for (RefSpec u : getPushRefSpecs())
                        vlst.add(u.toString());
                rc.setStringList(SECTION, getName(), KEY_PUSH, vlst);
 
index 2849afe20d2507bbd46bac97456af5a54e7f008e..931653fa908d94d2323dbb6f71340d55e723ad45 100644 (file)
@@ -481,7 +481,7 @@ public class RemoteRefUpdate {
                expectedOldObjectId = id;
        }
 
-       void setStatus(final Status status) {
+       void setStatus(Status status) {
                this.status = status;
        }
 
@@ -489,7 +489,7 @@ public class RemoteRefUpdate {
                this.fastForward = fastForward;
        }
 
-       void setMessage(final String message) {
+       void setMessage(String message) {
                this.message = message;
        }
 
index 365545a09299fdd74d40f87923117a971eeef4ee..8a3e4efc93e7c709fd92c897c69b403914570cb5 100644 (file)
@@ -55,7 +55,7 @@ class SideBandProgressMonitor extends BatchingProgressMonitor {
 
        private boolean write;
 
-       SideBandProgressMonitor(final OutputStream os) {
+       SideBandProgressMonitor(OutputStream os) {
                out = os;
                write = true;
        }
index eae8aa06d7fc9333752de881754f1cb0e0acba40..cd17913514243621c346bf5cdf964b2e0d46b101 100644 (file)
@@ -107,7 +107,7 @@ public enum TagOpt {
        public static TagOpt fromOption(String o) {
                if (o == null || o.length() == 0)
                        return AUTO_FOLLOW;
-               for (final TagOpt tagopt : values()) {
+               for (TagOpt tagopt : values()) {
                        if (tagopt.option().equals(o))
                                return tagopt;
                }
index 21c0a92964ece4c5ca9c6543851209742090e082..4ae1ccb420645780fdf50f994f4bd62e79bf9716 100644 (file)
@@ -132,12 +132,12 @@ public class TransferConfig {
        final @Nullable ProtocolVersion protocolVersion;
        final String[] hideRefs;
 
-       TransferConfig(final Repository db) {
+       TransferConfig(Repository db) {
                this(db.getConfig());
        }
 
        @SuppressWarnings("nls")
-       TransferConfig(final Config rc) {
+       TransferConfig(Config rc) {
                boolean fsck = rc.getBoolean("transfer", "fsckobjects", false);
                fetchFsck = rc.getBoolean("fetch", "fsckobjects", fsck);
                receiveFsck = rc.getBoolean("receive", "fsckobjects", fsck);
index 0336f477313efd4022065edc033c1109b98fa1d6..d342ef46dfcc7dbbf7adfd25d3a5672dfae0dcc0 100644 (file)
@@ -478,7 +478,7 @@ public abstract class Transport implements AutoCloseable {
                        throws NotSupportedException, TransportException {
                final List<URIish> uris = getURIs(cfg, op);
                final List<Transport> transports = new ArrayList<>(uris.size());
-               for (final URIish uri : uris) {
+               for (URIish uri : uris) {
                        final Transport tn = open(local, uri, cfg.getName());
                        tn.applyConfig(cfg);
                        transports.add(tn);
@@ -621,7 +621,7 @@ public abstract class Transport implements AutoCloseable {
                final List<RemoteRefUpdate> result = new LinkedList<>();
                final Collection<RefSpec> procRefs = expandPushWildcardsFor(db, specs);
 
-               for (final RefSpec spec : procRefs) {
+               for (RefSpec spec : procRefs) {
                        String srcSpec = spec.getSource();
                        final Ref srcRef = db.findRef(srcSpec);
                        if (srcRef != null)
@@ -691,9 +691,9 @@ public abstract class Transport implements AutoCloseable {
                final List<Ref> localRefs = db.getRefDatabase().getRefs();
                final Collection<RefSpec> procRefs = new LinkedHashSet<>();
 
-               for (final RefSpec spec : specs) {
+               for (RefSpec spec : specs) {
                        if (spec.isWildcard()) {
-                               for (final Ref localRef : localRefs) {
+                               for (Ref localRef : localRefs) {
                                        if (spec.matchSource(localRef))
                                                procRefs.add(spec.expandFromSource(localRef));
                                }
@@ -707,7 +707,7 @@ public abstract class Transport implements AutoCloseable {
        private static String findTrackingRefName(final String remoteName,
                        final Collection<RefSpec> fetchSpecs) {
                // try to find matching tracking refs
-               for (final RefSpec fetchSpec : fetchSpecs) {
+               for (RefSpec fetchSpec : fetchSpecs) {
                        if (fetchSpec.matchSource(remoteName)) {
                                if (fetchSpec.isWildcard())
                                        return fetchSpec.expandFromSource(remoteName)
@@ -1253,9 +1253,9 @@ public abstract class Transport implements AutoCloseable {
                        // object transfer overheads.
                        //
                        final Collection<RefSpec> tmp = new ArrayList<>(toFetch);
-                       for (final RefSpec requested : toFetch) {
+                       for (RefSpec requested : toFetch) {
                                final String reqSrc = requested.getSource();
-                               for (final RefSpec configured : fetch) {
+                               for (RefSpec configured : fetch) {
                                        final String cfgSrc = configured.getSource();
                                        final String cfgDst = configured.getDestination();
                                        if (cfgSrc.equals(reqSrc) && cfgDst != null) {
index 9ddfc46667b879a5c1907db75b9b3b4b658f3d0c..6118cb8770684b8f7d596fb9c3808c1070d147b7 100644 (file)
@@ -267,7 +267,7 @@ public class TransportAmazonS3 extends HttpTransport implements WalkTransport {
                }
 
                @Override
-               WalkRemoteObjectDatabase openAlternate(final String location)
+               WalkRemoteObjectDatabase openAlternate(String location)
                                throws IOException {
                        return new DatabaseS3(bucketName, resolveKey(location));
                }
@@ -278,7 +278,7 @@ public class TransportAmazonS3 extends HttpTransport implements WalkTransport {
                        have.addAll(s3.list(bucket, resolveKey("pack"))); //$NON-NLS-1$
 
                        final Collection<String> packs = new ArrayList<>();
-                       for (final String n : have) {
+                       for (String n : have) {
                                if (!n.startsWith("pack-") || !n.endsWith(".pack")) //$NON-NLS-1$ //$NON-NLS-2$
                                        continue;
 
@@ -290,7 +290,7 @@ public class TransportAmazonS3 extends HttpTransport implements WalkTransport {
                }
 
                @Override
-               FileStream open(final String path) throws IOException {
+               FileStream open(String path) throws IOException {
                        final URLConnection c = s3.get(bucket, resolveKey(path));
                        final InputStream raw = c.getInputStream();
                        final InputStream in = s3.decrypt(c);
@@ -299,7 +299,7 @@ public class TransportAmazonS3 extends HttpTransport implements WalkTransport {
                }
 
                @Override
-               void deleteFile(final String path) throws IOException {
+               void deleteFile(String path) throws IOException {
                        s3.delete(bucket, resolveKey(path));
                }
 
@@ -311,7 +311,7 @@ public class TransportAmazonS3 extends HttpTransport implements WalkTransport {
                }
 
                @Override
-               void writeFile(final String path, final byte[] data) throws IOException {
+               void writeFile(String path, byte[] data) throws IOException {
                        s3.put(bucket, resolveKey(path), data);
                }
 
index cbf77bb0b23c494deebb5f522ec83541bbf97d9e..11325036435ff10291f54dee56e1c62731daf364 100644 (file)
@@ -113,11 +113,11 @@ class TransportGitAnon extends TcpTransport implements PackTransport {
                }
        };
 
-       TransportGitAnon(final Repository local, final URIish uri) {
+       TransportGitAnon(Repository local, URIish uri) {
                super(local, uri);
        }
 
-       TransportGitAnon(final URIish uri) {
+       TransportGitAnon(URIish uri) {
                super(uri);
        }
 
@@ -163,7 +163,7 @@ class TransportGitAnon extends TcpTransport implements PackTransport {
                return s;
        }
 
-       void service(final String name, final PacketLineOut pckOut)
+       void service(String name, PacketLineOut pckOut)
                        throws IOException {
                final StringBuilder cmd = new StringBuilder();
                cmd.append(name);
index 291b536184a984a77a086f420622f9884787d81d..d59fe33df654a75c4eb8ac238d54cbd98f9c27c6 100644 (file)
@@ -141,12 +141,12 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
                }
        };
 
-       TransportGitSsh(final Repository local, final URIish uri) {
+       TransportGitSsh(Repository local, URIish uri) {
                super(local, uri);
                initSshSessionFactory();
        }
 
-       TransportGitSsh(final URIish uri) {
+       TransportGitSsh(URIish uri) {
                super(uri);
                initSshSessionFactory();
        }
@@ -176,7 +176,7 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
                return new SshPushConnection();
        }
 
-       String commandFor(final String exe) {
+       String commandFor(String exe) {
                String path = uri.getPath();
                if (uri.getScheme() != null && uri.getPath().startsWith("/~")) //$NON-NLS-1$
                        path = (uri.getPath().substring(1));
index 7fb206003c52579ea9885829a557cefe68227d38..c08f4003079f8a58ceb0874fab1e6168a6bd2d7f 100644 (file)
@@ -273,7 +273,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
 
        private boolean sslFailure = false;
 
-       TransportHttp(final Repository local, final URIish uri)
+       TransportHttp(Repository local, URIish uri)
                        throws NotSupportedException {
                super(local, uri);
                setURI(uri);
@@ -314,7 +314,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
         * @param uri
         * @throws NotSupportedException
         */
-       TransportHttp(final URIish uri) throws NotSupportedException {
+       TransportHttp(URIish uri) throws NotSupportedException {
                super(uri);
                setURI(uri);
                http = new HttpConfig(uri);
@@ -903,7 +903,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
        class HttpObjectDB extends WalkRemoteObjectDatabase {
                private final URL httpObjectsUrl;
 
-               HttpObjectDB(final URL b) {
+               HttpObjectDB(URL b) {
                        httpObjectsUrl = b;
                }
 
@@ -930,7 +930,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
                }
 
                @Override
-               WalkRemoteObjectDatabase openAlternate(final String location)
+               WalkRemoteObjectDatabase openAlternate(String location)
                                throws IOException {
                        return new HttpObjectDB(new URL(httpObjectsUrl, location));
                }
@@ -962,7 +962,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
                }
 
                @Override
-               FileStream open(final String path) throws IOException {
+               FileStream open(String path) throws IOException {
                        return open(path, AcceptEncoding.UNSPECIFIED);
                }
 
@@ -1051,7 +1051,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
        class SmartHttpFetchConnection extends BasePackFetchConnection {
                private MultiRequestService svc;
 
-               SmartHttpFetchConnection(final InputStream advertisement)
+               SmartHttpFetchConnection(InputStream advertisement)
                                throws TransportException {
                        super(TransportHttp.this);
                        statelessRPC = true;
@@ -1081,7 +1081,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
        }
 
        class SmartHttpPushConnection extends BasePackPushConnection {
-               SmartHttpPushConnection(final InputStream advertisement)
+               SmartHttpPushConnection(InputStream advertisement)
                                throws TransportException {
                        super(TransportHttp.this);
                        statelessRPC = true;
@@ -1384,7 +1384,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
        class MultiRequestService extends Service {
                boolean finalRequest;
 
-               MultiRequestService(final String serviceName) {
+               MultiRequestService(String serviceName) {
                        super(serviceName);
                }
 
index 648eaa3cfa8bb1570d2db1053c5ba5a8e333ae90..fbb2c441009231a26eb087cbdb58b4268f2e4732 100644 (file)
@@ -162,11 +162,11 @@ class TransportLocal extends Transport implements PackTransport {
                remoteGitDir = gitDir;
        }
 
-       UploadPack createUploadPack(final Repository dst) {
+       UploadPack createUploadPack(Repository dst) {
                return new UploadPack(dst);
        }
 
-       ReceivePack createReceivePack(final Repository dst) {
+       ReceivePack createReceivePack(Repository dst) {
                return new ReceivePack(dst);
        }
 
index aa5ee7a3d53876fbb3a7b8c48a44e4f5828cf56d..d8f3a12bfe0aec8dad7edd422fad4ad5593c3c74 100644 (file)
@@ -134,7 +134,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
                }
        };
 
-       TransportSftp(final Repository local, final URIish uri) {
+       TransportSftp(Repository local, URIish uri) {
                super(local, uri);
        }
 
@@ -195,7 +195,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
                        }
                }
 
-               SftpObjectDB(final SftpObjectDB parent, final String p)
+               SftpObjectDB(SftpObjectDB parent, String p)
                                throws TransportException {
                        try {
                                ftp = newSftp();
@@ -227,7 +227,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
                }
 
                @Override
-               WalkRemoteObjectDatabase openAlternate(final String location)
+               WalkRemoteObjectDatabase openAlternate(String location)
                                throws IOException {
                        return new SftpObjectDB(this, location);
                }
@@ -244,9 +244,9 @@ public class TransportSftp extends SshTransport implements WalkTransport {
                                files = new HashMap<>();
                                mtimes = new HashMap<>();
 
-                               for (final ChannelSftp.LsEntry ent : list)
+                               for (ChannelSftp.LsEntry ent : list)
                                        files.put(ent.getFilename(), ent);
-                               for (final ChannelSftp.LsEntry ent : list) {
+                               for (ChannelSftp.LsEntry ent : list) {
                                        final String n = ent.getFilename();
                                        if (!n.startsWith("pack-") || !n.endsWith(".pack")) //$NON-NLS-1$ //$NON-NLS-2$
                                                continue;
@@ -276,7 +276,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
                }
 
                @Override
-               FileStream open(final String path) throws IOException {
+               FileStream open(String path) throws IOException {
                        try {
                                final SftpATTRS a = ftp.lstat(path);
                                return new FileStream(ftp.get(path), a.getSize());
@@ -290,7 +290,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
                }
 
                @Override
-               void deleteFile(final String path) throws IOException {
+               void deleteFile(String path) throws IOException {
                        try {
                                ftp.rm(path);
                        } catch (SftpException je) {
@@ -343,7 +343,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
                }
 
                @Override
-               void writeFile(final String path, final byte[] data) throws IOException {
+               void writeFile(String path, byte[] data) throws IOException {
                        final String lock = path + ".lock"; //$NON-NLS-1$
                        try {
                                super.writeFile(lock, data);
@@ -411,7 +411,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
                                                je.getMessage()), je);
                        }
 
-                       for (final ChannelSftp.LsEntry ent : list) {
+                       for (ChannelSftp.LsEntry ent : list) {
                                final String n = ent.getFilename();
                                if (".".equals(n) || "..".equals(n)) //$NON-NLS-1$ //$NON-NLS-2$
                                        continue;
index 615e46b98219d48ef87808482ba226dee9713b35..b4248ee3fcf635e609625108bd2d1c2bb7396a1d 100644 (file)
@@ -128,7 +128,7 @@ abstract class WalkEncryption {
                        throw new IOException(MessageFormat.format(JGitText.get().unsupportedEncryptionAlgorithm, v));
        }
 
-       IOException error(final Throwable why) {
+       IOException error(Throwable why) {
                return new IOException(MessageFormat
                                .format(JGitText.get().encryptionError,
                                why.getMessage()), why);
@@ -141,7 +141,7 @@ abstract class WalkEncryption {
                }
 
                @Override
-               void validate(final HttpURLConnection u, final String prefix)
+               void validate(HttpURLConnection u, String prefix)
                                throws IOException {
                        validateImpl(u, prefix, "", ""); //$NON-NLS-1$ //$NON-NLS-2$
                }
@@ -240,19 +240,19 @@ abstract class WalkEncryption {
                }
 
                @Override
-               void request(final HttpURLConnection u, final String prefix) {
+               void request(HttpURLConnection u, String prefix) {
                        u.setRequestProperty(prefix + JETS3T_CRYPTO_VER, CRYPTO_VER);
                        u.setRequestProperty(prefix + JETS3T_CRYPTO_ALG, cryptoAlg);
                }
 
                @Override
-               void validate(final HttpURLConnection u, final String prefix)
+               void validate(HttpURLConnection u, String prefix)
                                throws IOException {
                        validateImpl(u, prefix, CRYPTO_VER, cryptoAlg);
                }
 
                @Override
-               OutputStream encrypt(final OutputStream os) throws IOException {
+               OutputStream encrypt(OutputStream os) throws IOException {
                        try {
                                final Cipher cipher = InsecureCipherFactory.create(cryptoAlg);
                                cipher.init(Cipher.ENCRYPT_MODE, secretKey, paramSpec);
@@ -263,7 +263,7 @@ abstract class WalkEncryption {
                }
 
                @Override
-               InputStream decrypt(final InputStream in) throws IOException {
+               InputStream decrypt(InputStream in) throws IOException {
                        try {
                                final Cipher cipher = InsecureCipherFactory.create(cryptoAlg);
                                cipher.init(Cipher.DECRYPT_MODE, secretKey, paramSpec);
index 9b6f458994cfda5277f8168d496dd0e6e45442b7..9307914444ba7d375c2bcaec2d32f7cda1d34a18 100644 (file)
@@ -187,7 +187,7 @@ class WalkFetchConnection extends BaseFetchConnection {
        /** Inserter to read objects from {@link #local}. */
        private final ObjectReader reader;
 
-       WalkFetchConnection(final WalkTransport t, final WalkRemoteObjectDatabase w) {
+       WalkFetchConnection(WalkTransport t, WalkRemoteObjectDatabase w) {
                Transport wt = (Transport)t;
                local = wt.local;
                objCheck = wt.getObjectChecker();
@@ -265,18 +265,18 @@ class WalkFetchConnection extends BaseFetchConnection {
        public void close() {
                inserter.close();
                reader.close();
-               for (final RemotePack p : unfetchedPacks) {
+               for (RemotePack p : unfetchedPacks) {
                        if (p.tmpIdx != null)
                                p.tmpIdx.delete();
                }
-               for (final WalkRemoteObjectDatabase r : remotes)
+               for (WalkRemoteObjectDatabase r : remotes)
                        r.close();
        }
 
        private void queueWants(Collection<Ref> want)
                        throws TransportException {
                final HashSet<ObjectId> inWorkQueue = new HashSet<>();
-               for (final Ref r : want) {
+               for (Ref r : want) {
                        final ObjectId id = r.getObjectId();
                        if (id == null) {
                                throw new NullPointerException(MessageFormat.format(
@@ -385,7 +385,7 @@ class WalkFetchConnection extends BaseFetchConnection {
                final RevCommit commit = (RevCommit) obj;
                markLocalCommitsComplete(commit.getCommitTime());
                needs(commit.getTree());
-               for (final RevCommit p : commit.getParents())
+               for (RevCommit p : commit.getParents())
                        needs(p);
                obj.add(COMPLETE);
        }
@@ -459,7 +459,7 @@ class WalkFetchConnection extends BaseFetchConnection {
 
                                if (packNameList == null || packNameList.isEmpty())
                                        continue;
-                               for (final String packName : packNameList) {
+                               for (String packName : packNameList) {
                                        if (packsConsidered.add(packName))
                                                unfetchedPacks.add(new RemotePack(wrr, packName));
                                }
@@ -471,7 +471,7 @@ class WalkFetchConnection extends BaseFetchConnection {
                        //
                        Collection<WalkRemoteObjectDatabase> al = expandOneAlternate(id, pm);
                        if (al != null && !al.isEmpty()) {
-                               for (final WalkRemoteObjectDatabase alt : al) {
+                               for (WalkRemoteObjectDatabase alt : al) {
                                        remotes.add(alt);
                                        noPacksYet.add(alt);
                                        noAlternatesYet.add(alt);
@@ -693,14 +693,14 @@ class WalkFetchConnection extends BaseFetchConnection {
                } catch (IOException e) {
                        throw new TransportException(e.getMessage(), e);
                }
-               for (final Ref r : refs) {
+               for (Ref r : refs) {
                        try {
                                markLocalObjComplete(revWalk.parseAny(r.getObjectId()));
                        } catch (IOException readError) {
                                throw new TransportException(MessageFormat.format(JGitText.get().localRefIsMissingObjects, r.getName()), readError);
                        }
                }
-               for (final ObjectId id : have) {
+               for (ObjectId id : have) {
                        try {
                                markLocalObjComplete(revWalk.parseAny(id));
                        } catch (IOException readError) {
@@ -739,7 +739,7 @@ class WalkFetchConnection extends BaseFetchConnection {
                                localCommitQueue.next();
 
                                markTreeComplete(c.getTree());
-                               for (final RevCommit p : c.getParents())
+                               for (RevCommit p : c.getParents())
                                        pushLocalCommit(p);
                        }
                } catch (IOException err) {
@@ -813,7 +813,7 @@ class WalkFetchConnection extends BaseFetchConnection {
 
                PackIndex index;
 
-               RemotePack(final WalkRemoteObjectDatabase c, final String pn) {
+               RemotePack(WalkRemoteObjectDatabase c, String pn) {
                        connection = c;
                        packName = pn;
                        idxName = packName.substring(0, packName.length() - 5) + ".idx"; //$NON-NLS-1$
@@ -831,7 +831,7 @@ class WalkFetchConnection extends BaseFetchConnection {
                        }
                }
 
-               void openIndex(final ProgressMonitor pm) throws IOException {
+               void openIndex(ProgressMonitor pm) throws IOException {
                        if (index != null)
                                return;
                        if (tmpIdx == null)
@@ -850,7 +850,7 @@ class WalkFetchConnection extends BaseFetchConnection {
                        pm.beginTask("Get " + idxName.substring(0, 12) + "..idx", //$NON-NLS-1$ //$NON-NLS-2$
                                        s.length < 0 ? ProgressMonitor.UNKNOWN
                                                        : (int) (s.length / 1024));
-                       try (final FileOutputStream fos = new FileOutputStream(tmpIdx)) {
+                       try (FileOutputStream fos = new FileOutputStream(tmpIdx)) {
                                final byte[] buf = new byte[2048];
                                int cnt;
                                while (!pm.isCancelled() && (cnt = s.in.read(buf)) >= 0) {
@@ -878,7 +878,7 @@ class WalkFetchConnection extends BaseFetchConnection {
                        }
                }
 
-               void downloadPack(final ProgressMonitor monitor) throws IOException {
+               void downloadPack(ProgressMonitor monitor) throws IOException {
                        String name = "pack/" + packName; //$NON-NLS-1$
                        WalkRemoteObjectDatabase.FileStream s = connection.open(name);
                        try {
index 5cc616ed3bf52d05ede17e3b8915f9b2133d7957..4c754252a3dff0927a3a2ed43dc891d3f3acdce5 100644 (file)
@@ -157,7 +157,7 @@ class WalkPushConnection extends BaseConnection implements PushConnection {
                // ref using the directory name being created.
                //
                final List<RemoteRefUpdate> updates = new ArrayList<>();
-               for (final RemoteRefUpdate u : refUpdates.values()) {
+               for (RemoteRefUpdate u : refUpdates.values()) {
                        final String n = u.getRemoteName();
                        if (!n.startsWith("refs/") || !Repository.isValidRefName(n)) { //$NON-NLS-1$
                                u.setStatus(Status.REJECTED_OTHER_REASON);
@@ -177,7 +177,7 @@ class WalkPushConnection extends BaseConnection implements PushConnection {
                //
                if (!updates.isEmpty())
                        sendpack(updates, monitor);
-               for (final RemoteRefUpdate u : updates)
+               for (RemoteRefUpdate u : updates)
                        updateCommand(u);
 
                // Is this a new repository? If so we should create additional
@@ -196,10 +196,10 @@ class WalkPushConnection extends BaseConnection implements PushConnection {
                if (!packedRefUpdates.isEmpty()) {
                        try {
                                refWriter.writePackedRefs();
-                               for (final RemoteRefUpdate u : packedRefUpdates)
+                               for (RemoteRefUpdate u : packedRefUpdates)
                                        u.setStatus(Status.OK);
                        } catch (IOException err) {
-                               for (final RemoteRefUpdate u : packedRefUpdates) {
+                               for (RemoteRefUpdate u : packedRefUpdates) {
                                        u.setStatus(Status.REJECTED_OTHER_REASON);
                                        u.setMessage(err.getMessage());
                                }
@@ -225,14 +225,14 @@ class WalkPushConnection extends BaseConnection implements PushConnection {
                String pathPack = null;
                String pathIdx = null;
 
-               try (final PackWriter writer = new PackWriter(transport.getPackConfig(),
+               try (PackWriter writer = new PackWriter(transport.getPackConfig(),
                                local.newObjectReader())) {
 
                        final Set<ObjectId> need = new HashSet<>();
                        final Set<ObjectId> have = new HashSet<>();
-                       for (final RemoteRefUpdate r : updates)
+                       for (RemoteRefUpdate r : updates)
                                need.add(r.getNewObjectId());
-                       for (final Ref r : getRefs()) {
+                       for (Ref r : getRefs()) {
                                have.add(r.getObjectId());
                                if (r.getPeeledObjectId() != null)
                                        have.add(r.getPeeledObjectId());
@@ -247,7 +247,7 @@ class WalkPushConnection extends BaseConnection implements PushConnection {
                                return;
 
                        packNames = new LinkedHashMap<>();
-                       for (final String n : dest.getPackNames())
+                       for (String n : dest.getPackNames())
                                packNames.put(n, n);
 
                        final String base = "pack-" + writer.computeName().name(); //$NON-NLS-1$
@@ -379,7 +379,7 @@ class WalkPushConnection extends BaseConnection implements PushConnection {
                // default branch and is likely what they want to remain as
                // the default on the new remote.
                //
-               for (final RemoteRefUpdate u : updates) {
+               for (RemoteRefUpdate u : updates) {
                        final String n = u.getRemoteName();
                        if (n.equals(Constants.R_HEADS + Constants.MASTER))
                                return n;
@@ -388,7 +388,7 @@ class WalkPushConnection extends BaseConnection implements PushConnection {
                // Pick any branch, under the assumption the user pushed only
                // one to the remote side.
                //
-               for (final RemoteRefUpdate u : updates) {
+               for (RemoteRefUpdate u : updates) {
                        final String n = u.getRemoteName();
                        if (n.startsWith(Constants.R_HEADS))
                                return n;
index dde7b0815447b33ba8f9a757a725e8df6e1e8533..aa71c9445a3a38ed77a73b16e3d3fe3bf6b4e9d3 100644 (file)
@@ -202,7 +202,7 @@ abstract class WalkRemoteObjectDatabase {
         * @throws IOException
         *             deletion is not supported, or deletion failed.
         */
-       void deleteFile(final String path) throws IOException {
+       void deleteFile(String path) throws IOException {
                throw new IOException(MessageFormat.format(JGitText.get().deletingNotSupported, path));
        }
 
@@ -263,7 +263,7 @@ abstract class WalkRemoteObjectDatabase {
         *             writing is not supported, or attempting to write the file
         *             failed, possibly due to permissions or remote disk full, etc.
         */
-       void writeFile(final String path, final byte[] data) throws IOException {
+       void writeFile(String path, byte[] data) throws IOException {
                try (OutputStream os = writeFile(path, null, null)) {
                        os.write(data);
                }
@@ -278,7 +278,7 @@ abstract class WalkRemoteObjectDatabase {
         * @throws IOException
         *             deletion is not supported, or deletion failed.
         */
-       void deleteRef(final String name) throws IOException {
+       void deleteRef(String name) throws IOException {
                deleteFile(ROOT_DIR + name);
        }
 
@@ -291,7 +291,7 @@ abstract class WalkRemoteObjectDatabase {
         * @throws IOException
         *             deletion is not supported, or deletion failed.
         */
-       void deleteRefLog(final String name) throws IOException {
+       void deleteRefLog(String name) throws IOException {
                deleteFile(ROOT_DIR + Constants.LOGS + "/" + name); //$NON-NLS-1$
        }
 
@@ -309,7 +309,7 @@ abstract class WalkRemoteObjectDatabase {
         *             writing is not supported, or attempting to write the file
         *             failed, possibly due to permissions or remote disk full, etc.
         */
-       void writeRef(final String name, final ObjectId value) throws IOException {
+       void writeRef(String name, ObjectId value) throws IOException {
                final ByteArrayOutputStream b;
 
                b = new ByteArrayOutputStream(Constants.OBJECT_ID_STRING_LENGTH + 1);
@@ -333,9 +333,9 @@ abstract class WalkRemoteObjectDatabase {
         *             writing is not supported, or attempting to write the file
         *             failed, possibly due to permissions or remote disk full, etc.
         */
-       void writeInfoPacks(final Collection<String> packNames) throws IOException {
+       void writeInfoPacks(Collection<String> packNames) throws IOException {
                final StringBuilder w = new StringBuilder();
-               for (final String n : packNames) {
+               for (String n : packNames) {
                        w.append("P "); //$NON-NLS-1$
                        w.append(n);
                        w.append('\n');
@@ -361,7 +361,7 @@ abstract class WalkRemoteObjectDatabase {
         *             exists, or after it was determined to exist but before the
         *             stream could be created.
         */
-       BufferedReader openReader(final String path) throws IOException {
+       BufferedReader openReader(String path) throws IOException {
                final InputStream is = open(path).in;
                return new BufferedReader(new InputStreamReader(is, Constants.CHARSET));
        }
@@ -475,7 +475,7 @@ abstract class WalkRemoteObjectDatabase {
                 *            stream containing the file data. This stream will be
                 *            closed by the caller when reading is complete.
                 */
-               FileStream(final InputStream i) {
+               FileStream(InputStream i) {
                        in = i;
                        length = -1;
                }
@@ -490,7 +490,7 @@ abstract class WalkRemoteObjectDatabase {
                 *            total number of bytes available for reading through
                 *            <code>i</code>.
                 */
-               FileStream(final InputStream i, final long n) {
+               FileStream(InputStream i, long n) {
                        in = i;
                        length = n;
                }
index ad409f6d6fd5703c4d24f749b245d6102fdc644f..470ed0284170fba63630ccbd0e7ef8462aa9c803 100644 (file)
@@ -326,7 +326,7 @@ public abstract class AbstractTreeIterator {
                return pathCompare(p, p.mode);
        }
 
-       int pathCompare(final AbstractTreeIterator p, final int pMode) {
+       int pathCompare(AbstractTreeIterator p, int pMode) {
                // Its common when we are a subtree for both parents to match;
                // when this happens everything in path[0..cPos] is known to
                // be equal and does not require evaluation again.
index 0639b0dbdd6ce6b2ebe3c37145452899b98490af..f5d45c768782ee43fd2002b8ca8f9e1c0b752857 100644 (file)
@@ -63,7 +63,7 @@ public class EmptyTreeIterator extends AbstractTreeIterator {
                // Create a root empty tree.
        }
 
-       EmptyTreeIterator(final AbstractTreeIterator p) {
+       EmptyTreeIterator(AbstractTreeIterator p) {
                super(p);
                pathLen = pathOffset;
        }
index b0509705ddaa7790128665944926331e3b271945..61b130f93f1e1b76e9022a63608b6548107479c7 100644 (file)
@@ -135,7 +135,7 @@ public class NameConflictTreeWalk extends TreeWalk {
 
                        if (isTree(minRef)) {
                                if (skipEntry(minRef)) {
-                                       for (final AbstractTreeIterator t : trees) {
+                                       for (AbstractTreeIterator t : trees) {
                                                if (t.matches == minRef) {
                                                        t.next(1);
                                                        t.matches = null;
@@ -231,7 +231,7 @@ public class NameConflictTreeWalk extends TreeWalk {
                // A tree D/F may have been handled earlier. We need to
                // not report this path if it has already been reported.
                //
-               for (final AbstractTreeIterator t : trees) {
+               for (AbstractTreeIterator t : trees) {
                        if (t.matches == minRef || t.first())
                                continue;
 
@@ -267,7 +267,7 @@ public class NameConflictTreeWalk extends TreeWalk {
                // such entries match this entry.
                //
                AbstractTreeIterator treeMatch = null;
-               for (final AbstractTreeIterator t : trees) {
+               for (AbstractTreeIterator t : trees) {
                        if (t.matches == minRef || t.eof())
                                continue;
 
@@ -306,7 +306,7 @@ public class NameConflictTreeWalk extends TreeWalk {
                        // matching iterators instead of the file iterator.
                        // This way isSubtree is true and isRecursive works.
                        //
-                       for (final AbstractTreeIterator t : trees)
+                       for (AbstractTreeIterator t : trees)
                                if (t.matches == minRef)
                                        t.matches = treeMatch;
 
index 8db95da344c257fdf30ba1c240a517e718519000..d500aae681abe94b025a6b358580b079ba2048d7 100644 (file)
@@ -1361,7 +1361,7 @@ public class TreeWalk implements AutoCloseable, AttributesProvider {
                        trees[i] = trees[i].parent;
 
                AbstractTreeIterator minRef = null;
-               for (final AbstractTreeIterator t : trees) {
+               for (AbstractTreeIterator t : trees) {
                        if (t.matches != t)
                                continue;
                        if (minRef == null || t.pathCompare(minRef) < 0)
@@ -1377,11 +1377,11 @@ public class TreeWalk implements AutoCloseable, AttributesProvider {
                return p;
        }
 
-       static String pathOf(final AbstractTreeIterator t) {
+       static String pathOf(AbstractTreeIterator t) {
                return RawParseUtils.decode(Constants.CHARSET, t.path, 0, t.pathLen);
        }
 
-       static String pathOf(final byte[] buf, int pos, int end) {
+       static String pathOf(byte[] buf, int pos, int end) {
                return RawParseUtils.decode(Constants.CHARSET, buf, pos, end);
        }
 
index 44385eacb22493434105fdf098c2a51311e00d30..10e9196411300976c39e84fc7bd710b86bf62588 100644 (file)
@@ -1175,7 +1175,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
 
                int encodedNameLen;
 
-               void encodeName(final CharsetEncoder enc) {
+               void encodeName(CharsetEncoder enc) {
                        final ByteBuffer b;
                        try {
                                b = enc.encode(CharBuffer.wrap(getName()));
index 62a5440aa2efad034925d6165f06f8135d7808f3..a960bd7a8e9fcdee3c86b0f4df2b7fdf7ea6deeb 100644 (file)
@@ -120,7 +120,7 @@ public abstract class AndTreeFilter extends TreeFilter {
 
                private final TreeFilter b;
 
-               Binary(final TreeFilter one, final TreeFilter two) {
+               Binary(TreeFilter one, TreeFilter two) {
                        a = one;
                        b = two;
                }
@@ -170,7 +170,7 @@ public abstract class AndTreeFilter extends TreeFilter {
        private static class List extends AndTreeFilter {
                private final TreeFilter[] subfilters;
 
-               List(final TreeFilter[] list) {
+               List(TreeFilter[] list) {
                        subfilters = list;
                }
 
@@ -186,7 +186,7 @@ public abstract class AndTreeFilter extends TreeFilter {
                                throws MissingObjectException, IncorrectObjectTypeException,
                                IOException {
                        int m = 0;
-                       for (final TreeFilter f : subfilters) {
+                       for (TreeFilter f : subfilters) {
                                int r = f.matchFilter(walker);
                                if (r == 1) {
                                        return 1;
@@ -200,7 +200,7 @@ public abstract class AndTreeFilter extends TreeFilter {
 
                @Override
                public boolean shouldBeRecursive() {
-                       for (final TreeFilter f : subfilters)
+                       for (TreeFilter f : subfilters)
                                if (f.shouldBeRecursive())
                                        return true;
                        return false;
index 0a3b7d02d45e0f63ceae3f5f4b21086205e59448..995561e59e1eb54e876ec3a5caf35ae6cb4c5447 100644 (file)
@@ -112,7 +112,7 @@ class ByteArraySet {
         *            pre-computed hash of toFind
         * @return true if the mapping exists for this byte array; false otherwise.
         */
-       boolean contains(final byte[] toFind, int length, int hash) {
+       boolean contains(byte[] toFind, int length, int hash) {
                return get(toFind, length, hash) != null;
        }
 
index 07c6bfcfc40bbec24cad7dd0387c7c8686af383f..308ff0c962af74e54041b124c1c17081481ac7ec 100644 (file)
@@ -118,7 +118,7 @@ public abstract class OrTreeFilter extends TreeFilter {
 
                private final TreeFilter b;
 
-               Binary(final TreeFilter one, final TreeFilter two) {
+               Binary(TreeFilter one, TreeFilter two) {
                        a = one;
                        b = two;
                }
@@ -168,7 +168,7 @@ public abstract class OrTreeFilter extends TreeFilter {
        private static class List extends OrTreeFilter {
                private final TreeFilter[] subfilters;
 
-               List(final TreeFilter[] list) {
+               List(TreeFilter[] list) {
                        subfilters = list;
                }
 
@@ -184,7 +184,7 @@ public abstract class OrTreeFilter extends TreeFilter {
                                throws MissingObjectException, IncorrectObjectTypeException,
                                IOException {
                        int m = 1;
-                       for (final TreeFilter f : subfilters) {
+                       for (TreeFilter f : subfilters) {
                                int r = f.matchFilter(walker);
                                if (r == 0) {
                                        return 0;
@@ -198,7 +198,7 @@ public abstract class OrTreeFilter extends TreeFilter {
 
                @Override
                public boolean shouldBeRecursive() {
-                       for (final TreeFilter f : subfilters)
+                       for (TreeFilter f : subfilters)
                                if (f.shouldBeRecursive())
                                        return true;
                        return false;
index 66b3c84073e7b98e2c912c1873697ae92f9747f3..9267fb64f50ebd22933f173a676eecb4c4fbc814 100644 (file)
@@ -115,7 +115,7 @@ public class PathFilter extends TreeFilter {
        /** {@inheritDoc} */
        @Override
        public boolean shouldBeRecursive() {
-               for (final byte b : pathRaw)
+               for (byte b : pathRaw)
                        if (b == '/')
                                return true;
                return false;
index 26cf8857bde3f5d08666b9e7f97a85bbb662cfdd..5cf5750808cd6db5fa24cc03a265fb9c3ee334f7 100644 (file)
@@ -88,7 +88,7 @@ public class PathFilterGroup {
                                        JGitText.get().atLeastOnePathIsRequired);
                final PathFilter[] p = new PathFilter[paths.size()];
                int i = 0;
-               for (final String s : paths)
+               for (String s : paths)
                        p[i++] = PathFilter.create(s);
                return create(p);
        }
index 25e9aafe14bfc5cbb588e0c05413ce774406a6eb..6b58790b23d103fbf8f875d98bad5b2d754ae8fc 100644 (file)
@@ -70,7 +70,7 @@ public abstract class CachedAuthenticator extends Authenticator {
        protected final PasswordAuthentication getPasswordAuthentication() {
                final String host = getRequestingHost();
                final int port = getRequestingPort();
-               for (final CachedAuthentication ca : cached) {
+               for (CachedAuthentication ca : cached) {
                        if (ca.host.equals(host) && ca.port == port)
                                return ca.toPasswordAuthentication();
                }
index 0681a3f68e449f97d9f96057b5ab60e58df829bc..3372bbe6a44c87ee0dc93ee35204123c9629ceb7 100644 (file)
@@ -470,7 +470,7 @@ public abstract class FS {
                if (path == null)
                        return null;
 
-               for (final String p : path.split(File.pathSeparator)) {
+               for (String p : path.split(File.pathSeparator)) {
                        for (String command : lookFor) {
                                final File e = new File(p, command);
                                if (e.isFile())
index 146966dd4e17a60f14f97b185499afe00d1693d4..8c7f672848b03420e96904314ee095c4b1ed3602 100644 (file)
@@ -182,7 +182,7 @@ public class LongMap<V> {
                V value;
                Node<V> next;
 
-               Node(final long k, final V v) {
+               Node(long k, V v) {
                        key = k;
                        value = v;
                }
index 057b17785e10f57e163ba9278a6a0ed9d3c00ecb..3ed7aeb954e2eb9b114768b2e166afb96b6d3513 100644 (file)
@@ -238,7 +238,7 @@ public abstract class TemporaryBuffer extends OutputStream {
                        throw new OutOfMemoryError(JGitText.get().lengthExceedsMaximumArraySize);
                final byte[] out = new byte[(int) len];
                int outPtr = 0;
-               for (final Block b : blocks) {
+               for (Block b : blocks) {
                        System.arraycopy(b.buffer, 0, out, outPtr, b.count);
                        outPtr += b.count;
                }
@@ -265,7 +265,7 @@ public abstract class TemporaryBuffer extends OutputStream {
                                        JGitText.get().lengthExceedsMaximumArraySize);
                final byte[] out = new byte[(int) len];
                int outPtr = 0;
-               for (final Block b : blocks) {
+               for (Block b : blocks) {
                        System.arraycopy(b.buffer, 0, out, outPtr, b.count);
                        outPtr += b.count;
                }
@@ -292,7 +292,7 @@ public abstract class TemporaryBuffer extends OutputStream {
                        throws IOException {
                if (pm == null)
                        pm = NullProgressMonitor.INSTANCE;
-               for (final Block b : blocks) {
+               for (Block b : blocks) {
                        os.write(b.buffer, 0, b.count);
                        pm.update(b.count / 1024);
                }
@@ -373,7 +373,7 @@ public abstract class TemporaryBuffer extends OutputStream {
                overflow = overflow();
 
                final Block last = blocks.remove(blocks.size() - 1);
-               for (final Block b : blocks)
+               for (Block b : blocks)
                        overflow.write(b.buffer, 0, b.count);
                blocks = null;
 
index 475b0c110df16a8c182764389bef7537e8f4ddcc..b7feddda57958597c3ce79a02b8dfc67a046007d 100644 (file)
@@ -145,7 +145,7 @@ public final class InterruptTimer {
        }
 
        static final class AlarmThread extends Thread {
-               AlarmThread(final String name, final AlarmState q) {
+               AlarmThread(String name, AlarmState q) {
                        super(q);
                        setName(name);
                        setDaemon(true);
@@ -161,7 +161,7 @@ public final class InterruptTimer {
        private static final class AutoKiller {
                private final AlarmState state;
 
-               AutoKiller(final AlarmState s) {
+               AutoKiller(AlarmState s) {
                        state = s;
                }
 
@@ -203,7 +203,7 @@ public final class InterruptTimer {
                        }
                }
 
-               synchronized void begin(final int timeout) {
+               synchronized void begin(int timeout) {
                        if (terminated)
                                throw new IllegalStateException(JGitText.get().timerAlreadyTerminated);
                        callingThread = Thread.currentThread();