summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2018-05-16 16:34:16 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2018-05-18 17:59:45 +0200
commitf3ec7cf3f0436a79e252251a31dbc62694555897 (patch)
tree49a647fa520bb5a1016425df26357947f8dab95c
parent667e30678a6bad26f4d4d412e996b293e52e5b87 (diff)
downloadjgit-f3ec7cf3f0436a79e252251a31dbc62694555897.tar.gz
jgit-f3ec7cf3f0436a79e252251a31dbc62694555897.zip
Remove further unnecessary 'final' keywords
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>
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java6
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java6
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java4
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java8
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/AsIsFileService.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java2
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java2
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java2
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java2
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java2
-rw-r--r--org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java2
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java4
-rw-r--r--org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java2
-rw-r--r--org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java10
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java20
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java6
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java4
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java2
-rw-r--r--org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java10
-rw-r--r--org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java10
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java8
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java14
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java6
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/XInputStream.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java6
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java12
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java4
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java2
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/TreeFilterTest.java6
-rw-r--r--org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java2
-rw-r--r--org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java6
-rw-r--r--org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java18
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/CompoundException.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/errors/MissingBundlePrerequisiteException.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteWindow.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/DeltaBaseCache.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java16
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndex.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java30
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockObjQueue.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BoundaryGenerator.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DelayRevQueue.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FixUninterestingGenerator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/MergeBaseGenerator.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PendingGenerator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AuthorRevFilter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitterRevFilter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MessageRevFilter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java16
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonClient.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchHeadRecord.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java34
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchResult.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/OperationResult.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java16
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java18
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java28
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkRemoteObjectDatabase.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/LongMap.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/InterruptTimer.java6
203 files changed, 570 insertions, 570 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java
index 7f826d4f27..9e9f25e611 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java
@@ -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;
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java
index 09f110d9b3..05510a05b0 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/FileSender.java
@@ -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");
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java
index 1c523a0623..62f075c73c 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java
@@ -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;
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java
index 2ff385dbec..9601c8cafa 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ServletUtils.java
@@ -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));
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java
index 6417877e1b..92009c5731 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java
@@ -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()]);
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java
index 5cac868b9f..b2466d0e3e 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java
@@ -64,7 +64,7 @@ class TextFileServlet extends HttpServlet {
private final String fileName;
- TextFileServlet(final String name) {
+ TextFileServlet(String name) {
this.fileName = name;
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
index bf2d6dbb4d..010810508a 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
@@ -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();
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java
index 6742c9f721..4fd99c6ef3 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java
@@ -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);
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java
index 56e4e22889..c02399a23f 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/UrlPipeline.java
@@ -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;
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/AsIsFileService.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/AsIsFileService.java
index 11ad5e0e1a..9a928b1e20 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/AsIsFileService.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/AsIsFileService.java
@@ -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);
}
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java
index fbd155c0dc..06a8f5effe 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java
@@ -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);
}
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java
index e6df77b836..30edc15166 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java
@@ -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);
}
}
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java
index e94a792ff2..298bf2170c 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/AsIsServiceTest.java
@@ -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;
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java
index b24e2dfc7b..ade1e1d2be 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultReceivePackFactoryTest.java
@@ -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;
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java
index ce24d64b7b..268c281e29 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/DefaultUploadPackFactoryTest.java
@@ -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;
diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java
index 8d08c038d0..82476dea4d 100644
--- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java
+++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java
@@ -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);
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
index 4891c01945..d23c0d3c22 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
@@ -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;
}
diff --git a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
index 8a8f49c1b0..09f8d0aeaf 100644
--- a/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
+++ b/org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/UploadTest.java
@@ -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 {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
index d268857914..bdd1b39c0d 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
@@ -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.
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
index cdb297eb1c..0788922639 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
@@ -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)];
diff --git a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java
index 69eb1989d7..44ad79defc 100644
--- a/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java
+++ b/org.eclipse.jgit.pgm.test/src/org/eclipse/jgit/pgm/CLIGitCommand.java
@@ -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);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
index 2b6ea2a0e9..9223e0fcd1 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AbstractFetchCommand.java
@@ -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;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
index cce889b76e..f4f8d8f50f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java
@@ -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$
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
index 65d60bce5a..a88354deba 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java
@@ -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);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
index e699326a0b..5754d7c44f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandCatalog.java
@@ -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);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
index 4df446fe8f..1773de5d78 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java
@@ -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('-');
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
index d0ada67fc4..319b5e39dc 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java
@@ -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);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
index 510406345f..42aabc2f49 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java
@@ -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));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
index 0d8b7ec005..ad92a78f69 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java
@@ -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();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
index 9079233587..2711c15729 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java
@@ -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$
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
index c57f9f2c37..01fa7eeb81 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java
@@ -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));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
index e303f385a8..ac53de9767 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java
@@ -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 {
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
index 62a88aeed6..6842d8ddbf 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java
@@ -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;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
index 309dca2a7f..be8ad374d3 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java
@@ -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)
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
index 21e37cd8c9..ac08cd6ac3 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java
@@ -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());
}
}
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
index 1178f88017..15abeac96e 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java
@@ -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);
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
index fb1e6d0a50..89a15fe4d8 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java
@@ -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();
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
index 0cc5dbc47e..6318a633ca 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java
@@ -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$
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
index 7b3854212e..7e5b5451b6 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java
@@ -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));
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
index a133b05379..2d16fefa71 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
@@ -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;
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
index a960ec6dd3..af56d65c0f 100644
--- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
+++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java
@@ -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();
diff --git a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
index f26952ea76..79d8d0e10b 100644
--- a/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
+++ b/org.eclipse.jgit.test/exttst/org/eclipse/jgit/patch/EGitPatchHistoryTest.java
@@ -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";
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java
index cc21b473ec..bbd6ec0bde 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/CommitOnlyTest.java
@@ -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();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java
index 2b108870f9..3598f3a4a1 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheBuilderIteratorTest.java
@@ -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
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java
index 0b261840c2..c362e7497c 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheCGitCompatabilityTest.java
@@ -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);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java
index dd242e5a1a..82565fceec 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/dircache/DirCacheIteratorTest.java
@@ -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));
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java
index 2895b30263..643daa5c95 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ConcurrentRepackTest.java
@@ -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());
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
index ed427d8895..04bed09af3 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackWriterTest.java
@@ -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]);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
index a549d32df9..e113db12ac 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
@@ -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()));
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java
index bee11cd71a..82ad28ed21 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/WindowCacheGetTest.java
@@ -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);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/XInputStream.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/XInputStream.java
index 46f9ee3fff..910999c101 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/XInputStream.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/XInputStream.java
@@ -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) {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
index 122a3973d0..8e389ae252 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevObjectTest.java
@@ -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);
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java
index 70b4e154ad..cef55210f0 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkPathFilter6012Test.java
@@ -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);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java
index 104a69c9f7..611cd0cef2 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/PushProcessTest.java
@@ -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);
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
index 7aae7b0c32..b77042220f 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ReceivePackAdvertiseRefsHookTest.java
@@ -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();
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java
index d4c47d37e3..c239922d71 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportTest.java
@@ -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;
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java
index 57eec0b58e..6195e640fb 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/CanonicalTreeParserTest.java
@@ -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();
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java
index 87fe00b1c6..232422edf6 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/PostOrderTreeWalkTest.java
@@ -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));
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java
index d921aabdc1..71a2f327c8 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathFilterGroupTest.java
@@ -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") {
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java
index 38adda3120..148d5ac820 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/PathSuffixFilterTest.java
@@ -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);
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/TreeFilterTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/TreeFilterTest.java
index c3423b6fb1..8686c4f094 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/TreeFilterTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/treewalk/filter/TreeFilterTest.java
@@ -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));
}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java
index e73dab2ce6..edcce126bb 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/util/TemporaryBufferTest.java
@@ -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];
diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
index dcf27b4a7d..b1fffd82f9 100644
--- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
+++ b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AWTPlotRenderer.java
@@ -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;
diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java
index 3f9217d1c3..943a3256fb 100644
--- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java
+++ b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
index a05d962553..5c06bac1f2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java
index 31987036a5..13ce4e7690 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java
@@ -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();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java
index 088aa15e57..d2f4be84bd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java
@@ -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
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
index 82c7a4b6c7..c32890d8a4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
@@ -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);
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java
index 2eb313f603..106737805c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java
@@ -108,7 +108,7 @@ final class ReverseWalk extends RevWalk {
return children.length;
}
- ReverseCommit getChild(final int nth) {
+ ReverseCommit getChild(int nth) {
return children[nth];
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
index 646f264e09..caaffe349b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
index 09c0351b80..5897ffb758 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
@@ -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) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
index 752c017586..14653fe17f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
@@ -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))
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java
index 19408b0592..fee9f51000 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java
@@ -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();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java
index 575b9a25f4..19c916f810 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
index e9f1fcd923..b605f3ca8e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
@@ -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--)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/CompoundException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/CompoundException.java
index 7192138b15..1df70e3501 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/CompoundException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/CompoundException.java
@@ -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$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/MissingBundlePrerequisiteException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/MissingBundlePrerequisiteException.java
index 9efc21e7c7..b37d20d58f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/MissingBundlePrerequisiteException.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/MissingBundlePrerequisiteException.java
@@ -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)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
index eb98a3acd8..1dc5931ca2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java
index 2068b0d896..45e6ed2947 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
index 8e9ed5d0d8..ca54ee22ea 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java
@@ -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 {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java
index 3a04d70dbb..5f4dee2264 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java
index 07b607c189..c6fdeb0d1f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java
index 343d36922f..8e7904f882 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteWindow.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteWindow.java
index a3146dbb52..60073f39d3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteWindow.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteWindow.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java
index 945e97950d..7f7ecc268d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/DeltaBaseCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/DeltaBaseCache.java
index b464a1b79f..ed73e72232 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/DeltaBaseCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/DeltaBaseCache.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
index 137a757311..342e2c842c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java
@@ -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());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java
index 55eeb95ce5..ed5cbfcf5d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
index 4cab5f8bb8..51c5702fc2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
index e6ae9686a4..e5a54e372c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java
@@ -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
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
index c32ba36010..71f64ae11f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java
index 66d35bd900..4444dd691f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV1.java
@@ -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++;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriter.java
index 61bb902a97..553f7c9a19 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriter.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java
index f220e7a6c6..877f7c8cd7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java
@@ -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());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java
index a18ccaf9ea..9505d35b71 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndex.java
index fb7eddf6b6..dfe23ba79c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackReverseIndex.java
@@ -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)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
index 8e3357fdcb..a27b99157c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java
index 202e51f6c8..ec7ec73be8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java
index fb839dff61..45ce6349a5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java
index adb05e4d99..cf474afbbe 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java
@@ -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
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
index c03fb2f835..8cf1d4e219 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java
index 569bfe895f..010c142887 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java
@@ -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)) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
index f5e600d558..36d6f0aebc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
@@ -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() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java
index 6acc684bc7..d105d0d200 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java
@@ -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.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java
index e7d465b125..978dd3a729 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java
@@ -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];
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
index f59cc6961d..0e01cca99b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java
@@ -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();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java
index 011cecccac..937ba925c5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java
index 89aef7fcf4..891c7f23b4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java
index 3abdc0c41a..93add5c661 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java
@@ -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);
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java
index 90a0350dd7..71ee96363c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java
index 08f0a8a629..4aeacf5082 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java
@@ -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();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java
index 079d6f6d67..95391ec565 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/BinaryHunk.java
@@ -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) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java
index 0f8f7aad02..34075787fb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
index 3f27bb3b2c..d278132c61 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
index 32cf642305..d0a5216e1e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java
@@ -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++;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java
index d022d47833..1458945c31 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java
index 3a77387f23..052f2a7906 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/Patch.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
index c12acb40c2..58e2106fe2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/AbstractPlotRenderer.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java
index fecc48d551..9914b0c991 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
index d952fa67ea..5e153164ad 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockObjQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockObjQueue.java
index 371cd06dda..fcdf79520a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockObjQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockObjQueue.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
index 31612ff66a..79307b5b7c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BoundaryGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BoundaryGenerator.java
index 6be0c8584e..0fd6621e62 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BoundaryGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BoundaryGenerator.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java
index 795bdf1951..b86e876201 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DelayRevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DelayRevQueue.java
index 4a0d19d60d..c397a01317 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DelayRevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DelayRevQueue.java
@@ -69,7 +69,7 @@ final class DelayRevQueue extends Generator {
private int size;
- DelayRevQueue(final Generator g) {
+ DelayRevQueue(Generator g) {
pending = g;
delay = new FIFORevQueue();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java
index ad05186354..eaec305b47 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java
@@ -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
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java
index 1bb8715a33..cdb084c15e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java
@@ -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++)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FixUninterestingGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FixUninterestingGenerator.java
index 9d734a7296..4e6d7e681d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FixUninterestingGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FixUninterestingGenerator.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java
index 567c8465c6..dae3aacb83 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java
index a95303b641..b2c92ea249 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java
@@ -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.
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java
index cbffd91d70..846b8d92fa 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java
@@ -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)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/MergeBaseGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/MergeBaseGenerator.java
index 755df58cf8..2fe95318b2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/MergeBaseGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/MergeBaseGenerator.java
@@ -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)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PendingGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PendingGenerator.java
index 94ae2c993c..e607b7daa0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PendingGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/PendingGenerator.java
@@ -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)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java
index 14222e9d50..b67f934f6e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java
@@ -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());
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java
index 1e79867425..413a552962 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java
index 1c76fe9c17..eef9bf33e0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java
@@ -60,7 +60,7 @@ public abstract class RevObject extends ObjectIdOwnerMap.Entry {
int flags;
- RevObject(final AnyObjectId name) {
+ RevObject(AnyObjectId name) {
super(name);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java
index 42f26d267a..2f21e17455 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java
@@ -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;
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java
index e7fe0f73bc..0050bac0ae 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
index cf278bbbe7..a986cfd8ff 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java
index bb0955ccfd..1c868ffe08 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
index 1ec6290317..eb129a2631 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/StartGenerator.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java
index 7b11d04901..645034351f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java
@@ -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
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
index 4215f21212..dfb83b491a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AndRevFilter.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AuthorRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AuthorRevFilter.java
index 8474e6c43f..334d4f0144 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AuthorRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/AuthorRevFilter.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java
index 002985b118..38805153ef 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitterRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitterRevFilter.java
index 8d73ce43b8..37c840e379 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitterRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitterRevFilter.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MessageRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MessageRevFilter.java
index 5621e64633..480aaa38eb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MessageRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MessageRevFilter.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
index 97697349f5..1cef12f79c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/OrRevFilter.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java
index 4d5690bb14..c67c44b216 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java
index 3df5bdb2c9..a0fc57ca1f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AmazonS3.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
index 1bda914941..38eae1cd48 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
index 6e4b05fe21..0dfcd8716e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
@@ -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());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
index 5624377b7a..69624ff7a3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
@@ -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()));
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java
index d78751f894..c426e3c05d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java
@@ -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$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
index 2002c9199e..449f529447 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
@@ -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));
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java
index 5779b0d75e..f2a261bbe6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleWriter.java
@@ -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());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
index 6563905282..7289ce7b6c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonClient.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonClient.java
index 65b2dc61e7..51c4918f56 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonClient.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonClient.java
@@ -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());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java
index 1b24f404d2..6d2bee8dc3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchHeadRecord.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchHeadRecord.java
index 421ef21073..34ab361c74 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchHeadRecord.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchHeadRecord.java
@@ -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)) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
index 1ef1900571..51f900b246 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchProcess.java
@@ -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) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchResult.java
index 2667ec37ca..ad4c5e9354 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchResult.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
index 56b202eab5..fb03190b02 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
@@ -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$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
index 68757803c0..e3ef832343 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
@@ -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 {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java
index 4cb8393690..f5ccdc8f13 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java
@@ -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());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OperationResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/OperationResult.java
index 0fc24ed9b0..08f7f0d1af 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OperationResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/OperationResult.java
@@ -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();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java
index 8ac7926dc7..49acb4d9d8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java
index f64c8efe84..cc556f8af6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineIn.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java
index b7debe2c3e..470a3c046f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java
@@ -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)) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java
index 5c52f2c3ed..d61aeb04d2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
index 31b75b07f5..35fb0b17a7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -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$
}
});
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java
index 859ef2c976..b4d7803467 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
index 3569761175..0a621f19e1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteConfig.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java
index 2849afe20d..931653fa90 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java
index 365545a092..8a3e4efc93 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java
@@ -55,7 +55,7 @@ class SideBandProgressMonitor extends BatchingProgressMonitor {
private boolean write;
- SideBandProgressMonitor(final OutputStream os) {
+ SideBandProgressMonitor(OutputStream os) {
out = os;
write = true;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java
index eae8aa06d7..cd17913514 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TagOpt.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
index 21c0a92964..4ae1ccb420 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
index 0336f47731..d342ef46df 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
@@ -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) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java
index 9ddfc46667..6118cb8770 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
index cbf77bb0b2..1132503643 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
index 291b536184..d59fe33df6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
@@ -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));
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
index 7fb206003c..c08f400307 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
index 648eaa3cfa..fbb2c44100 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
index aa5ee7a3d5..d8f3a12bfe 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java
index 615e46b982..b4248ee3fc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java
@@ -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);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
index 9b6f458994..9307914444 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
@@ -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 {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java
index 5cc616ed3b..4c754252a3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkRemoteObjectDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkRemoteObjectDatabase.java
index dde7b08154..aa71c9445a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkRemoteObjectDatabase.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkRemoteObjectDatabase.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
index ad409f6d6f..470ed02841 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
@@ -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.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java
index 0639b0dbdd..f5d45c7687 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
index b0509705dd..61b130f93f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
index 8db95da344..d500aae681 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
index 44385eacb2..10e9196411 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
@@ -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()));
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java
index 62a5440aa2..a960bd7a8e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/AndTreeFilter.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java
index 0a3b7d02d4..995561e59e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java
index 07c6bfcfc4..308ff0c962 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/OrTreeFilter.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java
index 66b3c84073..9267fb64f5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java
index 26cf8857bd..5cf5750808 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java
@@ -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);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java
index 25e9aafe14..6b58790b23 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java
@@ -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();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
index 0681a3f68e..3372bbe6a4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -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())
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/LongMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/LongMap.java
index 146966dd4e..8c7f672848 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/LongMap.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/LongMap.java
@@ -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;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
index 057b17785e..3ed7aeb954 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
@@ -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;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/InterruptTimer.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/InterruptTimer.java
index 475b0c110d..b7feddda57 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/InterruptTimer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/InterruptTimer.java
@@ -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();