aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit
diff options
context:
space:
mode:
authorDavid Pursehouse <david.pursehouse@gmail.com>2017-01-16 14:39:32 +0900
committerDavid Pursehouse <david.pursehouse@gmail.com>2017-02-19 20:05:08 -0400
commit7ac182f4e427e0d5a986b8ca67a56fc22828b1a0 (patch)
tree7a63f64443cd919e361d7de747ef31ffa5bd6279 /org.eclipse.jgit/src/org/eclipse/jgit
parent5e8e2179b218ede7d14b69dc5149b0691b5859cf (diff)
downloadjgit-7ac182f4e427e0d5a986b8ca67a56fc22828b1a0.tar.gz
jgit-7ac182f4e427e0d5a986b8ca67a56fc22828b1a0.zip
Enable and fix 'Should be tagged with @Override' warning
Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuilder.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/LagCheck.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/ProposalRound.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/RemoteGitReplica.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java21
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CheckoutEntryImpl.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GC.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java4
-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/PackIndexV2.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogEntryImpl.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogReaderImpl.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataInput.java15
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataOutput.java14
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCursor.java9
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WriteConfig.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndex.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigSnapshot.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/EmptyProgressMonitor.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/FileMode.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/NullProgressMonitor.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdRef.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java11
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java12
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/RefComparator.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/SymbolicRef.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/UserConfig.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/WorkQueue.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeConfig.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/notes/DefaultNoteMerger.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/notes/FanoutBucket.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlagSet.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFilter.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseFetchConnection.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java1
-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.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHookChain.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHook.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHookChain.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHookChain.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHook.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHookChain.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RefFilter.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/SignedPushConfig.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleFile.java2
-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.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java18
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java7
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLoggerChain.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java23
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnectionFactory.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/FileResolver.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/ReceivePackFactory.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/RepositoryResolver.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/UploadPackFactory.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeOptions.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilterGroup.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/BlockList.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/LongList.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RawCharSequence.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java8
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java5
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/InterruptTimer.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeInputStream.java1
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/io/ThrowingPrintWriter.java1
216 files changed, 632 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
index 16ec1463c9..0ef47a4152 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
@@ -134,6 +134,7 @@ public class AddCommand extends GitCommand<DirCache> {
*
* @return the DirCache after Add
*/
+ @Override
public DirCache call() throws GitAPIException, NoFilepatternException {
if (filepatterns.isEmpty())
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java
index 4235e3786c..fa88fb78ee 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java
@@ -81,6 +81,7 @@ public class AddNoteCommand extends GitCommand<Note> {
super(repo);
}
+ @Override
public Note call() throws GitAPIException {
checkCallable();
NoteMap map = NoteMap.newEmptyMap();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
index d74e991395..45311f7f9f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java
@@ -109,6 +109,7 @@ public class ApplyCommand extends GitCommand<ApplyResult> {
* @throws PatchFormatException
* @throws PatchApplyException
*/
+ @Override
public ApplyResult call() throws GitAPIException, PatchFormatException,
PatchApplyException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
index 2a2e07ddda..ce73d0e6b8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
@@ -198,6 +198,7 @@ public class BlameCommand extends GitCommand<BlameResult> {
*
* @return list of lines
*/
+ @Override
public BlameResult call() throws GitAPIException {
checkCallable();
try (BlameGenerator gen = new BlameGenerator(repo, path)) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
index c17ae5c00d..bb94e5494f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
@@ -196,6 +196,7 @@ public class CheckoutCommand extends GitCommand<Ref> {
* if the checkout results in a conflict
* @return the newly created branch
*/
+ @Override
public Ref call() throws GitAPIException, RefAlreadyExistsException,
RefNotFoundException, InvalidRefNameException,
CheckoutConflictException {
@@ -455,6 +456,7 @@ public class CheckoutCommand extends GitCommand<Ref> {
final String filterCommand = treeWalk
.getFilterCommand(Constants.ATTR_FILTER_TYPE_SMUDGE);
editor.add(new PathEdit(path) {
+ @Override
public void apply(DirCacheEntry ent) {
int stage = ent.getStage();
if (stage > DirCacheEntry.STAGE_0) {
@@ -491,6 +493,7 @@ public class CheckoutCommand extends GitCommand<Ref> {
final String filterCommand = treeWalk
.getFilterCommand(Constants.ATTR_FILTER_TYPE_SMUDGE);
editor.add(new PathEdit(treeWalk.getPathString()) {
+ @Override
public void apply(DirCacheEntry ent) {
ent.setObjectId(blobId);
ent.setFileMode(mode);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java
index 276bf96ea2..d3af7a6193 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java
@@ -116,6 +116,7 @@ public class CherryPickCommand extends GitCommand<CherryPickResult> {
* @throws NoMessageException
* @throws NoHeadException
*/
+ @Override
public CherryPickResult call() throws GitAPIException, NoMessageException,
UnmergedPathsException, ConcurrentRefUpdateException,
WrongRepositoryStateException, NoHeadException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java
index 7e331fd844..153513aa08 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java
@@ -94,6 +94,7 @@ public class CleanCommand extends GitCommand<Set<String>> {
* @throws GitAPIException
* @throws NoWorkTreeException
*/
+ @Override
public Set<String> call() throws NoWorkTreeException, GitAPIException {
Set<String> files = new TreeSet<String>();
try {
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 b065b9484b..baa6d7fce9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
@@ -127,6 +127,7 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
* @throws org.eclipse.jgit.api.errors.TransportException
* @throws GitAPIException
*/
+ @Override
public Git call() throws GitAPIException, InvalidRemoteException,
org.eclipse.jgit.api.errors.TransportException {
Repository repository = null;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
index e1793f31af..f3bc91aeda 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
@@ -168,6 +168,7 @@ public class CommitCommand extends GitCommand<RevCommit> {
* if there are either pre-commit or commit-msg hooks present in
* the repository and one of them rejects the commit.
*/
+ @Override
public RevCommit call() throws GitAPIException, NoHeadException,
NoMessageException, UnmergedPathsException,
ConcurrentRefUpdateException, WrongRepositoryStateException,
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
index 69d82bcc67..39420d0ee8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java
@@ -120,6 +120,7 @@ public class CreateBranchCommand extends GitCommand<Ref> {
* invalid
* @return the newly created branch
*/
+ @Override
public Ref call() throws GitAPIException, RefAlreadyExistsException,
RefNotFoundException, InvalidRefNameException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
index ecc1ce5a70..dcfad6a44c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java
@@ -97,6 +97,7 @@ public class DeleteBranchCommand extends GitCommand<List<String>> {
* @throws CannotDeleteCurrentBranchException
* @return the list with the (full) names of the deleted branches
*/
+ @Override
public List<String> call() throws GitAPIException,
NotMergedException, CannotDeleteCurrentBranchException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java
index 3aeec48d9d..0d312dd402 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java
@@ -80,6 +80,7 @@ public class DeleteTagCommand extends GitCommand<List<String>> {
/**
* @return the list with the full names of the deleted tags
*/
+ @Override
public List<String> call() throws GitAPIException {
checkCallable();
List<String> result = new ArrayList<String>();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
index be456662dc..a119fcc848 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DescribeCommand.java
@@ -305,6 +305,7 @@ public class DescribeCommand extends GitCommand<String> {
return null;
Candidate best = Collections.min(candidates, new Comparator<Candidate>() {
+ @Override
public int compare(Candidate o1, Candidate o2) {
return o1.depth - o2.depth;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java
index 3e3a7a89c8..b137fc53c9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DiffCommand.java
@@ -109,6 +109,7 @@ public class DiffCommand extends GitCommand<List<DiffEntry>> {
*
* @return a DiffEntry for each path which is different
*/
+ @Override
public List<DiffEntry> call() throws GitAPIException {
final DiffFormatter diffFmt;
if (out != null && !showNameAndStatusOnly)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
index de512761a4..1f4dcdd3e6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
@@ -112,6 +112,7 @@ public class FetchCommand extends TransportCommand<FetchCommand, FetchResult> {
* @throws org.eclipse.jgit.api.errors.TransportException
* when an error occurs during transport
*/
+ @Override
public FetchResult call() throws GitAPIException, InvalidRemoteException,
org.eclipse.jgit.api.errors.TransportException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
index 2cd5f59a71..96995693a3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
@@ -147,6 +147,7 @@ public class Git implements AutoCloseable {
*
* @since 3.2
*/
+ @Override
public void close() {
if (closeRepo)
repo.close();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java
index e9751f94a1..2a23408b53 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/GitCommand.java
@@ -126,5 +126,6 @@ public abstract class GitCommand<T> implements Callable<T> {
* @throws GitAPIException
* or subclass thereof when an error occurs
*/
+ @Override
public abstract T call() throws GitAPIException;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java
index 37a788e85c..649484cf62 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/InitCommand.java
@@ -73,6 +73,7 @@ public class InitCommand implements Callable<Git> {
*
* @return the newly created {@code Git} object with associated repository
*/
+ @Override
public Git call() throws GitAPIException {
try {
RepositoryBuilder builder = new RepositoryBuilder();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java
index efcfd16823..438ec89ff0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java
@@ -101,6 +101,7 @@ public class ListBranchCommand extends GitCommand<List<Ref>> {
super(repo);
}
+ @Override
public List<Ref> call() throws GitAPIException {
checkCallable();
List<Ref> resultRefs;
@@ -126,6 +127,7 @@ public class ListBranchCommand extends GitCommand<List<Ref>> {
}
Collections.sort(resultRefs, new Comparator<Ref>() {
+ @Override
public int compare(Ref o1, Ref o2) {
return o1.getName().compareTo(o2.getName());
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java
index ff963ede89..cdb32ca2f2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java
@@ -77,6 +77,7 @@ public class ListNotesCommand extends GitCommand<List<Note>> {
/**
* @return the requested notes
*/
+ @Override
public List<Note> call() throws GitAPIException {
checkCallable();
List<Note> notes = new ArrayList<Note>();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java
index a3b701be8e..6d46cdf9a8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java
@@ -74,6 +74,7 @@ public class ListTagCommand extends GitCommand<List<Ref>> {
/**
* @return the tags available
*/
+ @Override
public List<Ref> call() throws GitAPIException {
checkCallable();
Map<String, Ref> refList;
@@ -87,6 +88,7 @@ public class ListTagCommand extends GitCommand<List<Ref>> {
throw new JGitInternalException(e.getMessage(), e);
}
Collections.sort(tags, new Comparator<Ref>() {
+ @Override
public int compare(Ref o1, Ref o2) {
return o1.getName().compareTo(o2.getName());
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
index bb1a738149..47b2599812 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
@@ -132,6 +132,7 @@ public class LogCommand extends GitCommand<Iterable<RevCommit>> {
* @throws NoHeadException
* of the references ref cannot be resolved
*/
+ @Override
public Iterable<RevCommit> call() throws GitAPIException, NoHeadException {
checkCallable();
if (pathFilters.size() > 0)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java
index f3527fd805..9ad71250e8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java
@@ -153,6 +153,7 @@ public class LsRemoteCommand extends
* @throws org.eclipse.jgit.api.errors.TransportException
* for errors that occurs during transport
*/
+ @Override
public Collection<Ref> call() throws GitAPIException,
InvalidRemoteException,
org.eclipse.jgit.api.errors.TransportException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
index 2daa0d1a3b..de7b604cf2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
@@ -134,10 +134,12 @@ public class MergeCommand extends GitCommand<MergeResult> {
*/
FF_ONLY;
+ @Override
public String toConfigValue() {
return "--" + name().toLowerCase(Locale.ROOT).replace('_', '-'); //$NON-NLS-1$
}
+ @Override
public boolean matchConfigValue(String in) {
if (StringUtils.isEmptyOrNull(in))
return false;
@@ -221,6 +223,7 @@ public class MergeCommand extends GitCommand<MergeResult> {
*
* @return the result of the merge
*/
+ @Override
@SuppressWarnings("boxing")
public MergeResult call() throws GitAPIException, NoHeadException,
ConcurrentRefUpdateException, CheckoutConflictException,
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
index 6141e0c536..aa8075d163 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java
@@ -185,6 +185,7 @@ public class MergeResult {
* @since 3.0
**/
MERGED_NOT_COMMITTED {
+ @Override
public String toString() {
return "Merged-not-committed"; //$NON-NLS-1$
}
@@ -212,6 +213,7 @@ public class MergeResult {
* files (i.e. local modifications prevent checkout of files).
*/
CHECKOUT_CONFLICT {
+ @Override
public String toString() {
return "Checkout Conflict"; //$NON-NLS-1$
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
index 9bc35adc09..49d1a824eb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullCommand.java
@@ -197,6 +197,7 @@ public class PullCommand extends TransportCommand<PullCommand, PullResult> {
* @throws org.eclipse.jgit.api.errors.TransportException
* @throws GitAPIException
*/
+ @Override
public PullResult call() throws GitAPIException,
WrongRepositoryStateException, InvalidConfigurationException,
DetachedHeadException, InvalidRemoteException, CanceledException,
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
index be15ab13bd..01b57bde81 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
@@ -126,6 +126,7 @@ public class PushCommand extends
* when an error occurs with the transport
* @throws GitAPIException
*/
+ @Override
public Iterable<PushResult> call() throws GitAPIException,
InvalidRemoteException,
org.eclipse.jgit.api.errors.TransportException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index d10cc3d715..617c37d610 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -258,6 +258,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
* @throws NoHeadException
* @throws RefNotFoundException
*/
+ @Override
public RebaseResult call() throws GitAPIException, NoHeadException,
RefNotFoundException, WrongRepositoryStateException {
newHead = null;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java
index 4536af1be0..04caa0f159 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ReflogCommand.java
@@ -92,6 +92,7 @@ public class ReflogCommand extends GitCommand<Collection<ReflogEntry>> {
* @throws GitAPIException
* @throws InvalidRefNameException
*/
+ @Override
public Collection<ReflogEntry> call() throws GitAPIException,
InvalidRefNameException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java
index 1c4880c1e1..fd8aac75bd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java
@@ -79,6 +79,7 @@ public class RemoveNoteCommand extends GitCommand<Note> {
super(repo);
}
+ @Override
public Note call() throws GitAPIException {
checkCallable();
try (RevWalk walk = new RevWalk(repo);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java
index 044a48611b..ce3a29f36c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java
@@ -96,6 +96,7 @@ public class RenameBranchCommand extends GitCommand<Ref> {
* if rename is tried without specifying the old name and HEAD
* is detached
*/
+ @Override
public Ref call() throws GitAPIException, RefNotFoundException, InvalidRefNameException,
RefAlreadyExistsException, DetachedHeadException {
checkCallable();
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 106988d4d4..412219cead 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java
@@ -141,6 +141,7 @@ public class ResetCommand extends GitCommand<Ref> {
* @return the Ref after reset
* @throws GitAPIException
*/
+ @Override
public Ref call() throws GitAPIException, CheckoutConflictException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java
index 9d79ed0299..20683d5c0f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RevertCommand.java
@@ -120,6 +120,7 @@ public class RevertCommand extends GitCommand<RevCommit> {
* @throws UnmergedPathsException
* @throws NoMessageException
*/
+ @Override
public RevCommit call() throws NoMessageException, UnmergedPathsException,
ConcurrentRefUpdateException, WrongRepositoryStateException,
GitAPIException {
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 fd2cbe0129..069a9cfacc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java
@@ -136,6 +136,7 @@ public class RmCommand extends GitCommand<DirCache> {
*
* @return the DirCache after Rm
*/
+ @Override
public DirCache call() throws GitAPIException,
NoFilepatternException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java
index 168ea51e77..dbff4636e7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java
@@ -74,6 +74,7 @@ public class ShowNoteCommand extends GitCommand<Note> {
super(repo);
}
+ @Override
public Note call() throws GitAPIException {
checkCallable();
NoteMap map = NoteMap.newEmptyMap();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
index fc8bb874fb..10ec2a6a5a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
@@ -157,6 +157,7 @@ public class StashApplyCommand extends GitCommand<ObjectId> {
* @throws NoHeadException
* @throws StashApplyFailureException
*/
+ @Override
public ObjectId call() throws GitAPIException,
WrongRepositoryStateException, NoHeadException,
StashApplyFailureException {
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 ee9b7fcf72..2cbfead8c8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashCreateCommand.java
@@ -236,6 +236,7 @@ public class StashCreateCommand extends GitCommand<RevCommit> {
* @return stashed commit or null if no changes to stash
* @throws GitAPIException
*/
+ @Override
public RevCommit call() throws GitAPIException {
checkCallable();
@@ -305,6 +306,7 @@ public class StashCreateCommand extends GitCommand<RevCommit> {
untracked.add(entry);
else
wtEdits.add(new PathEdit(entry) {
+ @Override
public void apply(DirCacheEntry ent) {
ent.copyMetaData(entry);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java
index 6e1d0f2703..e215bdf7d3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashDropCommand.java
@@ -171,6 +171,7 @@ public class StashDropCommand extends GitCommand<ObjectId> {
* @return commit id of stash reference or null if no more stashed changes
* @throws GitAPIException
*/
+ @Override
public ObjectId call() throws GitAPIException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java
index aedc9a6e12..a2946f9c1f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java
@@ -76,6 +76,7 @@ public class StashListCommand extends GitCommand<Collection<RevCommit>> {
super(repo);
}
+ @Override
public Collection<RevCommit> call() throws GitAPIException,
InvalidRefNameException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java
index 9752195b95..1d5f54213e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java
@@ -134,6 +134,7 @@ public class StatusCommand extends GitCommand<Status> {
* @return a {@link Status} object telling about each path where working
* tree, index or HEAD differ from each other.
*/
+ @Override
public Status call() throws GitAPIException, NoWorkTreeException {
if (workingTreeIt == null)
workingTreeIt = new FileTreeIterator(repo);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
index b0f772e0aa..0519d454ea 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
@@ -149,6 +149,7 @@ public class SubmoduleAddCommand extends
* @return the newly created {@link Repository}
* @throws GitAPIException
*/
+ @Override
public Repository call() throws GitAPIException {
checkCallable();
if (path == null || path.length() == 0)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java
index 1dbe3681bf..8f91b67925 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java
@@ -91,6 +91,7 @@ public class SubmoduleInitCommand extends GitCommand<Collection<String>> {
return this;
}
+ @Override
public Collection<String> call() throws GitAPIException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
index a1ea790d0d..29d4b73756 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
@@ -91,6 +91,7 @@ public class SubmoduleStatusCommand extends
return this;
}
+ @Override
public Map<String, SubmoduleStatus> call() throws GitAPIException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java
index 088eedc2dc..8dc9ff9ab3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java
@@ -108,6 +108,7 @@ public class SubmoduleSyncCommand extends GitCommand<Map<String, String>> {
return null;
}
+ @Override
public Map<String, String> call() throws GitAPIException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java
index 342d7f42f3..bd2fb8668e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java
@@ -137,6 +137,7 @@ public class SubmoduleUpdateCommand extends
* @throws WrongRepositoryStateException
* @throws GitAPIException
*/
+ @Override
public Collection<String> call() throws InvalidConfigurationException,
NoHeadException, ConcurrentRefUpdateException,
CheckoutConflictException, InvalidMergeHeadsException,
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java
index 39dd42cc51..bdbb8620d6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java
@@ -121,6 +121,7 @@ public class TagCommand extends GitCommand<Ref> {
* when called on a git repo without a HEAD reference
* @since 2.0
*/
+ @Override
public Ref call() throws GitAPIException, ConcurrentRefUpdateException,
InvalidTagNameException, NoHeadException {
checkCallable();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
index b1cbb914d8..324b99eb58 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffConfig.java
@@ -55,6 +55,7 @@ import org.eclipse.jgit.util.StringUtils;
public class DiffConfig {
/** Key for {@link Config#get(SectionParser)}. */
public static final Config.SectionParser<DiffConfig> KEY = new SectionParser<DiffConfig>() {
+ @Override
public DiffConfig parse(final Config cfg) {
return new DiffConfig(cfg);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java
index 2f5c9ea84c..80ac1b662e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java
@@ -130,6 +130,7 @@ public class HistogramDiff extends LowLevelDiffAlgorithm {
maxChainLength = maxLen;
}
+ @Override
public <S extends Sequence> void diffNonCommon(EditList edits,
HashedSequenceComparator<S> cmp, HashedSequence<S> a,
HashedSequence<S> b, Edit region) {
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 9810a6ab2f..e1bda116bf 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/MyersDiff.java
@@ -460,6 +460,7 @@ if (k < beginK || k > endK)
}
class ForwardEditPaths extends EditPaths {
+ @Override
final int snake(int k, int x) {
for (; x < endA && k + x < endB; x++)
if (!cmp.equals(a, x, b, k + x))
@@ -467,18 +468,22 @@ if (k < beginK || k > endK)
return x;
}
+ @Override
final int getLeft(final int x) {
return x;
}
+ @Override
final int getRight(final int x) {
return x + 1;
}
+ @Override
final boolean isBetter(final int left, final int right) {
return left > right;
}
+ @Override
final void adjustMinMaxK(final int k, final int x) {
if (x >= endA || k + x >= endB) {
if (k > backward.middleK)
@@ -488,6 +493,7 @@ if (k < beginK || k > endK)
}
}
+ @Override
final boolean meets(int d, int k, int x, long snake) {
if (k < backward.beginK || k > backward.endK)
return false;
@@ -502,6 +508,7 @@ if (k < beginK || k > endK)
}
class BackwardEditPaths extends EditPaths {
+ @Override
final int snake(int k, int x) {
for (; x > beginA && k + x > beginB; x--)
if (!cmp.equals(a, x - 1, b, k + x - 1))
@@ -509,18 +516,22 @@ if (k < beginK || k > endK)
return x;
}
+ @Override
final int getLeft(final int x) {
return x - 1;
}
+ @Override
final int getRight(final int x) {
return x;
}
+ @Override
final boolean isBetter(final int left, final int right) {
return left < right;
}
+ @Override
final void adjustMinMaxK(final int k, final int x) {
if (x <= beginA || k + x <= beginB) {
if (k > forward.middleK)
@@ -530,6 +541,7 @@ if (k < beginK || k > endK)
}
}
+ @Override
final boolean meets(int d, int k, int x, long snake) {
if (k < forward.beginK || k > forward.endK)
return false;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
index b26e1bc429..5bfee753a6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
@@ -107,6 +107,7 @@ public class RawText extends Sequence {
}
/** @return total number of items in the sequence. */
+ @Override
public int size() {
// The line map is always 2 entries larger than the number of lines in
// the file. Index 0 is padded out/unused. The last index is the total
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
index 8865b62c24..0e83990025 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
@@ -70,6 +70,7 @@ public class RenameDetector {
private static final int EXACT_RENAME_SCORE = 100;
private static final Comparator<DiffEntry> DIFF_COMPARATOR = new Comparator<DiffEntry>() {
+ @Override
public int compare(DiffEntry a, DiffEntry b) {
int cmp = nameOf(a).compareTo(nameOf(b));
if (cmp == 0)
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 b0cf8be076..17ddd35e64 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java
@@ -111,6 +111,7 @@ public class DirCache {
private static final byte[] NO_CHECKSUM = {};
static final Comparator<DirCacheEntry> ENT_CMP = new Comparator<DirCacheEntry>() {
+ @Override
public int compare(final DirCacheEntry o1, final DirCacheEntry o2) {
final int cr = cmp(o1, o2);
if (cr != 0)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuilder.java
index cfebe2d073..676a6ab9c4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuilder.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuilder.java
@@ -218,6 +218,7 @@ public class DirCacheBuilder extends BaseDirCacheEditor {
return e;
}
+ @Override
public void finish() {
if (!sorted)
resort();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
index c987c964c4..0cc2b7653f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java
@@ -74,6 +74,7 @@ import org.eclipse.jgit.util.Paths;
*/
public class DirCacheEditor extends BaseDirCacheEditor {
private static final Comparator<PathEdit> EDIT_CMP = new Comparator<PathEdit>() {
+ @Override
public int compare(final PathEdit o1, final PathEdit o2) {
final byte[] a = o1.path;
final byte[] b = o2.path;
@@ -123,6 +124,7 @@ public class DirCacheEditor extends BaseDirCacheEditor {
return super.commit();
}
+ @Override
public void finish() {
if (!edits.isEmpty()) {
applyEdits();
@@ -383,6 +385,7 @@ public class DirCacheEditor extends BaseDirCacheEditor {
super(ent);
}
+ @Override
public void apply(final DirCacheEntry ent) {
throw new UnsupportedOperationException(JGitText.get().noApplyInDelete);
}
@@ -432,6 +435,7 @@ public class DirCacheEditor extends BaseDirCacheEditor {
return path;
}
+ @Override
public void apply(final DirCacheEntry ent) {
throw new UnsupportedOperationException(JGitText.get().noApplyInDelete);
}
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 8bcf4bf3e0..a06f9d3f4f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java
@@ -80,6 +80,7 @@ public class DirCacheTree {
private static final DirCacheTree[] NO_CHILDREN = {};
private static final Comparator<DirCacheTree> TREE_CMP = new Comparator<DirCacheTree>() {
+ @Override
public int compare(final DirCacheTree o1, final DirCacheTree o2) {
final byte[] a = o1.encodedName;
final byte[] b = o2.encodedName;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java
index 0aa0075ee4..10c84c4ecc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java
@@ -70,6 +70,7 @@ abstract class AbstractHead implements Head {
this.newHeads = newHeads;
}
+ @Override
public List<Head> getNextHeads(char c) {
if (matches(c))
return newHeads;
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 8af52288fc..a7bd2eafba 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java
@@ -159,6 +159,7 @@ final class GroupHead extends AbstractHead {
this.end = end;
}
+ @Override
public final boolean matches(char c) {
return start <= c && c <= end;
}
@@ -167,6 +168,7 @@ final class GroupHead extends AbstractHead {
private static final class DigitPattern implements CharacterPattern {
static final GroupHead.DigitPattern INSTANCE = new DigitPattern();
+ @Override
public final boolean matches(char c) {
return Character.isDigit(c);
}
@@ -175,6 +177,7 @@ final class GroupHead extends AbstractHead {
private static final class LetterPattern implements CharacterPattern {
static final GroupHead.LetterPattern INSTANCE = new LetterPattern();
+ @Override
public final boolean matches(char c) {
return Character.isLetter(c);
}
@@ -183,6 +186,7 @@ final class GroupHead extends AbstractHead {
private static final class LowerPattern implements CharacterPattern {
static final GroupHead.LowerPattern INSTANCE = new LowerPattern();
+ @Override
public final boolean matches(char c) {
return Character.isLowerCase(c);
}
@@ -191,6 +195,7 @@ final class GroupHead extends AbstractHead {
private static final class UpperPattern implements CharacterPattern {
static final GroupHead.UpperPattern INSTANCE = new UpperPattern();
+ @Override
public final boolean matches(char c) {
return Character.isUpperCase(c);
}
@@ -199,6 +204,7 @@ final class GroupHead extends AbstractHead {
private static final class WhitespacePattern implements CharacterPattern {
static final GroupHead.WhitespacePattern INSTANCE = new WhitespacePattern();
+ @Override
public final boolean matches(char c) {
return Character.isWhitespace(c);
}
@@ -211,6 +217,7 @@ final class GroupHead extends AbstractHead {
this.expectedCharacter = c;
}
+ @Override
public final boolean matches(char c) {
return this.expectedCharacter == c;
}
@@ -221,6 +228,7 @@ final class GroupHead extends AbstractHead {
private static String punctCharacters = "-!\"#$%&'()*+,./:;<=>?@[\\]_`{|}~"; //$NON-NLS-1$
+ @Override
public boolean matches(char c) {
return punctCharacters.indexOf(c) != -1;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java
index 78a61b9c51..f9ddd9e65e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java
@@ -56,6 +56,7 @@ final class LastHead implements Head {
// defined because of javadoc and visibility modifier.
}
+ @Override
public List<Head> getNextHeads(char c) {
return FileNameMatcher.EMPTY_HEAD_LIST;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
index d18cd97489..c3c7714c14 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
@@ -168,6 +168,7 @@ public class RepoCommand extends GitCommand<RevCommit> {
/** A default implementation of {@link RemoteReader} callback. */
public static class DefaultRemoteReader implements RemoteReader {
+ @Override
public ObjectId sha1(String uri, String ref) throws GitAPIException {
Map<String, Ref> map = Git
.lsRemoteRepository()
@@ -177,6 +178,7 @@ public class RepoCommand extends GitCommand<RevCommit> {
return r != null ? r.getObjectId() : null;
}
+ @Override
public byte[] readFile(String uri, String ref, String path)
throws GitAPIException, IOException {
File dir = FileUtils.createTempDir("jgit_", ".git", null); //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
index ad2eeb0205..c1aca6a136 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/GitHook.java
@@ -95,6 +95,7 @@ abstract class GitHook<T> implements Callable<T> {
* If the hook has been run and a returned an exit code
* different from zero.
*/
+ @Override
public abstract T call() throws IOException, AbortedByHookException;
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java
index 4c13e2ff6a..61f7b83400 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/IMatcher.java
@@ -51,10 +51,12 @@ public interface IMatcher {
* Matcher that does not match any pattern.
*/
public static final IMatcher NO_MATCH = new IMatcher() {
+ @Override
public boolean matches(String path, boolean assumeDirectory) {
return false;
}
+ @Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
return false;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java
index 3ebc6afb2c..cc0fe937b4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/LeadingAsteriskMatcher.java
@@ -55,6 +55,7 @@ public class LeadingAsteriskMatcher extends NameMatcher {
"Pattern must have leading asterisk: " + pattern); //$NON-NLS-1$
}
+ @Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
// faster local access, same as in string.indexOf()
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java
index 888b989b62..00651237db 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/NameMatcher.java
@@ -70,6 +70,7 @@ public class NameMatcher extends AbstractMatcher {
this.subPattern = pattern.substring(1);
}
+ @Override
public boolean matches(String path, boolean assumeDirectory) {
int end = 0;
int firstChar = 0;
@@ -86,6 +87,7 @@ public class NameMatcher extends AbstractMatcher {
return false;
}
+ @Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
// faster local access, same as in string.indexOf()
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java
index adf13292bf..9bb93cd888 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/PathMatcher.java
@@ -170,6 +170,7 @@ public class PathMatcher extends AbstractMatcher {
}
}
+ @Override
public boolean matches(String path, boolean assumeDirectory) {
if (matchers == null)
return simpleMatch(path, assumeDirectory);
@@ -209,6 +210,7 @@ public class PathMatcher extends AbstractMatcher {
return false;
}
+ @Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
throw new UnsupportedOperationException(
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java
index c7064ac851..2e148f4a6f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/TrailingAsteriskMatcher.java
@@ -55,6 +55,7 @@ public class TrailingAsteriskMatcher extends NameMatcher {
"Pattern must have trailing asterisk: " + pattern); //$NON-NLS-1$
}
+ @Override
public boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
// faster local access, same as in string.indexOf()
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java
index 2f24e02410..93ea13c726 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildMatcher.java
@@ -61,10 +61,12 @@ public final class WildMatcher extends AbstractMatcher {
super(WILDMATCH, false);
}
+ @Override
public final boolean matches(String path, boolean assumeDirectory) {
return true;
}
+ @Override
public final boolean matches(String segment, int startIncl, int endExcl,
boolean assumeDirectory) {
return true;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/LagCheck.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/LagCheck.java
index 35327ea0b3..757c19ac94 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/LagCheck.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/LagCheck.java
@@ -86,6 +86,7 @@ class LagCheck implements AutoCloseable {
rw.setRetainBody(false);
}
+ @Override
public void close() {
if (rw != null) {
rw.close();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/ProposalRound.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/ProposalRound.java
index ddd7059fc2..1eaa33d2f2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/ProposalRound.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/ProposalRound.java
@@ -122,6 +122,7 @@ class ProposalRound extends Round {
return a == null && b == null;
}
+ @Override
void start() throws IOException {
for (Proposal p : todo) {
p.notifyState(RUNNING);
@@ -268,6 +269,7 @@ class ProposalRound extends Round {
}
}
+ @Override
void success() {
for (Proposal p : todo) {
p.success();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/RemoteGitReplica.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/RemoteGitReplica.java
index 396fbdd722..a0ac60809c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/RemoteGitReplica.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/ketch/RemoteGitReplica.java
@@ -240,6 +240,7 @@ public class RemoteGitReplica extends KetchReplica {
ReceiveCommand.abort(tmp);
}
+ @Override
protected void blockingFetch(Repository repo, ReplicaFetchRequest req)
throws NotSupportedException, TransportException {
try (Transport transport = Transport.open(repo, uri)) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java
index ba3b39360b..cc467853bc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackCompactor.java
@@ -293,6 +293,7 @@ public class DfsPackCompactor {
// older packs, allowing the PackWriter to be handed newer objects
// first and older objects last.
Collections.sort(srcPacks, new Comparator<DfsPackFile>() {
+ @Override
public int compare(DfsPackFile a, DfsPackFile b) {
return a.getPackDescription().compareTo(b.getPackDescription());
}
@@ -358,6 +359,7 @@ public class DfsPackCompactor {
want.add(new ObjectIdWithOffset(id, ent.getOffset()));
}
Collections.sort(want, new Comparator<ObjectIdWithOffset>() {
+ @Override
public int compare(ObjectIdWithOffset a, ObjectIdWithOffset b) {
return Long.signum(a.offset - b.offset);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java
index 683094c32b..358a921382 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackDescription.java
@@ -309,6 +309,7 @@ public class DfsPackDescription implements Comparable<DfsPackDescription> {
* @param b
* the other pack.
*/
+ @Override
public int compareTo(DfsPackDescription b) {
// Cluster by PackSource, pushing UNREACHABLE_GARBAGE to the end.
PackSource as = getPackSource();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
index 3baf118d4c..5b55880583 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReader.java
@@ -149,6 +149,7 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
return null;
}
+ @Override
public Collection<CachedPack> getCachedPacksAndUpdate(
BitmapBuilder needBitmap) throws IOException {
for (DfsPackFile pack : db.getPacks()) {
@@ -274,6 +275,7 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
}
private static final Comparator<FoundObject<?>> FOUND_OBJECT_SORT = new Comparator<FoundObject<?>>() {
+ @Override
public int compare(FoundObject<?> a, FoundObject<?> b) {
int cmp = a.packIndex - b.packIndex;
if (cmp == 0)
@@ -392,6 +394,7 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
return new AsyncObjectLoaderQueue<T>() {
private FoundObject<T> cur;
+ @Override
public boolean next() throws MissingObjectException, IOException {
if (idItr.hasNext()) {
cur = idItr.next();
@@ -403,14 +406,17 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
}
}
+ @Override
public T getCurrent() {
return cur.id;
}
+ @Override
public ObjectId getObjectId() {
return cur.id;
}
+ @Override
public ObjectLoader open() throws IOException {
if (cur.pack == null)
throw new MissingObjectException(cur.id,
@@ -418,10 +424,12 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
return cur.pack.load(DfsReader.this, cur.offset);
}
+ @Override
public boolean cancel(boolean mayInterruptIfRunning) {
return true;
}
+ @Override
public void release() {
// Nothing to clean up.
}
@@ -447,6 +455,7 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
private long sz;
+ @Override
public boolean next() throws MissingObjectException, IOException {
if (idItr.hasNext()) {
cur = idItr.next();
@@ -462,22 +471,27 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
}
}
+ @Override
public T getCurrent() {
return cur.id;
}
+ @Override
public ObjectId getObjectId() {
return cur.id;
}
+ @Override
public long getSize() {
return sz;
}
+ @Override
public boolean cancel(boolean mayInterruptIfRunning) {
return true;
}
+ @Override
public void release() {
// Nothing to clean up.
}
@@ -529,16 +543,19 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
return -1;
}
+ @Override
public DfsObjectToPack newObjectToPack(AnyObjectId objectId, int type) {
return new DfsObjectToPack(objectId, type);
}
private static final Comparator<DfsObjectToPack> OFFSET_SORT = new Comparator<DfsObjectToPack>() {
+ @Override
public int compare(DfsObjectToPack a, DfsObjectToPack b) {
return Long.signum(a.getOffset() - b.getOffset());
}
};
+ @Override
public void selectObjectRepresentation(PackWriter packer,
ProgressMonitor monitor, Iterable<ObjectToPack> objects)
throws IOException, MissingObjectException {
@@ -564,6 +581,7 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
}
private static final Comparator<DfsPackFile> PACK_SORT_FOR_REUSE = new Comparator<DfsPackFile>() {
+ @Override
public int compare(DfsPackFile af, DfsPackFile bf) {
DfsPackDescription ad = af.getPackDescription();
DfsPackDescription bd = bf.getPackDescription();
@@ -606,6 +624,7 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
return tmp;
}
+ @Override
public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp,
boolean validate) throws IOException,
StoredObjectRepresentationNotAvailableException {
@@ -613,12 +632,14 @@ public final class DfsReader extends ObjectReader implements ObjectReuseAsIs {
src.pack.copyAsIs(out, src, validate, this);
}
+ @Override
public void writeObjects(PackOutputStream out, List<ObjectToPack> list)
throws IOException {
for (ObjectToPack otp : list)
out.writeObject(otp);
}
+ @Override
public void copyPackAsIs(PackOutputStream out, CachedPack pack)
throws IOException {
((DfsCachedPack) pack).copyAsIs(out, this);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java
index ef8845084b..a5dd514709 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepository.java
@@ -143,10 +143,12 @@ public abstract class DfsRepository extends Repository {
AttributesNodeProvider {
private EmptyAttributesNode emptyAttributesNode = new EmptyAttributesNode();
+ @Override
public AttributesNode getInfoAttributesNode() throws IOException {
return emptyAttributesNode;
}
+ @Override
public AttributesNode getGlobalAttributesNode() throws IOException {
return emptyAttributesNode;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
index bdcf9f9a14..a31a47e115 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java
@@ -225,6 +225,7 @@ public class InMemoryRepository extends DfsRepository {
data = buf;
}
+ @Override
public int read(ByteBuffer dst) {
int n = Math.min(dst.remaining(), data.length - position);
if (n == 0)
@@ -234,30 +235,37 @@ public class InMemoryRepository extends DfsRepository {
return n;
}
+ @Override
public void close() {
open = false;
}
+ @Override
public boolean isOpen() {
return open;
}
+ @Override
public long position() {
return position;
}
+ @Override
public void position(long newPosition) {
position = (int) newPosition;
}
+ @Override
public long size() {
return data.length;
}
+ @Override
public int blockSize() {
return 0;
}
+ @Override
public void setReadAheadBytes(int b) {
// Unnecessary on a byte array.
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
index 30e973ecf4..b78ff2abf9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java
@@ -58,6 +58,7 @@ abstract class BasePackBitmapIndex extends PackBitmapIndex {
this.bitmaps = bitmaps;
}
+ @Override
public EWAHCompressedBitmap getBitmap(AnyObjectId objectId) {
StoredBitmap sb = bitmaps.get(objectId);
return sb != null ? sb.getBitmap() : null;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
index b18a06f9c9..7855a460cd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BitmapIndexImpl.java
@@ -370,6 +370,7 @@ public class BitmapIndexImpl implements BitmapIndex {
private int type;
private IntIterator cached = dynamic;
+ @Override
public boolean hasNext() {
if (!cached.hasNext()) {
if (commits.hasNext()) {
@@ -391,6 +392,7 @@ public class BitmapIndexImpl implements BitmapIndex {
return true;
}
+ @Override
public BitmapObject next() {
if (!hasNext())
throw new NoSuchElementException();
@@ -408,6 +410,7 @@ public class BitmapIndexImpl implements BitmapIndex {
return out;
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CheckoutEntryImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CheckoutEntryImpl.java
index e968119ad9..4b4337d1ed 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CheckoutEntryImpl.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CheckoutEntryImpl.java
@@ -65,10 +65,12 @@ public class CheckoutEntryImpl implements CheckoutEntry {
to = comment.substring(p2 + " to ".length(), p3); //$NON-NLS-1$
}
+ @Override
public String getFromBranch() {
return from;
}
+ @Override
public String getToBranch() {
return to;
}
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 cf3f4db28b..353024c9da 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
@@ -967,6 +967,7 @@ public class GC {
File tmpPack = null;
Map<PackExt, File> tmpExts = new TreeMap<PackExt, File>(
new Comparator<PackExt>() {
+ @Override
public int compare(PackExt o1, PackExt o2) {
// INDEX entries must be returned last, so the pack
// scanner does pick up the new pack until all the
@@ -1165,6 +1166,7 @@ public class GC {
*/
public long numberOfBitmaps;
+ @Override
public String toString() {
final StringBuilder b = new StringBuilder();
b.append("numberOfPackedObjects=").append(numberOfPackedObjects); //$NON-NLS-1$
@@ -1398,6 +1400,7 @@ public class GC {
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir,
new DirectoryStream.Filter<Path>() {
+ @Override
public boolean accept(Path file) throws IOException {
Path fileName = file.getFileName();
return Files.isRegularFile(file) && fileName != null
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java
index fcc8d7178c..d2fcacf3ea 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LockFile.java
@@ -110,6 +110,7 @@ public class LockFile {
/** Filter to skip over active lock files when listing a directory. */
static final FilenameFilter FILTER = new FilenameFilter() {
+ @Override
public boolean accept(File dir, String name) {
return !name.endsWith(SUFFIX);
}
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 b73152222b..2f4d2d633c 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
@@ -188,6 +188,7 @@ public class ObjectDirectory extends FileObjectDatabase {
/**
* @return the location of the <code>objects</code> directory.
*/
+ @Override
public final File getDirectory() {
return objects;
}
@@ -260,6 +261,7 @@ public class ObjectDirectory extends FileObjectDatabase {
* index file could not be opened, read, or is not recognized as
* a Git pack file index.
*/
+ @Override
public PackFile openPack(final File pack)
throws IOException {
final String p = pack.getName();
@@ -444,6 +446,7 @@ public class ObjectDirectory extends FileObjectDatabase {
return null;
}
+ @Override
ObjectLoader openLooseObject(WindowCursor curs, AnyObjectId id)
throws IOException {
File path = fileFor(id);
@@ -459,6 +462,7 @@ public class ObjectDirectory extends FileObjectDatabase {
}
}
+ @Override
long getObjectSize(WindowCursor curs, AnyObjectId id)
throws IOException {
if (unpackedObjectCache.isUnpacked(id)) {
@@ -679,6 +683,7 @@ public class ObjectDirectory extends FileObjectDatabase {
&& old != scanPacks(old);
}
+ @Override
Config getConfig() {
return config;
}
@@ -949,6 +954,7 @@ public class ObjectDirectory extends FileObjectDatabase {
* identity of the loose object to map to the directory.
* @return location of the object, if it were to exist as a loose object.
*/
+ @Override
public File fileFor(AnyObjectId objectId) {
String n = objectId.name();
String d = n.substring(0, 2);
@@ -989,6 +995,7 @@ public class ObjectDirectory extends FileObjectDatabase {
repository = r;
}
+ @Override
void close() {
repository.close();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
index 956e8de0a7..d80abaa9c3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexBuilder.java
@@ -133,6 +133,7 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
positionEntries.add(new PositionEntry(entries.get(i), i));
}
Collections.sort(entries, new Comparator<ObjectToPack>() {
+ @Override
public int compare(ObjectToPack a, ObjectToPack b) {
return Long.signum(a.getOffset() - b.getOffset());
}
@@ -274,14 +275,17 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
// Add order is from oldest to newest. The reverse add order is the
// output order.
return new Iterable<StoredEntry>() {
+ @Override
public Iterator<StoredEntry> iterator() {
return new Iterator<StoredEntry>() {
private int index = byAddOrder.size() - 1;
+ @Override
public boolean hasNext() {
return index >= 0;
}
+ @Override
public StoredEntry next() {
if (!hasNext())
throw new NoSuchElementException();
@@ -315,6 +319,7 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex {
bestXorOffset, item.getFlags());
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
index 2c462a78b7..6b5b8826ea 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexRemapper.java
@@ -137,6 +137,7 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
return newPackIndex.ofObjectType(bitmap, type);
}
+ @Override
public Iterator<Entry> iterator() {
if (oldPackIndex == null)
return Collections.<Entry> emptyList().iterator();
@@ -145,6 +146,7 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
return new Iterator<Entry>() {
private Entry entry;
+ @Override
public boolean hasNext() {
while (entry == null && it.hasNext()) {
StoredBitmap sb = it.next();
@@ -154,6 +156,7 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
return entry != null;
}
+ @Override
public Entry next() {
if (!hasNext())
throw new NoSuchElementException();
@@ -163,6 +166,7 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex
return res;
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
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 dc927d8f95..d90e2cf2bf 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
@@ -94,6 +94,7 @@ import org.eclipse.jgit.util.RawParseUtils;
public class PackFile implements Iterable<PackIndex.MutableEntry> {
/** Sorts PackFiles to be most recently created to least recently created. */
public static final Comparator<PackFile> SORT = new Comparator<PackFile>() {
+ @Override
public int compare(final PackFile a, final PackFile b) {
return b.packLastModified - a.packLastModified;
}
@@ -292,6 +293,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
*
* @see PackIndex#iterator()
*/
+ @Override
public Iterator<PackIndex.MutableEntry> iterator() {
try {
return idx().iterator();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java
index f36bd4d70c..ac1b7a367d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndex.java
@@ -184,6 +184,7 @@ public abstract class PackIndex
*
* @return iterator over pack index entries
*/
+ @Override
public abstract Iterator<MutableEntry> iterator();
/**
@@ -366,6 +367,7 @@ public abstract class PackIndex
protected abstract MutableEntry initEntry();
+ @Override
public boolean hasNext() {
return returnedNumber < getObjectCount();
}
@@ -374,8 +376,10 @@ public abstract class PackIndex
* Implementation must update {@link #returnedNumber} before returning
* element.
*/
+ @Override
public abstract MutableEntry next();
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
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 e5a729dbf3..8a08456246 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
@@ -240,6 +240,7 @@ class PackIndexV1 extends PackIndex {
@Override
protected MutableEntry initEntry() {
return new MutableEntry() {
+ @Override
protected void ensureId() {
idBuffer.fromRaw(idxdata[levelOne], levelTwo
- Constants.OBJECT_ID_LENGTH);
@@ -247,6 +248,7 @@ class PackIndexV1 extends PackIndex {
};
}
+ @Override
public MutableEntry next() {
for (; levelOne < idxdata.length; levelOne++) {
if (idxdata[levelOne] == null)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV2.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV2.java
index d87336f99c..5c2986a04e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV2.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexV2.java
@@ -311,6 +311,7 @@ class PackIndexV2 extends PackIndex {
@Override
protected MutableEntry initEntry() {
return new MutableEntry() {
+ @Override
protected void ensureId() {
idBuffer.fromRaw(names[levelOne], levelTwo
- Constants.OBJECT_ID_LENGTH / 4);
@@ -318,6 +319,7 @@ class PackIndexV2 extends PackIndex {
};
}
+ @Override
public MutableEntry next() {
for (; levelOne < names.length; levelOne++) {
if (levelTwo < names[levelOne].length) {
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 023c08c77f..542570a2db 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
@@ -194,6 +194,7 @@ public class RefDirectory extends RefDatabase {
return logWriter;
}
+ @Override
public void create() throws IOException {
FileUtils.mkdir(refsDir);
FileUtils.mkdir(new File(refsDir, R_HEADS.substring(R_REFS.length())));
@@ -534,6 +535,7 @@ public class RefDirectory extends RefDatabase {
fireRefsChanged();
}
+ @Override
public RefDirectoryUpdate newUpdate(String name, boolean detach)
throws IOException {
boolean detachingSymbolicRef = false;
@@ -1126,10 +1128,12 @@ public class RefDirectory extends RefDatabase {
this.snapShot = snapshot;
}
+ @Override
public FileSnapshot getSnapShot() {
return snapShot;
}
+ @Override
public LooseRef peel(ObjectIdRef newLeaf) {
return this;
}
@@ -1145,10 +1149,12 @@ public class RefDirectory extends RefDatabase {
this.snapShot = snapshot;
}
+ @Override
public FileSnapshot getSnapShot() {
return snapShot;
}
+ @Override
public LooseRef peel(ObjectIdRef newLeaf) {
return this;
}
@@ -1164,6 +1170,7 @@ public class RefDirectory extends RefDatabase {
this.snapShot = snapShot;
}
+ @Override
public FileSnapshot getSnapShot() {
return snapShot;
}
@@ -1176,6 +1183,7 @@ public class RefDirectory extends RefDatabase {
return id;
}
+ @Override
public LooseRef peel(ObjectIdRef newLeaf) {
ObjectId peeledObjectId = newLeaf.getPeeledObjectId();
ObjectId objectId = getObjectId();
@@ -1199,10 +1207,12 @@ public class RefDirectory extends RefDatabase {
this.snapShot = snapshot;
}
+ @Override
public FileSnapshot getSnapShot() {
return snapShot;
}
+ @Override
public LooseRef peel(ObjectIdRef newLeaf) {
// We should never try to peel the symbolic references.
throw new UnsupportedOperationException();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogEntryImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogEntryImpl.java
index 60f04b8d1f..16b2a460e1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogEntryImpl.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogEntryImpl.java
@@ -93,6 +93,7 @@ public class ReflogEntryImpl implements Serializable, ReflogEntry {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getOldId()
*/
+ @Override
public ObjectId getOldId() {
return oldId;
}
@@ -100,6 +101,7 @@ public class ReflogEntryImpl implements Serializable, ReflogEntry {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getNewId()
*/
+ @Override
public ObjectId getNewId() {
return newId;
}
@@ -107,6 +109,7 @@ public class ReflogEntryImpl implements Serializable, ReflogEntry {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getWho()
*/
+ @Override
public PersonIdent getWho() {
return who;
}
@@ -114,6 +117,7 @@ public class ReflogEntryImpl implements Serializable, ReflogEntry {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getComment()
*/
+ @Override
public String getComment() {
return comment;
}
@@ -128,6 +132,7 @@ public class ReflogEntryImpl implements Serializable, ReflogEntry {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogEntry#parseCheckout()
*/
+ @Override
public CheckoutEntry parseCheckout() {
if (getComment().startsWith(CheckoutEntryImpl.CHECKOUT_MOVING_FROM))
return new CheckoutEntryImpl(this);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogReaderImpl.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogReaderImpl.java
index 2f583b275a..490da46952 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogReaderImpl.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogReaderImpl.java
@@ -74,6 +74,7 @@ class ReflogReaderImpl implements ReflogReader {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogReaader#getLastEntry()
*/
+ @Override
public ReflogEntry getLastEntry() throws IOException {
return getReverseEntry(0);
}
@@ -81,6 +82,7 @@ class ReflogReaderImpl implements ReflogReader {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogReaader#getReverseEntries()
*/
+ @Override
public List<ReflogEntry> getReverseEntries() throws IOException {
return getReverseEntries(Integer.MAX_VALUE);
}
@@ -88,6 +90,7 @@ class ReflogReaderImpl implements ReflogReader {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogReaader#getReverseEntry(int)
*/
+ @Override
public ReflogEntry getReverseEntry(int number) throws IOException {
if (number < 0)
throw new IllegalArgumentException();
@@ -116,6 +119,7 @@ class ReflogReaderImpl implements ReflogReader {
/* (non-Javadoc)
* @see org.eclipse.jgit.internal.storage.file.ReflogReaader#getReverseEntries(int)
*/
+ @Override
public List<ReflogEntry> getReverseEntries(int max) throws IOException {
final byte[] log;
try {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataInput.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataInput.java
index a7330681fb..452636dcab 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataInput.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataInput.java
@@ -64,11 +64,13 @@ class SimpleDataInput implements DataInput {
this.fd = fd;
}
+ @Override
public int readInt() throws IOException {
readFully(buf, 0, 4);
return NB.decodeInt32(buf, 0);
}
+ @Override
public long readLong() throws IOException {
readFully(buf, 0, 8);
return NB.decodeInt64(buf, 0);
@@ -79,54 +81,67 @@ class SimpleDataInput implements DataInput {
return NB.decodeUInt32(buf, 0);
}
+ @Override
public void readFully(byte[] b) throws IOException {
readFully(b, 0, b.length);
}
+ @Override
public void readFully(byte[] b, int off, int len) throws IOException {
IO.readFully(fd, b, off, len);
}
+ @Override
public int skipBytes(int n) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public boolean readBoolean() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public byte readByte() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public int readUnsignedByte() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public short readShort() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public int readUnsignedShort() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public char readChar() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public float readFloat() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public double readDouble() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public String readLine() throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public String readUTF() throws IOException {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataOutput.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataOutput.java
index d9c899ae59..373a49465b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataOutput.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SimpleDataOutput.java
@@ -64,61 +64,75 @@ class SimpleDataOutput implements DataOutput {
this.fd = fd;
}
+ @Override
public void writeShort(int v) throws IOException {
NB.encodeInt16(buf, 0, v);
fd.write(buf, 0, 2);
}
+ @Override
public void writeInt(int v) throws IOException {
NB.encodeInt32(buf, 0, v);
fd.write(buf, 0, 4);
}
+ @Override
public void writeLong(long v) throws IOException {
NB.encodeInt64(buf, 0, v);
fd.write(buf, 0, 8);
}
+ @Override
public void write(int b) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void write(byte[] b) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void write(byte[] b, int off, int len) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void writeBoolean(boolean v) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void writeByte(int v) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void writeChar(int v) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void writeFloat(float v) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void writeDouble(double v) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void writeBytes(String s) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void writeChars(String s) throws IOException {
throw new UnsupportedOperationException();
}
+ @Override
public void writeUTF(String s) throws IOException {
throw new UnsupportedOperationException();
}
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 a742d1747e..27215502ba 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
@@ -125,6 +125,7 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
return null;
}
+ @Override
public Collection<CachedPack> getCachedPacksAndUpdate(
BitmapBuilder needBitmap) throws IOException {
for (PackFile pack : db.getPacks()) {
@@ -146,10 +147,12 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
return matches;
}
+ @Override
public boolean has(AnyObjectId objectId) throws IOException {
return db.has(objectId);
}
+ @Override
public ObjectLoader open(AnyObjectId objectId, int typeHint)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
@@ -170,6 +173,7 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
return db.getShallowCommits();
}
+ @Override
public long getObjectSize(AnyObjectId objectId, int typeHint)
throws MissingObjectException, IncorrectObjectTypeException,
IOException {
@@ -183,10 +187,12 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
return sz;
}
+ @Override
public LocalObjectToPack newObjectToPack(AnyObjectId objectId, int type) {
return new LocalObjectToPack(objectId, type);
}
+ @Override
public void selectObjectRepresentation(PackWriter packer,
ProgressMonitor monitor, Iterable<ObjectToPack> objects)
throws IOException, MissingObjectException {
@@ -196,6 +202,7 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
}
}
+ @Override
public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp,
boolean validate) throws IOException,
StoredObjectRepresentationNotAvailableException {
@@ -203,6 +210,7 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
src.pack.copyAsIs(out, src, validate, this);
}
+ @Override
public void writeObjects(PackOutputStream out, List<ObjectToPack> list)
throws IOException {
for (ObjectToPack otp : list)
@@ -245,6 +253,7 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs {
return cnt - need;
}
+ @Override
public void copyPackAsIs(PackOutputStream out, CachedPack pack)
throws IOException {
((LocalCachedPack) pack).copyAsIs(out, this);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WriteConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WriteConfig.java
index 4f79ea9723..1e2b239324 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WriteConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WriteConfig.java
@@ -50,6 +50,7 @@ import org.eclipse.jgit.lib.CoreConfig;
class WriteConfig {
/** Key for {@link Config#get(SectionParser)}. */
static final Config.SectionParser<WriteConfig> KEY = new SectionParser<WriteConfig>() {
+ @Override
public WriteConfig parse(final Config cfg) {
return new WriteConfig(cfg);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndex.java
index 2a2a463b80..0f22de08e0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndex.java
@@ -421,6 +421,7 @@ public class DeltaIndex {
return start - resPtr;
}
+ @Override
@SuppressWarnings("nls")
public String toString() {
String[] units = { "bytes", "KiB", "MiB", "GiB" };
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java
index 42927426b9..635cb8d8d7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaTask.java
@@ -213,6 +213,7 @@ final class DeltaTask implements Callable<Object> {
// Sort by starting index to identify gaps later.
Collections.sort(topPaths, new Comparator<WeightedPath>() {
+ @Override
public int compare(WeightedPath a, WeightedPath b) {
return a.slice.beginIndex - b.slice.beginIndex;
}
@@ -244,6 +245,7 @@ final class DeltaTask implements Callable<Object> {
this.slice = s;
}
+ @Override
public int compareTo(WeightedPath o) {
int cmp = Long.signum(weight - o.weight);
if (cmp != 0) {
@@ -290,6 +292,7 @@ final class DeltaTask implements Callable<Object> {
slices.add(s);
}
+ @Override
public Object call() throws Exception {
or = block.templateReader.newReader();
try {
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 14e4fa6fd7..37354d3e61 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
@@ -170,12 +170,14 @@ public class PackWriter implements AutoCloseable {
new ConcurrentHashMap<WeakReference<PackWriter>, Boolean>();
private static final Iterable<PackWriter> instancesIterable = new Iterable<PackWriter>() {
+ @Override
public Iterator<PackWriter> iterator() {
return new Iterator<PackWriter>() {
private final Iterator<WeakReference<PackWriter>> it =
instances.keySet().iterator();
private PackWriter next;
+ @Override
public boolean hasNext() {
if (next != null)
return true;
@@ -189,6 +191,7 @@ public class PackWriter implements AutoCloseable {
return false;
}
+ @Override
public PackWriter next() {
if (hasNext()) {
PackWriter result = next;
@@ -198,6 +201,7 @@ public class PackWriter implements AutoCloseable {
throw new NoSuchElementException();
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
@@ -1254,6 +1258,7 @@ public class PackWriter implements AutoCloseable {
// bigger ones, because source files grow and hardly ever shrink.
//
Arrays.sort(list, 0, cnt, new Comparator<ObjectToPack>() {
+ @Override
public int compare(ObjectToPack a, ObjectToPack b) {
int cmp = (a.isDoNotDelta() ? 1 : 0)
- (b.isDoNotDelta() ? 1 : 0);
@@ -1399,6 +1404,7 @@ public class PackWriter implements AutoCloseable {
// can schedule these for us.
for (final DeltaTask task : taskBlock.tasks) {
executor.execute(new Runnable() {
+ @Override
public void run() {
try {
task.call();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
index 77311abaa5..2c2c80eb84 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriterBitmapPreparer.java
@@ -91,6 +91,7 @@ class PackWriterBitmapPreparer {
private static final int DAY_IN_SECONDS = 24 * 60 * 60;
private static final Comparator<BitmapBuilderEntry> ORDER_BY_CARDINALITY = new Comparator<BitmapBuilderEntry>() {
+ @Override
public int compare(BitmapBuilderEntry a, BitmapBuilderEntry b) {
return Integer.signum(a.getBuilder().cardinality()
- b.getBuilder().cardinality());
@@ -579,20 +580,24 @@ class PackWriterBitmapPreparer {
this.reusedCommits = reuse;
}
+ @Override
public Iterator<RevCommit> iterator() {
// Member variables referenced by this iterator will have synthetic
// accessors generated for them if they are made private.
return new Iterator<RevCommit>() {
int pos = commitStartPos;
+ @Override
public boolean hasNext() {
return pos < commitsByOldest.length;
}
+ @Override
public RevCommit next() {
return commitsByOldest[pos++];
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
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 11081d59ee..f964bf2b4f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java
@@ -159,6 +159,7 @@ public abstract class AnyObjectId implements Comparable<AnyObjectId> {
* @return &lt; 0 if this id comes before other; 0 if this id is equal to
* other; &gt; 0 if this id comes after other.
*/
+ @Override
public final int compareTo(final AnyObjectId other) {
if (this == other)
return 0;
@@ -261,6 +262,7 @@ public abstract class AnyObjectId implements Comparable<AnyObjectId> {
return abbr.prefixCompare(this) == 0;
}
+ @Override
public final int hashCode() {
return w2;
}
@@ -276,6 +278,7 @@ public abstract class AnyObjectId implements Comparable<AnyObjectId> {
return other != null ? equals(this, other) : false;
}
+ @Override
public final boolean equals(final Object o) {
if (o instanceof AnyObjectId)
return equals((AnyObjectId) o);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java
index a3859abb23..54c80522b8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java
@@ -68,10 +68,12 @@ public abstract class BatchingProgressMonitor implements ProgressMonitor {
delayStartUnit = unit;
}
+ @Override
public void start(int totalTasks) {
// Ignore the number of tasks.
}
+ @Override
public void beginTask(String title, int work) {
endTask();
task = new Task(title, work);
@@ -79,11 +81,13 @@ public abstract class BatchingProgressMonitor implements ProgressMonitor {
task.delay(delayStartTime, delayStartUnit);
}
+ @Override
public void update(int completed) {
if (task != null)
task.update(this, completed);
}
+ @Override
public void endTask() {
if (task != null) {
task.end(this);
@@ -91,6 +95,7 @@ public abstract class BatchingProgressMonitor implements ProgressMonitor {
}
}
+ @Override
public boolean isCancelled() {
return false;
}
@@ -178,6 +183,7 @@ public abstract class BatchingProgressMonitor implements ProgressMonitor {
timerFuture = WorkQueue.getExecutor().schedule(this, time, unit);
}
+ @Override
public void run() {
display = true;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java
index 9ddff25480..00f42a49a5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java
@@ -108,6 +108,7 @@ public interface BitmapIndex {
*
* @return an Iterator.
*/
+ @Override
Iterator<BitmapObject> iterator();
}
@@ -166,6 +167,7 @@ public interface BitmapIndex {
* the other bitmap
* @return the current builder.
*/
+ @Override
BitmapBuilder or(Bitmap other);
/**
@@ -176,6 +178,7 @@ public interface BitmapIndex {
* the other bitmap
* @return the current builder.
*/
+ @Override
BitmapBuilder andNot(Bitmap other);
/**
@@ -185,6 +188,7 @@ public interface BitmapIndex {
* the other bitmap
* @return the current builder.
*/
+ @Override
BitmapBuilder xor(Bitmap other);
/** @return the fully built immutable bitmap */
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigSnapshot.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigSnapshot.java
index 5ed129ed02..90c42ea168 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigSnapshot.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigSnapshot.java
@@ -217,6 +217,7 @@ class ConfigSnapshot {
}
private static class LineComparator implements Comparator<ConfigLine> {
+ @Override
public int compare(ConfigLine a, ConfigLine b) {
return compare2(
a.section, a.subsection, a.name,
@@ -286,14 +287,17 @@ class ConfigSnapshot {
public Iterator<String> iterator() {
final Iterator<String> i = names.values().iterator();
return new Iterator<String>() {
+ @Override
public boolean hasNext() {
return i.hasNext();
}
+ @Override
public String next() {
return i.next();
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java
index 83efd43aa0..40aba636d1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CoreConfig.java
@@ -58,6 +58,7 @@ import org.eclipse.jgit.lib.Config.SectionParser;
public class CoreConfig {
/** Key for {@link Config#get(SectionParser)}. */
public static final Config.SectionParser<CoreConfig> KEY = new SectionParser<CoreConfig>() {
+ @Override
public CoreConfig parse(final Config cfg) {
return new CoreConfig(cfg);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/EmptyProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/EmptyProgressMonitor.java
index eabcbbf632..c236c35f3c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/EmptyProgressMonitor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/EmptyProgressMonitor.java
@@ -51,22 +51,27 @@ package org.eclipse.jgit.lib;
*/
public abstract class EmptyProgressMonitor implements ProgressMonitor {
+ @Override
public void start(int totalTasks) {
// empty
}
+ @Override
public void beginTask(String title, int totalWork) {
// empty
}
+ @Override
public void update(int completed) {
// empty
}
+ @Override
public void endTask() {
// empty
}
+ @Override
public boolean isCancelled() {
return false;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileMode.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileMode.java
index f295f5b72f..a489461f84 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileMode.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/FileMode.java
@@ -86,6 +86,7 @@ public abstract class FileMode {
@SuppressWarnings("synthetic-access")
public static final FileMode TREE = new FileMode(TYPE_TREE,
Constants.OBJ_TREE) {
+ @Override
public boolean equals(final int modeBits) {
return (modeBits & TYPE_MASK) == TYPE_TREE;
}
@@ -95,6 +96,7 @@ public abstract class FileMode {
@SuppressWarnings("synthetic-access")
public static final FileMode SYMLINK = new FileMode(TYPE_SYMLINK,
Constants.OBJ_BLOB) {
+ @Override
public boolean equals(final int modeBits) {
return (modeBits & TYPE_MASK) == TYPE_SYMLINK;
}
@@ -104,6 +106,7 @@ public abstract class FileMode {
@SuppressWarnings("synthetic-access")
public static final FileMode REGULAR_FILE = new FileMode(0100644,
Constants.OBJ_BLOB) {
+ @Override
public boolean equals(final int modeBits) {
return (modeBits & TYPE_MASK) == TYPE_FILE && (modeBits & 0111) == 0;
}
@@ -113,6 +116,7 @@ public abstract class FileMode {
@SuppressWarnings("synthetic-access")
public static final FileMode EXECUTABLE_FILE = new FileMode(0100755,
Constants.OBJ_BLOB) {
+ @Override
public boolean equals(final int modeBits) {
return (modeBits & TYPE_MASK) == TYPE_FILE && (modeBits & 0111) != 0;
}
@@ -122,6 +126,7 @@ public abstract class FileMode {
@SuppressWarnings("synthetic-access")
public static final FileMode GITLINK = new FileMode(TYPE_GITLINK,
Constants.OBJ_COMMIT) {
+ @Override
public boolean equals(final int modeBits) {
return (modeBits & TYPE_MASK) == TYPE_GITLINK;
}
@@ -131,6 +136,7 @@ public abstract class FileMode {
@SuppressWarnings("synthetic-access")
public static final FileMode MISSING = new FileMode(TYPE_MISSING,
Constants.OBJ_BAD) {
+ @Override
public boolean equals(final int modeBits) {
return modeBits == 0;
}
@@ -258,6 +264,7 @@ public abstract class FileMode {
}
/** Format this mode as an octal string (for debugging only). */
+ @Override
public String toString() {
return Integer.toOctalString(modeBits);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java
index af6a4fb919..b845fad03f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java
@@ -342,6 +342,7 @@ public class IndexDiff {
}
private WorkingTreeIteratorFactory wTreeIt = new WorkingTreeIteratorFactory() {
+ @Override
public WorkingTreeIterator getWorkingTreeIterator(Repository repo) {
return new FileTreeIterator(repo);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/NullProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/NullProgressMonitor.java
index d05c8c6b01..497beb033a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/NullProgressMonitor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/NullProgressMonitor.java
@@ -56,22 +56,27 @@ public class NullProgressMonitor implements ProgressMonitor {
// Do not let others instantiate
}
+ @Override
public void start(int totalTasks) {
// Do not report.
}
+ @Override
public void beginTask(String title, int totalWork) {
// Do not report.
}
+ @Override
public void update(int completed) {
// Do not report.
}
+ @Override
public boolean isCancelled() {
return false;
}
+ @Override
public void endTask() {
// Do not report.
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdRef.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdRef.java
index c286f5e463..636716bcb3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdRef.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdRef.java
@@ -67,11 +67,13 @@ public abstract class ObjectIdRef implements Ref {
super(st, name, id);
}
+ @Override
@Nullable
public ObjectId getPeeledObjectId() {
return null;
}
+ @Override
public boolean isPeeled() {
return false;
}
@@ -99,11 +101,13 @@ public abstract class ObjectIdRef implements Ref {
peeledObjectId = p;
}
+ @Override
@NonNull
public ObjectId getPeeledObjectId() {
return peeledObjectId;
}
+ @Override
public boolean isPeeled() {
return true;
}
@@ -127,11 +131,13 @@ public abstract class ObjectIdRef implements Ref {
super(st, name, id);
}
+ @Override
@Nullable
public ObjectId getPeeledObjectId() {
return null;
}
+ @Override
public boolean isPeeled() {
return true;
}
@@ -161,30 +167,36 @@ public abstract class ObjectIdRef implements Ref {
this.objectId = id;
}
+ @Override
@NonNull
public String getName() {
return name;
}
+ @Override
public boolean isSymbolic() {
return false;
}
+ @Override
@NonNull
public Ref getLeaf() {
return this;
}
+ @Override
@NonNull
public Ref getTarget() {
return this;
}
+ @Override
@Nullable
public ObjectId getObjectId() {
return objectId;
}
+ @Override
@NonNull
public Storage getStorage() {
return storage;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java
index faed64bfe7..43fc7bfb97 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java
@@ -111,6 +111,7 @@ public class ObjectIdSubclassMap<V extends ObjectId>
* object to find.
* @return true if the mapping exists for this object; false otherwise.
*/
+ @Override
public boolean contains(final AnyObjectId toFind) {
return get(toFind) != null;
}
@@ -187,16 +188,19 @@ public class ObjectIdSubclassMap<V extends ObjectId>
return size == 0;
}
+ @Override
public Iterator<V> iterator() {
return new Iterator<V>() {
private int found;
private int i;
+ @Override
public boolean hasNext() {
return found < size;
}
+ @Override
public V next() {
while (i < table.length) {
final V v = table[i++];
@@ -208,6 +212,7 @@ public class ObjectIdSubclassMap<V extends ObjectId>
throw new NoSuchElementException();
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
index 4c51279d05..9cd2d1d296 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java
@@ -107,41 +107,50 @@ public abstract class ObjectInserter implements AutoCloseable {
return delegate().buffer();
}
+ @Override
public ObjectId idFor(int type, byte[] data) {
return delegate().idFor(type, data);
}
+ @Override
public ObjectId idFor(int type, byte[] data, int off, int len) {
return delegate().idFor(type, data, off, len);
}
+ @Override
public ObjectId idFor(int objectType, long length, InputStream in)
throws IOException {
return delegate().idFor(objectType, length, in);
}
+ @Override
public ObjectId idFor(TreeFormatter formatter) {
return delegate().idFor(formatter);
}
+ @Override
public ObjectId insert(int type, byte[] data) throws IOException {
return delegate().insert(type, data);
}
+ @Override
public ObjectId insert(int type, byte[] data, int off, int len)
throws IOException {
return delegate().insert(type, data, off, len);
}
+ @Override
public ObjectId insert(int objectType, long length, InputStream in)
throws IOException {
return delegate().insert(objectType, length, in);
}
+ @Override
public PackParser newPackParser(InputStream in) throws IOException {
return delegate().newPackParser(in);
}
+ @Override
public ObjectReader newReader() {
final ObjectReader dr = delegate().newReader();
return new ObjectReader.Filter() {
@@ -157,10 +166,12 @@ public abstract class ObjectInserter implements AutoCloseable {
};
}
+ @Override
public void flush() throws IOException {
delegate().flush();
}
+ @Override
public void close() {
delegate().close();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
index 372da98939..b79a02c64d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java
@@ -286,6 +286,7 @@ public abstract class ObjectReader implements AutoCloseable {
return new AsyncObjectLoaderQueue<T>() {
private T cur;
+ @Override
public boolean next() throws MissingObjectException, IOException {
if (idItr.hasNext()) {
cur = idItr.next();
@@ -295,22 +296,27 @@ public abstract class ObjectReader implements AutoCloseable {
}
}
+ @Override
public T getCurrent() {
return cur;
}
+ @Override
public ObjectId getObjectId() {
return cur;
}
+ @Override
public ObjectLoader open() throws IOException {
return ObjectReader.this.open(cur, OBJ_ANY);
}
+ @Override
public boolean cancel(boolean mayInterruptIfRunning) {
return true;
}
+ @Override
public void release() {
// Since we are sequential by default, we don't
// have any state to clean up if we terminate early.
@@ -370,6 +376,7 @@ public abstract class ObjectReader implements AutoCloseable {
private long sz;
+ @Override
public boolean next() throws MissingObjectException, IOException {
if (idItr.hasNext()) {
cur = idItr.next();
@@ -380,22 +387,27 @@ public abstract class ObjectReader implements AutoCloseable {
}
}
+ @Override
public T getCurrent() {
return cur;
}
+ @Override
public ObjectId getObjectId() {
return cur;
}
+ @Override
public long getSize() {
return sz;
}
+ @Override
public boolean cancel(boolean mayInterruptIfRunning) {
return true;
}
+ @Override
public void release() {
// Since we are sequential by default, we don't
// have any state to clean up if we terminate early.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java
index 627ccaa206..45757e42f5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java
@@ -336,6 +336,7 @@ public class PersonIdent implements Serializable {
/**
* Hashcode is based only on the email address and timestamp.
*/
+ @Override
public int hashCode() {
int hc = getEmailAddress().hashCode();
hc *= 31;
@@ -343,6 +344,7 @@ public class PersonIdent implements Serializable {
return hc;
}
+ @Override
public boolean equals(final Object o) {
if (o instanceof PersonIdent) {
final PersonIdent p = (PersonIdent) o;
@@ -370,6 +372,7 @@ public class PersonIdent implements Serializable {
return r.toString();
}
+ @Override
@SuppressWarnings("nls")
public String toString() {
final StringBuilder r = new StringBuilder();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefComparator.java
index c6e10299ef..91b0319f4f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefComparator.java
@@ -60,6 +60,7 @@ public class RefComparator implements Comparator<Ref> {
/** Singleton instance of RefComparator */
public static final RefComparator INSTANCE = new RefComparator();
+ @Override
public int compare(final Ref o1, final Ref o2) {
return compareTo(o1, o2);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymbolicRef.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymbolicRef.java
index eeab921a7a..71d5cd7ac1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymbolicRef.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymbolicRef.java
@@ -70,15 +70,18 @@ public class SymbolicRef implements Ref {
this.target = target;
}
+ @Override
@NonNull
public String getName() {
return name;
}
+ @Override
public boolean isSymbolic() {
return true;
}
+ @Override
@NonNull
public Ref getLeaf() {
Ref dst = getTarget();
@@ -87,26 +90,31 @@ public class SymbolicRef implements Ref {
return dst;
}
+ @Override
@NonNull
public Ref getTarget() {
return target;
}
+ @Override
@Nullable
public ObjectId getObjectId() {
return getLeaf().getObjectId();
}
+ @Override
@NonNull
public Storage getStorage() {
return Storage.LOOSE;
}
+ @Override
@Nullable
public ObjectId getPeeledObjectId() {
return getLeaf().getPeeledObjectId();
}
+ @Override
public boolean isPeeled() {
return getLeaf().isPeeled();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java
index ff85f9b8fd..5824a55ff1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java
@@ -87,12 +87,14 @@ public class ThreadSafeProgressMonitor implements ProgressMonitor {
this.process = new Semaphore(0);
}
+ @Override
public void start(int totalTasks) {
if (!isMainThread())
throw new IllegalStateException();
pm.start(totalTasks);
}
+ @Override
public void beginTask(String title, int totalWork) {
if (!isMainThread())
throw new IllegalStateException();
@@ -156,11 +158,13 @@ public class ThreadSafeProgressMonitor implements ProgressMonitor {
pm.update(cnt);
}
+ @Override
public void update(int completed) {
if (0 == pendingUpdates.getAndAdd(completed))
process.release();
}
+ @Override
public boolean isCancelled() {
lock.lock();
try {
@@ -170,6 +174,7 @@ public class ThreadSafeProgressMonitor implements ProgressMonitor {
}
}
+ @Override
public void endTask() {
if (!isMainThread())
throw new IllegalStateException();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/UserConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/UserConfig.java
index b8d236c1da..bd393dd2ff 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/UserConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/UserConfig.java
@@ -52,6 +52,7 @@ import org.eclipse.jgit.util.SystemReader;
public class UserConfig {
/** Key for {@link Config#get(SectionParser)}. */
public static final Config.SectionParser<UserConfig> KEY = new SectionParser<UserConfig>() {
+ @Override
public UserConfig parse(final Config cfg) {
return new UserConfig(cfg);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/WorkQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/WorkQueue.java
index 9735d19e5e..07b87f58d2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/WorkQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/WorkQueue.java
@@ -67,6 +67,7 @@ class WorkQueue {
private final ThreadFactory baseFactory = Executors
.defaultThreadFactory();
+ @Override
public Thread newThread(Runnable taskBody) {
Thread thr = baseFactory.newThread(taskBody);
thr.setName("JGit-WorkQueue"); //$NON-NLS-1$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeConfig.java
index 83b143b90d..d059391826 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeConfig.java
@@ -167,6 +167,7 @@ public class MergeConfig {
this.branch = branch;
}
+ @Override
public MergeConfig parse(Config cfg) {
return new MergeConfig(branch, cfg);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java
index 106f9c7796..ff3c8ab172 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java
@@ -133,14 +133,17 @@ public class MergeResult<S extends Sequence> implements Iterable<MergeChunk> {
* @return an iterator over the MergeChunks. The iterator does not support
* the remove operation
*/
+ @Override
public Iterator<MergeChunk> iterator() {
return new Iterator<MergeChunk>() {
int idx;
+ @Override
public boolean hasNext() {
return (idx < chunks.size());
}
+ @Override
public MergeChunk next() {
ConflictState state = states[chunks.get(idx++)];
int srcIdx = chunks.get(idx++);
@@ -149,6 +152,7 @@ public class MergeResult<S extends Sequence> implements Iterable<MergeChunk> {
return new MergeChunk(srcIdx, begin, end, state);
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java
index a768c25a20..396ad7884d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java
@@ -72,6 +72,7 @@ public class NLS {
public static final Locale ROOT_LOCALE = new Locale("", "", ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
private static final InheritableThreadLocal<NLS> local = new InheritableThreadLocal<NLS>() {
+ @Override
protected NLS initialValue() {
return new NLS(Locale.getDefault());
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/notes/DefaultNoteMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/notes/DefaultNoteMerger.java
index db49448515..2e7327ca32 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/DefaultNoteMerger.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/DefaultNoteMerger.java
@@ -67,6 +67,7 @@ import org.eclipse.jgit.util.io.UnionInputStream;
*/
public class DefaultNoteMerger implements NoteMerger {
+ @Override
public Note merge(Note base, Note ours, Note theirs, ObjectReader reader,
ObjectInserter inserter) throws IOException {
if (ours == null)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/notes/FanoutBucket.java b/org.eclipse.jgit/src/org/eclipse/jgit/notes/FanoutBucket.java
index 79fbb09ecc..7827a9aa05 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/FanoutBucket.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/FanoutBucket.java
@@ -140,6 +140,7 @@ class FanoutBucket extends InMemoryNoteBucket {
private Iterator<Note> itr;
+ @Override
public boolean hasNext() {
if (itr != null && itr.hasNext())
return true;
@@ -164,6 +165,7 @@ class FanoutBucket extends InMemoryNoteBucket {
return false;
}
+ @Override
public Note next() {
if (hasNext())
return itr.next();
@@ -171,6 +173,7 @@ class FanoutBucket extends InMemoryNoteBucket {
throw new NoSuchElementException();
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
@@ -259,6 +262,7 @@ class FanoutBucket extends InMemoryNoteBucket {
return inserter.insert(build(true, inserter));
}
+ @Override
ObjectId getTreeId() {
try (ObjectInserter.Formatter f = new ObjectInserter.Formatter()) {
return f.idFor(build(false, null));
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java b/org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java
index 41f7501e51..1be5251622 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/LeafBucket.java
@@ -122,10 +122,12 @@ class LeafBucket extends InMemoryNoteBucket {
return new Iterator<Note>() {
private int idx;
+ @Override
public boolean hasNext() {
return idx < cnt;
}
+ @Override
public Note next() {
if (hasNext())
return notes[idx++];
@@ -133,6 +135,7 @@ class LeafBucket extends InMemoryNoteBucket {
throw new NoSuchElementException();
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
@@ -144,6 +147,7 @@ class LeafBucket extends InMemoryNoteBucket {
return cnt;
}
+ @Override
InMemoryNoteBucket set(AnyObjectId noteOn, AnyObjectId noteData,
ObjectReader or) throws IOException {
int p = search(noteOn);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java
index 25b2ae89e9..44c59260e8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java
@@ -201,6 +201,7 @@ public class NoteMap implements Iterable<Note> {
* @return an iterator that iterates over notes of this NoteMap. Non note
* entries are ignored by this iterator.
*/
+ @Override
public Iterator<Note> iterator() {
try {
return root.iterator(new MutableObjectId(), reader);
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 eb2bfac1b0..ed79787291 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java
@@ -266,6 +266,7 @@ public class CombinedHunkHeader extends HunkHeader {
}
}
+ @Override
void extractFileLines(final StringBuilder sb, final String[] text,
final int[] offsets) {
final byte[] buf = file.buf;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java
index 55cf235cf9..bdeb01c3aa 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java
@@ -147,6 +147,7 @@ public class PlotWalk extends RevWalk {
}
class PlotRefComparator implements Comparator<Ref> {
+ @Override
public int compare(Ref o1, Ref o2) {
try {
RevObject obj1 = parseAny(o1.getObjectId());
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java
index 843c2afa2f..4923d0f741 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java
@@ -107,6 +107,7 @@ abstract class AbstractRevQueue extends Generator {
*
* @return the first commit of this queue.
*/
+ @Override
public abstract RevCommit next();
/** Remove all entries from this queue. */
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 30d140a748..db5379e507 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java
@@ -83,6 +83,7 @@ abstract class BlockRevQueue extends AbstractRevQueue {
* @param q
* the other queue we will steal entries from.
*/
+ @Override
public void shareFreeList(final BlockRevQueue q) {
free = q.free;
}
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 0802bfafde..cd7c074cce 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java
@@ -82,6 +82,7 @@ public class DateRevQueue extends AbstractRevQueue {
}
}
+ @Override
public void add(final RevCommit c) {
sinceLastIndex++;
if (++inQueue > REBUILD_INDEX_COUNT
@@ -126,6 +127,7 @@ public class DateRevQueue extends AbstractRevQueue {
}
}
+ @Override
public RevCommit next() {
final Entry q = head;
if (q == null)
@@ -161,6 +163,7 @@ public class DateRevQueue extends AbstractRevQueue {
return head != null ? head.commit : null;
}
+ @Override
public void clear() {
head = null;
free = null;
@@ -170,6 +173,7 @@ public class DateRevQueue extends AbstractRevQueue {
last = -1;
}
+ @Override
boolean everbodyHasFlag(final int f) {
for (Entry q = head; q != null; q = q.next) {
if ((q.commit.flags & f) == 0)
@@ -178,6 +182,7 @@ public class DateRevQueue extends AbstractRevQueue {
return true;
}
+ @Override
boolean anybodyHasFlag(final int f) {
for (Entry q = head; q != null; q = q.next) {
if ((q.commit.flags & f) != 0)
@@ -191,6 +196,7 @@ public class DateRevQueue extends AbstractRevQueue {
return outputType | SORT_COMMIT_TIME_DESC;
}
+ @Override
public String toString() {
final StringBuilder s = new StringBuilder();
for (Entry q = head; q != null; q = q.next)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java
index 59a360f867..f932593e82 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java
@@ -138,14 +138,17 @@ public interface DepthWalk {
return new Commit(id);
}
+ @Override
public int getDepth() {
return depth;
}
+ @Override
public RevFlag getUnshallowFlag() {
return UNSHALLOW;
}
+ @Override
public RevFlag getReinterestingFlag() {
return REINTERESTING;
}
@@ -239,14 +242,17 @@ public interface DepthWalk {
return new Commit(id);
}
+ @Override
public int getDepth() {
return depth;
}
+ @Override
public RevFlag getUnshallowFlag() {
return UNSHALLOW;
}
+ @Override
public RevFlag getReinterestingFlag() {
return REINTERESTING;
}
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 b8f63aaa58..14156042c8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java
@@ -64,6 +64,7 @@ public class FIFORevQueue extends BlockRevQueue {
super(s);
}
+ @Override
public void add(final RevCommit c) {
Block b = tail;
if (b == null) {
@@ -107,6 +108,7 @@ public class FIFORevQueue extends BlockRevQueue {
head = b;
}
+ @Override
public RevCommit next() {
final Block b = head;
if (b == null)
@@ -122,12 +124,14 @@ public class FIFORevQueue extends BlockRevQueue {
return c;
}
+ @Override
public void clear() {
head = null;
tail = null;
free.clear();
}
+ @Override
boolean everbodyHasFlag(final int f) {
for (Block b = head; b != null; b = b.next) {
for (int i = b.headIndex; i < b.tailIndex; i++)
@@ -137,6 +141,7 @@ public class FIFORevQueue extends BlockRevQueue {
return true;
}
+ @Override
boolean anybodyHasFlag(final int f) {
for (Block b = head; b != null; b = b.next) {
for (int i = b.headIndex; i < b.tailIndex; i++)
@@ -154,6 +159,7 @@ public class FIFORevQueue extends BlockRevQueue {
}
}
+ @Override
public String toString() {
final StringBuilder s = new StringBuilder();
for (Block q = head; q != null; q = q.next) {
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 9abaf8dccf..f9da5b17ba 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java
@@ -63,6 +63,7 @@ public class LIFORevQueue extends BlockRevQueue {
super(s);
}
+ @Override
public void add(final RevCommit c) {
Block b = head;
if (b == null || !b.canUnpop()) {
@@ -74,6 +75,7 @@ public class LIFORevQueue extends BlockRevQueue {
b.unpop(c);
}
+ @Override
public RevCommit next() {
final Block b = head;
if (b == null)
@@ -87,11 +89,13 @@ public class LIFORevQueue extends BlockRevQueue {
return c;
}
+ @Override
public void clear() {
head = null;
free.clear();
}
+ @Override
boolean everbodyHasFlag(final int f) {
for (Block b = head; b != null; b = b.next) {
for (int i = b.headIndex; i < b.tailIndex; i++)
@@ -101,6 +105,7 @@ public class LIFORevQueue extends BlockRevQueue {
return true;
}
+ @Override
boolean anybodyHasFlag(final int f) {
for (Block b = head; b != null; b = b.next) {
for (int i = b.headIndex; i < b.tailIndex; i++)
@@ -110,6 +115,7 @@ public class LIFORevQueue extends BlockRevQueue {
return false;
}
+ @Override
public String toString() {
final StringBuilder s = new StringBuilder();
for (Block q = head; q != null; q = q.next) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
index 9c3af5a5dc..f98a7d637e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java
@@ -243,6 +243,7 @@ public class ObjectWalk extends RevWalk {
addObject(o);
}
+ @Override
public void sort(RevSort s) {
super.sort(s);
boundary = hasRevSort(RevSort.BOUNDARY);
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 0998a3a221..dae52f85db 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java
@@ -99,6 +99,7 @@ public class RevFlag {
return walker;
}
+ @Override
public String toString() {
return name;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlagSet.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlagSet.java
index ca30fd98d1..1afdeb610f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlagSet.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlagSet.java
@@ -132,14 +132,17 @@ public class RevFlagSet extends AbstractSet<RevFlag> {
return new Iterator<RevFlag>() {
private RevFlag current;
+ @Override
public boolean hasNext() {
return i.hasNext();
}
+ @Override
public RevFlag next() {
return current = i.next();
}
+ @Override
public void remove() {
mask &= ~current.mask;
i.remove();
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 5052a4dea5..95986782cd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java
@@ -78,6 +78,7 @@ public class RevObjectList<E extends RevObject> extends AbstractList<E> {
// Initialized above.
}
+ @Override
public void add(final int index, final E element) {
if (index != size)
throw new UnsupportedOperationException(MessageFormat.format(
@@ -87,6 +88,7 @@ public class RevObjectList<E extends RevObject> extends AbstractList<E> {
size++;
}
+ @Override
@SuppressWarnings("unchecked")
public E set(int index, E element) {
Block s = contents;
@@ -107,6 +109,7 @@ public class RevObjectList<E extends RevObject> extends AbstractList<E> {
return (E) old;
}
+ @Override
@SuppressWarnings("unchecked")
public E get(int index) {
Block s = contents;
@@ -120,6 +123,7 @@ public class RevObjectList<E extends RevObject> extends AbstractList<E> {
return s != null ? (E) s.contents[index] : null;
}
+ @Override
public int size() {
return size;
}
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 a7f7cd4635..572ebcd2ec 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
@@ -944,14 +944,17 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
final Iterator<RevObject> objItr = have.iterator();
if (need.isEmpty()) {
return new AsyncRevObjectQueue() {
+ @Override
public RevObject next() {
return objItr.hasNext() ? objItr.next() : null;
}
+ @Override
public boolean cancel(boolean mayInterruptIfRunning) {
return true;
}
+ @Override
public void release() {
// In-memory only, no action required.
}
@@ -960,6 +963,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
final AsyncObjectLoaderQueue<T> lItr = reader.open(need, reportMissing);
return new AsyncRevObjectQueue() {
+ @Override
public RevObject next() throws MissingObjectException,
IncorrectObjectTypeException, IOException {
if (objItr.hasNext())
@@ -983,10 +987,12 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
return r;
}
+ @Override
public boolean cancel(boolean mayInterruptIfRunning) {
return lItr.cancel(mayInterruptIfRunning);
}
+ @Override
public void release() {
lItr.release();
}
@@ -1316,6 +1322,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
* @return an iterator over this walker's commits.
* @see RevWalkException
*/
+ @Override
public Iterator<RevCommit> iterator() {
final RevCommit first;
try {
@@ -1331,10 +1338,12 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
return new Iterator<RevCommit>() {
RevCommit next = first;
+ @Override
public boolean hasNext() {
return next != null;
}
+ @Override
public RevCommit next() {
try {
final RevCommit r = next;
@@ -1349,6 +1358,7 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable {
}
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFilter.java
index 14a98a10bf..6b90d29f1c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFilter.java
@@ -286,6 +286,7 @@ public abstract class RevFilter {
*
* @return another copy of this filter, suitable for another thread.
*/
+ @Override
public abstract RevFilter clone();
@Override
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java
index 38a0fa2aac..6cfd352ec1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/FileBasedConfig.java
@@ -185,6 +185,7 @@ public class FileBasedConfig extends StoredConfig {
* @throws IOException
* the file could not be written.
*/
+ @Override
public void save() throws IOException {
final byte[] out;
final String text = toText();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
index 3176cb30e1..c64aa2d782 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackConfig.java
@@ -1044,6 +1044,7 @@ public class PackConfig {
getBitmapInactiveBranchAgeInDays()));
}
+ @Override
public String toString() {
final StringBuilder b = new StringBuilder();
b.append("maxDeltaDepth=").append(getMaxDeltaDepth()); //$NON-NLS-1$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java
index 2d730a10f3..6f1369458c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java
@@ -57,12 +57,14 @@ import org.eclipse.jgit.revwalk.RevWalk;
* @since 2.0
*/
public abstract class AbstractAdvertiseRefsHook implements AdvertiseRefsHook {
+ @Override
public void advertiseRefs(UploadPack uploadPack)
throws ServiceMayNotContinueException {
uploadPack.setAdvertisedRefs(getAdvertisedRefs(
uploadPack.getRepository(), uploadPack.getRevWalk()));
}
+ @Override
public void advertiseRefs(BaseReceivePack receivePack)
throws ServiceMayNotContinueException {
Map<String, Ref> refs = getAdvertisedRefs(receivePack.getRepository(),
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java
index c3af74a7c2..96d7c240c3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java
@@ -56,10 +56,12 @@ public interface AdvertiseRefsHook {
* {@link BaseReceivePack#setAdvertisedRefs(java.util.Map,java.util.Set)}.
*/
public static final AdvertiseRefsHook DEFAULT = new AdvertiseRefsHook() {
+ @Override
public void advertiseRefs(UploadPack uploadPack) {
// Do nothing.
}
+ @Override
public void advertiseRefs(BaseReceivePack receivePack) {
// Do nothing.
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java
index 00942aba45..22ea5cba9a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java
@@ -79,12 +79,14 @@ public class AdvertiseRefsHookChain implements AdvertiseRefsHook {
return new AdvertiseRefsHookChain(newHooks, i);
}
+ @Override
public void advertiseRefs(BaseReceivePack rp)
throws ServiceMayNotContinueException {
for (int i = 0; i < count; i++)
hooks[i].advertiseRefs(rp);
}
+ @Override
public void advertiseRefs(UploadPack rp)
throws ServiceMayNotContinueException {
for (int i = 0; i < count; i++)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java
index 59ff1bd997..69028fab31 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java
@@ -71,18 +71,22 @@ public abstract class BaseConnection implements Connection {
private Writer messageWriter;
+ @Override
public Map<String, Ref> getRefsMap() {
return advertisedRefs;
}
+ @Override
public final Collection<Ref> getRefs() {
return advertisedRefs.values();
}
+ @Override
public final Ref getRef(final String name) {
return advertisedRefs.get(name);
}
+ @Override
public String getMessages() {
return messageWriter != null ? messageWriter.toString() : ""; //$NON-NLS-1$
}
@@ -94,6 +98,7 @@ public abstract class BaseConnection implements Connection {
* server does not advertise this version.
* @since 4.0
*/
+ @Override
public String getPeerUserAgent() {
return peerUserAgent;
}
@@ -109,6 +114,7 @@ public abstract class BaseConnection implements Connection {
peerUserAgent = agent;
}
+ @Override
public abstract void close();
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseFetchConnection.java
index cc2770771e..41b8c2d765 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseFetchConnection.java
@@ -64,12 +64,14 @@ import org.eclipse.jgit.lib.Ref;
*/
abstract class BaseFetchConnection extends BaseConnection implements
FetchConnection {
+ @Override
public final void fetch(final ProgressMonitor monitor,
final Collection<Ref> want, final Set<ObjectId> have)
throws TransportException {
fetch(monitor, want, have, null);
}
+ @Override
public final void fetch(final ProgressMonitor monitor,
final Collection<Ref> want, final Set<ObjectId> have,
OutputStream out) throws TransportException {
@@ -81,6 +83,7 @@ abstract class BaseFetchConnection extends BaseConnection implements
* Default implementation of {@link FetchConnection#didFetchIncludeTags()} -
* returning false.
*/
+ @Override
public boolean didFetchIncludeTags() {
return false;
}
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 0dd907f97e..128ec4e28f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java
@@ -280,6 +280,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
private static class FetchConfig {
static final SectionParser<FetchConfig> KEY = new SectionParser<FetchConfig>() {
+ @Override
public FetchConfig parse(final Config cfg) {
return new FetchConfig(cfg);
}
@@ -292,6 +293,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
}
}
+ @Override
public final void fetch(final ProgressMonitor monitor,
final Collection<Ref> want, final Set<ObjectId> have)
throws TransportException {
@@ -301,6 +303,7 @@ public abstract class BasePackFetchConnection extends BasePackConnection
/**
* @since 3.0
*/
+ @Override
public final void fetch(final ProgressMonitor monitor,
final Collection<Ref> want, final Set<ObjectId> have,
OutputStream outputStream) throws TransportException {
@@ -308,18 +311,22 @@ public abstract class BasePackFetchConnection extends BasePackConnection
doFetch(monitor, want, have, outputStream);
}
+ @Override
public boolean didFetchIncludeTags() {
return false;
}
+ @Override
public boolean didFetchTestConnectivity() {
return false;
}
+ @Override
public void setPackLockMessage(final String message) {
lockMessage = message;
}
+ @Override
public Collection<PackLock> getPackLocks() {
if (packLock != null)
return Collections.singleton(packLock);
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 86cc484e34..bb5922d217 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java
@@ -152,6 +152,7 @@ public abstract class BasePackPushConnection extends BasePackConnection implemen
pushOptions = transport.getPushOptions();
}
+ @Override
public void push(final ProgressMonitor monitor,
final Map<String, RemoteRefUpdate> refUpdates)
throws TransportException {
@@ -161,6 +162,7 @@ public abstract class BasePackPushConnection extends BasePackConnection implemen
/**
* @since 3.0
*/
+ @Override
public void push(final ProgressMonitor monitor,
final Map<String, RemoteRefUpdate> refUpdates, OutputStream outputStream)
throws TransportException {
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 b20a06864b..080fbd6437 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseReceivePack.java
@@ -333,6 +333,7 @@ public abstract class BaseReceivePack {
/** Configuration for receive operations. */
protected static class ReceiveConfig {
static final SectionParser<ReceiveConfig> KEY = new SectionParser<ReceiveConfig>() {
+ @Override
public ReceiveConfig parse(final Config cfg) {
return new ReceiveConfig(cfg);
}
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 8038fa4d31..559c40394c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java
@@ -180,6 +180,7 @@ class BundleFetchConnection extends BaseFetchConnection {
return line.toString();
}
+ @Override
public boolean didFetchTestConnectivity() {
return false;
}
@@ -207,10 +208,12 @@ class BundleFetchConnection extends BaseFetchConnection {
}
}
+ @Override
public void setPackLockMessage(final String message) {
lockMessage = message;
}
+ @Override
public Collection<PackLock> getPackLocks() {
if (packLock != null)
return Collections.singleton(packLock);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java
index da288ec31e..9a272a4fdd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Connection.java
@@ -112,6 +112,7 @@ public interface Connection extends AutoCloseable {
* Implementers shouldn't throw checked exceptions. This override narrows
* the signature to prevent them from doing so.
*/
+ @Override
public void close();
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java
index 6757aaf108..843f6cc0e5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialsProviderUserInfo.java
@@ -85,14 +85,17 @@ public class CredentialsProviderUserInfo implements UserInfo,
return uri;
}
+ @Override
public String getPassword() {
return password;
}
+ @Override
public String getPassphrase() {
return passphrase;
}
+ @Override
public boolean promptPassphrase(String msg) {
CredentialItem.StringType v = newPrompt(msg);
if (provider.get(uri, v)) {
@@ -104,6 +107,7 @@ public class CredentialsProviderUserInfo implements UserInfo,
}
}
+ @Override
public boolean promptPassword(String msg) {
CredentialItem.Password p = new CredentialItem.Password(msg);
if (provider.get(uri, p)) {
@@ -119,15 +123,18 @@ public class CredentialsProviderUserInfo implements UserInfo,
return new CredentialItem.StringType(msg, true);
}
+ @Override
public boolean promptYesNo(String msg) {
CredentialItem.YesNoType v = new CredentialItem.YesNoType(msg);
return provider.get(uri, v) && v.getValue();
}
+ @Override
public void showMessage(String msg) {
provider.get(uri, new CredentialItem.InformationalMessage(msg));
}
+ @Override
public String[] promptKeyboardInteractive(String destination, String name,
String instruction, String[] prompt, boolean[] echo) {
CredentialItem.StringType[] v = new CredentialItem.StringType[prompt.length];
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 1beec906ed..40b2c47df0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Daemon.java
@@ -111,6 +111,7 @@ public class Daemon {
repositoryResolver = (RepositoryResolver<DaemonClient>) RepositoryResolver.NONE;
uploadPackFactory = new UploadPackFactory<DaemonClient>() {
+ @Override
public UploadPack create(DaemonClient req, Repository db)
throws ServiceNotEnabledException,
ServiceNotAuthorizedException {
@@ -122,6 +123,7 @@ public class Daemon {
};
receivePackFactory = new ReceivePackFactory<DaemonClient>() {
+ @Override
public ReceivePack create(DaemonClient req, Repository db)
throws ServiceNotEnabledException,
ServiceNotAuthorizedException {
@@ -298,6 +300,7 @@ public class Daemon {
run = true;
acceptThread = new Thread(processors, "Git-Daemon-Accept") { //$NON-NLS-1$
+ @Override
public void run() {
while (isRunning()) {
try {
@@ -344,6 +347,7 @@ public class Daemon {
dc.setRemoteAddress(((InetSocketAddress) peer).getAddress());
new Thread(processors, "Git-Daemon-Client " + peer.toString()) { //$NON-NLS-1$
+ @Override
public void run() {
try {
dc.execute(s);
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 ec6f24273d..80b2caebc4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DaemonService.java
@@ -65,6 +65,7 @@ public abstract class DaemonService {
DaemonService(final String cmdName, final String cfgName) {
command = cmdName.startsWith("git-") ? cmdName : "git-" + cmdName; //$NON-NLS-1$ //$NON-NLS-2$
configKey = new SectionParser<ServiceConfig>() {
+ @Override
public ServiceConfig parse(final Config cfg) {
return new ServiceConfig(DaemonService.this, cfg, cfgName);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java
index 70128077d2..23fd7e39c5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/DefaultSshSessionFactory.java
@@ -59,6 +59,7 @@ import com.jcraft.jsch.Session;
* connection will immediately fail.
*/
class DefaultSshSessionFactory extends JschConfigSessionFactory {
+ @Override
protected void configure(final OpenSshConfig.Host hc, final Session session) {
// No additional configuration required.
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java
index 319ae1edc7..d43be8974c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java
@@ -82,6 +82,7 @@ public class HMACSHA1NonceGenerator implements NonceGenerator {
}
}
+ @Override
public synchronized String createNonce(Repository repo, long timestamp)
throws IllegalStateException {
String path;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java
index 7fc4048115..bea8d60ecd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java
@@ -87,6 +87,7 @@ class InternalFetchConnection<C> extends BasePackFetchConnection {
}
worker = new Thread("JGit-Upload-Pack") { //$NON-NLS-1$
+ @Override
public void run() {
try {
final UploadPack rp = uploadPackFactory.create(req, remote);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java
index ab76e0f1ed..8a1884e5fc 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java
@@ -79,6 +79,7 @@ class InternalPushConnection<C> extends BasePackPushConnection {
}
worker = new Thread("JGit-Receive-Pack") { //$NON-NLS-1$
+ @Override
public void run() {
try {
final ReceivePack rp = receivePackFactory.create(req, remote);
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 fa27bfce5f..f445bcbcfb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschSession.java
@@ -87,10 +87,12 @@ public class JschSession implements RemoteSession {
this.uri = uri;
}
+ @Override
public Process exec(String command, int timeout) throws IOException {
return new JschProcess(command, timeout);
}
+ @Override
public void disconnect() {
if (sock.isConnected())
sock.disconnect();
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 38f3a2ac77..6051f39c01 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/OpenSshConfig.java
@@ -311,6 +311,7 @@ public class OpenSshConfig {
static String userName() {
return AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return System.getProperty("user.name"); //$NON-NLS-1$
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java
index 1e662751bc..8e395018cd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHook.java
@@ -62,6 +62,7 @@ import java.util.Collection;
public interface PostReceiveHook {
/** A simple no-op hook. */
public static final PostReceiveHook NULL = new PostReceiveHook() {
+ @Override
public void onPostReceive(final ReceivePack rp,
final Collection<ReceiveCommand> commands) {
// Do nothing.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHookChain.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHookChain.java
index da86525dcd..3bdcd68959 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHookChain.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHookChain.java
@@ -77,6 +77,7 @@ public class PostReceiveHookChain implements PostReceiveHook {
return new PostReceiveHookChain(newHooks, i);
}
+ @Override
public void onPostReceive(ReceivePack rp,
Collection<ReceiveCommand> commands) {
for (int i = 0; i < count; i++)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHook.java
index 53eeab1dff..5b37bcdf0c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHook.java
@@ -58,6 +58,7 @@ import org.eclipse.jgit.storage.pack.PackStatistics;
public interface PostUploadHook {
/** A simple no-op hook. */
public static final PostUploadHook NULL = new PostUploadHook() {
+ @Override
public void onPostUpload(PackStatistics stats) {
// Do nothing.
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHookChain.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHookChain.java
index 4e2eaeaff1..26323badc6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHookChain.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHookChain.java
@@ -78,6 +78,7 @@ public class PostUploadHookChain implements PostUploadHook {
return new PostUploadHookChain(newHooks, i);
}
+ @Override
public void onPostUpload(PackStatistics stats) {
for (int i = 0; i < count; i++)
hooks[i].onPostUpload(stats);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java
index 9a743a515b..27b2df08ce 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHook.java
@@ -78,6 +78,7 @@ import java.util.Collection;
public interface PreReceiveHook {
/** A simple no-op hook. */
public static final PreReceiveHook NULL = new PreReceiveHook() {
+ @Override
public void onPreReceive(final ReceivePack rp,
final Collection<ReceiveCommand> commands) {
// Do nothing.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHookChain.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHookChain.java
index bd4441fed7..7b1c8fb3f2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHookChain.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHookChain.java
@@ -76,6 +76,7 @@ public class PreReceiveHookChain implements PreReceiveHook {
return new PreReceiveHookChain(newHooks, i);
}
+ @Override
public void onPreReceive(ReceivePack rp,
Collection<ReceiveCommand> commands) {
for (int i = 0; i < count; i++)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHook.java
index 0360f120e0..7d9638cfc0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHook.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHook.java
@@ -58,12 +58,14 @@ import org.eclipse.jgit.lib.ObjectId;
public interface PreUploadHook {
/** A simple no-op hook. */
public static final PreUploadHook NULL = new PreUploadHook() {
+ @Override
public void onBeginNegotiateRound(UploadPack up,
Collection<? extends ObjectId> wants, int cntOffered)
throws ServiceMayNotContinueException {
// Do nothing.
}
+ @Override
public void onEndNegotiateRound(UploadPack up,
Collection<? extends ObjectId> wants, int cntCommon,
int cntNotFound, boolean ready)
@@ -71,6 +73,7 @@ public interface PreUploadHook {
// Do nothing.
}
+ @Override
public void onSendPack(UploadPack up,
Collection<? extends ObjectId> wants,
Collection<? extends ObjectId> haves)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHookChain.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHookChain.java
index 7f515e038c..c9f88dd164 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHookChain.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHookChain.java
@@ -79,6 +79,7 @@ public class PreUploadHookChain implements PreUploadHook {
return new PreUploadHookChain(newHooks, i);
}
+ @Override
public void onBeginNegotiateRound(UploadPack up,
Collection<? extends ObjectId> wants, int cntOffered)
throws ServiceMayNotContinueException {
@@ -86,6 +87,7 @@ public class PreUploadHookChain implements PreUploadHook {
hooks[i].onBeginNegotiateRound(up, wants, cntOffered);
}
+ @Override
public void onEndNegotiateRound(UploadPack up,
Collection<? extends ObjectId> wants, int cntCommon,
int cntNotFound, boolean ready)
@@ -94,6 +96,7 @@ public class PreUploadHookChain implements PreUploadHook {
hooks[i].onEndNegotiateRound(up, wants, cntCommon, cntNotFound, ready);
}
+ @Override
public void onSendPack(UploadPack up,
Collection<? extends ObjectId> wants,
Collection<? extends ObjectId> haves)
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java
index d436e08df1..706e727060 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateStore.java
@@ -140,6 +140,7 @@ public class PushCertificateStore implements AutoCloseable {
* If {@link #get(String)} was called, closes the cached object reader created
* by that method. Does not close the underlying repository.
*/
+ @Override
public void close() {
if (reader != null) {
reader.close();
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 393e25a2a8..169df3be26 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java
@@ -273,6 +273,7 @@ public class ReceivePack extends BaseReceivePack {
if (reportStatus) {
if (echoCommandFailures && msgOut != null) {
sendStatusReport(false, unpackError, new Reporter() {
+ @Override
void sendString(final String s) throws IOException {
msgOut.write(Constants.encode(s + "\n")); //$NON-NLS-1$
}
@@ -285,6 +286,7 @@ public class ReceivePack extends BaseReceivePack {
}
}
sendStatusReport(true, unpackError, new Reporter() {
+ @Override
void sendString(final String s) throws IOException {
pckOut.writeString(s + "\n"); //$NON-NLS-1$
}
@@ -292,6 +294,7 @@ public class ReceivePack extends BaseReceivePack {
pckOut.end();
} else if (msgOut != null) {
sendStatusReport(false, unpackError, new Reporter() {
+ @Override
void sendString(final String s) throws IOException {
msgOut.write(Constants.encode(s + "\n")); //$NON-NLS-1$
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefFilter.java
index e46195fc19..d4f85f2af5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefFilter.java
@@ -59,6 +59,7 @@ import org.eclipse.jgit.lib.Ref;
public interface RefFilter {
/** The default filter, allows all refs to be shown. */
public static final RefFilter DEFAULT = new RefFilter() {
+ @Override
public Map<String, Ref> filter (final Map<String, Ref> refs) {
return refs;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java
index 1440b83cf7..64f6c3fb97 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java
@@ -556,6 +556,7 @@ public class RefSpec implements Serializable {
return true;
}
+ @Override
public int hashCode() {
int hc = 0;
if (getSource() != null)
@@ -565,6 +566,7 @@ public class RefSpec implements Serializable {
return hc;
}
+ @Override
public boolean equals(final Object obj) {
if (!(obj instanceof RefSpec))
return false;
@@ -588,6 +590,7 @@ public class RefSpec implements Serializable {
return a.equals(b);
}
+ @Override
public String toString() {
final StringBuilder r = new StringBuilder();
if (isForceUpdate())
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SignedPushConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SignedPushConfig.java
index 942e7d7742..83b4acaea2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SignedPushConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SignedPushConfig.java
@@ -55,6 +55,7 @@ public class SignedPushConfig {
/** Key for {@link Config#get(SectionParser)}. */
public static final SectionParser<SignedPushConfig> KEY =
new SectionParser<SignedPushConfig>() {
+ @Override
public SignedPushConfig parse(Config cfg) {
return new SignedPushConfig(cfg);
}
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 72c9c8b93e..5507e9b057 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java
@@ -70,6 +70,7 @@ public class TransferConfig {
/** Key for {@link Config#get(SectionParser)}. */
public static final Config.SectionParser<TransferConfig> KEY = new SectionParser<TransferConfig>() {
+ @Override
public TransferConfig parse(final Config cfg) {
return new TransferConfig(cfg);
}
@@ -207,6 +208,7 @@ public class TransferConfig {
return RefFilter.DEFAULT;
return new RefFilter() {
+ @Override
public Map<String, Ref> filter(Map<String, Ref> refs) {
Map<String, Ref> result = new HashMap<String, Ref>();
for (Map.Entry<String, Ref> e : refs.entrySet()) {
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 64bdbe7d4a..269d11644b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
@@ -1447,5 +1447,6 @@ public abstract class Transport implements AutoCloseable {
* Implementers shouldn't throw checked exceptions. This override narrows
* the signature to prevent them from doing so.
*/
+ @Override
public abstract void close();
}
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 23c506b128..74d9e7ff45 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java
@@ -101,23 +101,28 @@ public class TransportAmazonS3 extends HttpTransport implements WalkTransport {
static final String S3_SCHEME = "amazon-s3"; //$NON-NLS-1$
static final TransportProtocol PROTO_S3 = new TransportProtocol() {
+ @Override
public String getName() {
return "Amazon S3"; //$NON-NLS-1$
}
+ @Override
public Set<String> getSchemes() {
return Collections.singleton(S3_SCHEME);
}
+ @Override
public Set<URIishField> getRequiredFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.USER,
URIishField.HOST, URIishField.PATH));
}
+ @Override
public Set<URIishField> getOptionalFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.PASS));
}
+ @Override
public Transport open(URIish uri, Repository local, String remoteName)
throws NotSupportedException {
return new TransportAmazonS3(local, uri);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleFile.java
index 9b0834133b..31d7909d1b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleFile.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleFile.java
@@ -74,6 +74,7 @@ class TransportBundleFile extends Transport implements TransportBundle {
return JGitText.get().transportProtoBundleFile;
}
+ @Override
public Set<String> getSchemes() {
return schemeSet;
}
@@ -106,6 +107,7 @@ class TransportBundleFile extends Transport implements TransportBundle {
return TransportLocal.PROTO_LOCAL.open(uri, local, remoteName);
}
+ @Override
public Transport open(URIish uri) throws NotSupportedException,
TransportException {
if ("bundle".equals(uri.getScheme())) { //$NON-NLS-1$
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 c6e4c50801..7bf5b947d8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
@@ -75,27 +75,33 @@ class TransportGitAnon extends TcpTransport implements PackTransport {
static final int GIT_PORT = Daemon.DEFAULT_PORT;
static final TransportProtocol PROTO_GIT = new TransportProtocol() {
+ @Override
public String getName() {
return JGitText.get().transportProtoGitAnon;
}
+ @Override
public Set<String> getSchemes() {
return Collections.singleton("git"); //$NON-NLS-1$
}
+ @Override
public Set<URIishField> getRequiredFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.HOST,
URIishField.PATH));
}
+ @Override
public Set<URIishField> getOptionalFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.PORT));
}
+ @Override
public int getDefaultPort() {
return GIT_PORT;
}
+ @Override
public Transport open(URIish uri, Repository local, String remoteName)
throws NotSupportedException {
return new TransportGitAnon(local, uri);
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 6bdf905e4f..49a2042d9b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
@@ -90,24 +90,29 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
.unmodifiableSet(new LinkedHashSet<String>(Arrays
.asList(schemeNames)));
+ @Override
public String getName() {
return JGitText.get().transportProtoSSH;
}
+ @Override
public Set<String> getSchemes() {
return schemeSet;
}
+ @Override
public Set<URIishField> getRequiredFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.HOST,
URIishField.PATH));
}
+ @Override
public Set<URIishField> getOptionalFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.USER,
URIishField.PASS, URIishField.PORT));
}
+ @Override
public int getDefaultPort() {
return 22;
}
@@ -124,6 +129,7 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
return super.canHandle(uri, local, remoteName);
}
+ @Override
public Transport open(URIish uri, Repository local, String remoteName)
throws NotSupportedException {
return new TransportGitSsh(local, uri);
@@ -215,6 +221,7 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
}
private class ExtSession implements RemoteSession {
+ @Override
public Process exec(String command, int timeout)
throws TransportException {
String ssh = SystemReader.getInstance().getenv("GIT_SSH"); //$NON-NLS-1$
@@ -250,6 +257,7 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
}
}
+ @Override
public void disconnect() {
// Nothing to do
}
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 fee9ae6a72..7c5289293c 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
@@ -157,61 +157,74 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
.unmodifiableSet(new LinkedHashSet<String>(Arrays
.asList(schemeNames)));
+ @Override
public String getName() {
return JGitText.get().transportProtoHTTP;
}
+ @Override
public Set<String> getSchemes() {
return schemeSet;
}
+ @Override
public Set<URIishField> getRequiredFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.HOST,
URIishField.PATH));
}
+ @Override
public Set<URIishField> getOptionalFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.USER,
URIishField.PASS, URIishField.PORT));
}
+ @Override
public int getDefaultPort() {
return 80;
}
+ @Override
public Transport open(URIish uri, Repository local, String remoteName)
throws NotSupportedException {
return new TransportHttp(local, uri);
}
+ @Override
public Transport open(URIish uri) throws NotSupportedException {
return new TransportHttp(uri);
}
};
static final TransportProtocol PROTO_FTP = new TransportProtocol() {
+ @Override
public String getName() {
return JGitText.get().transportProtoFTP;
}
+ @Override
public Set<String> getSchemes() {
return Collections.singleton("ftp"); //$NON-NLS-1$
}
+ @Override
public Set<URIishField> getRequiredFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.HOST,
URIishField.PATH));
}
+ @Override
public Set<URIishField> getOptionalFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.USER,
URIishField.PASS, URIishField.PORT));
}
+ @Override
public int getDefaultPort() {
return 21;
}
+ @Override
public Transport open(URIish uri, Repository local, String remoteName)
throws NotSupportedException {
return new TransportHttp(local, uri);
@@ -219,6 +232,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
};
private static final Config.SectionParser<HttpConfig> HTTP_KEY = new SectionParser<HttpConfig>() {
+ @Override
public HttpConfig parse(final Config cfg) {
return new HttpConfig(cfg);
}
@@ -863,6 +877,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
readAdvertisedRefs();
}
+ @Override
protected void doPush(final ProgressMonitor monitor,
final Map<String, RemoteRefUpdate> refUpdates,
OutputStream outputStream) throws TransportException {
@@ -975,16 +990,19 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
abstract void execute() throws IOException;
class HttpExecuteStream extends InputStream {
+ @Override
public int read() throws IOException {
execute();
return -1;
}
+ @Override
public int read(byte[] b, int off, int len) throws IOException {
execute();
return -1;
}
+ @Override
public long skip(long n) throws IOException {
execute();
return 0;
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 1528c71426..32582ec48a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
@@ -100,6 +100,7 @@ class TransportLocal extends Transport implements PackTransport {
return JGitText.get().transportProtoLocal;
}
+ @Override
public Set<String> getSchemes() {
return Collections.singleton("file"); //$NON-NLS-1$
}
@@ -132,6 +133,7 @@ class TransportLocal extends Transport implements PackTransport {
return new TransportLocal(local, uri, gitDir);
}
+ @Override
public Transport open(URIish uri) throws NotSupportedException,
TransportException {
File path = FS.DETECTED.resolve(new File("."), uri.getPath()); //$NON-NLS-1$
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 fa073ae2af..b99378dc91 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
@@ -99,28 +99,34 @@ import com.jcraft.jsch.SftpException;
*/
public class TransportSftp extends SshTransport implements WalkTransport {
static final TransportProtocol PROTO_SFTP = new TransportProtocol() {
+ @Override
public String getName() {
return JGitText.get().transportProtoSFTP;
}
+ @Override
public Set<String> getSchemes() {
return Collections.singleton("sftp"); //$NON-NLS-1$
}
+ @Override
public Set<URIishField> getRequiredFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.HOST,
URIishField.PATH));
}
+ @Override
public Set<URIishField> getOptionalFields() {
return Collections.unmodifiableSet(EnumSet.of(URIishField.USER,
URIishField.PASS, URIishField.PORT));
}
+ @Override
public int getDefaultPort() {
return 22;
}
+ @Override
public Transport open(URIish uri, Repository local, String remoteName)
throws NotSupportedException {
return new TransportSftp(local, uri);
@@ -251,6 +257,7 @@ public class TransportSftp extends SshTransport implements WalkTransport {
}
Collections.sort(packs, new Comparator<String>() {
+ @Override
public int compare(final String o1, final String o2) {
return mtimes.get(o2).intValue()
- mtimes.get(o1).intValue();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
index 3c5c8daddd..ffd4d41f2a 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
@@ -560,6 +560,7 @@ public class URIish implements Serializable {
return r;
}
+ @Override
public int hashCode() {
int hc = 0;
if (getScheme() != null)
@@ -577,6 +578,7 @@ public class URIish implements Serializable {
return hc;
}
+ @Override
public boolean equals(final Object obj) {
if (!(obj instanceof URIish))
return false;
@@ -615,6 +617,7 @@ public class URIish implements Serializable {
return format(true, false);
}
+ @Override
public String toString() {
return format(false, false);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
index 201fb18740..3177b32e61 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -1215,6 +1215,7 @@ public class UploadPack {
*/
public static final class AdvertisedRequestValidator
implements RequestValidator {
+ @Override
public void checkWants(UploadPack up, List<ObjectId> wants)
throws PackProtocolException, IOException {
if (!up.isBiDirectionalPipe())
@@ -1231,6 +1232,7 @@ public class UploadPack {
*/
public static final class ReachableCommitRequestValidator
implements RequestValidator {
+ @Override
public void checkWants(UploadPack up, List<ObjectId> wants)
throws PackProtocolException, IOException {
checkNotAdvertisedWants(up.getRevWalk(), wants,
@@ -1244,6 +1246,7 @@ public class UploadPack {
* @since 3.1
*/
public static final class TipRequestValidator implements RequestValidator {
+ @Override
public void checkWants(UploadPack up, List<ObjectId> wants)
throws PackProtocolException, IOException {
if (!up.isBiDirectionalPipe())
@@ -1266,6 +1269,7 @@ public class UploadPack {
*/
public static final class ReachableCommitTipRequestValidator
implements RequestValidator {
+ @Override
public void checkWants(UploadPack up, List<ObjectId> wants)
throws PackProtocolException, IOException {
checkNotAdvertisedWants(up.getRevWalk(), wants,
@@ -1279,6 +1283,7 @@ public class UploadPack {
* @since 3.1
*/
public static final class AnyRequestValidator implements RequestValidator {
+ @Override
public void checkWants(UploadPack up, List<ObjectId> wants)
throws PackProtocolException, IOException {
// All requests are valid.
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java
index 0588634d2a..afc9965183 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLogger.java
@@ -59,6 +59,7 @@ import org.eclipse.jgit.internal.storage.pack.PackWriter;
public interface UploadPackLogger { // TODO remove in JGit 5.0
/** A simple no-op logger. */
public static final UploadPackLogger NULL = new UploadPackLogger() {
+ @Override
public void onPackStatistics(PackWriter.Statistics stats) {
// Do nothing.
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLoggerChain.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLoggerChain.java
index 4ea0319d9c..9a8c12c648 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLoggerChain.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPackLoggerChain.java
@@ -84,6 +84,7 @@ public class UploadPackLoggerChain implements UploadPackLogger {
/**
* @since 3.0
*/
+ @Override
public void onPackStatistics(PackWriter.Statistics stats) {
for (int i = 0; i < count; i++)
loggers[i].onPackStatistics(stats);
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 13d4a24b02..0319d93865 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java
@@ -223,6 +223,7 @@ class WalkFetchConnection extends BaseFetchConnection {
workQueue = new LinkedList<ObjectId>();
}
+ @Override
public boolean didFetchTestConnectivity() {
return true;
}
@@ -248,10 +249,12 @@ class WalkFetchConnection extends BaseFetchConnection {
}
}
+ @Override
public Collection<PackLock> getPackLocks() {
return packLocks;
}
+ @Override
public void setPackLockMessage(final String message) {
lockMessage = message;
}
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 7b449c752a..39f11f96e3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java
@@ -134,12 +134,14 @@ class WalkPushConnection extends BaseConnection implements PushConnection {
dest = w;
}
+ @Override
public void push(final ProgressMonitor monitor,
final Map<String, RemoteRefUpdate> refUpdates)
throws TransportException {
push(monitor, refUpdates, null);
}
+ @Override
public void push(final ProgressMonitor monitor,
final Map<String, RemoteRefUpdate> refUpdates, OutputStream out)
throws TransportException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java
index ed37feab3f..534e3d734f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnection.java
@@ -94,95 +94,118 @@ public class JDKHttpConnection implements HttpConnection {
.openConnection(proxy);
}
+ @Override
public int getResponseCode() throws IOException {
return wrappedUrlConnection.getResponseCode();
}
+ @Override
public URL getURL() {
return wrappedUrlConnection.getURL();
}
+ @Override
public String getResponseMessage() throws IOException {
return wrappedUrlConnection.getResponseMessage();
}
+ @Override
public Map<String, List<String>> getHeaderFields() {
return wrappedUrlConnection.getHeaderFields();
}
+ @Override
public void setRequestProperty(String key, String value) {
wrappedUrlConnection.setRequestProperty(key, value);
}
+ @Override
public void setRequestMethod(String method) throws ProtocolException {
wrappedUrlConnection.setRequestMethod(method);
}
+ @Override
public void setUseCaches(boolean usecaches) {
wrappedUrlConnection.setUseCaches(usecaches);
}
+ @Override
public void setConnectTimeout(int timeout) {
wrappedUrlConnection.setConnectTimeout(timeout);
}
+ @Override
public void setReadTimeout(int timeout) {
wrappedUrlConnection.setReadTimeout(timeout);
}
+ @Override
public String getContentType() {
return wrappedUrlConnection.getContentType();
}
+ @Override
public InputStream getInputStream() throws IOException {
return wrappedUrlConnection.getInputStream();
}
+ @Override
public String getHeaderField(String name) {
return wrappedUrlConnection.getHeaderField(name);
}
+ @Override
public int getContentLength() {
return wrappedUrlConnection.getContentLength();
}
+ @Override
public void setInstanceFollowRedirects(boolean followRedirects) {
wrappedUrlConnection.setInstanceFollowRedirects(followRedirects);
}
+ @Override
public void setDoOutput(boolean dooutput) {
wrappedUrlConnection.setDoOutput(dooutput);
}
+ @Override
public void setFixedLengthStreamingMode(int contentLength) {
wrappedUrlConnection.setFixedLengthStreamingMode(contentLength);
}
+ @Override
public OutputStream getOutputStream() throws IOException {
return wrappedUrlConnection.getOutputStream();
}
+ @Override
public void setChunkedStreamingMode(int chunklen) {
wrappedUrlConnection.setChunkedStreamingMode(chunklen);
}
+ @Override
public String getRequestMethod() {
return wrappedUrlConnection.getRequestMethod();
}
+ @Override
public boolean usingProxy() {
return wrappedUrlConnection.usingProxy();
}
+ @Override
public void connect() throws IOException {
wrappedUrlConnection.connect();
}
+ @Override
public void setHostnameVerifier(HostnameVerifier hostnameverifier) {
((HttpsURLConnection) wrappedUrlConnection)
.setHostnameVerifier(hostnameverifier);
}
+ @Override
public void configure(KeyManager[] km, TrustManager[] tm,
SecureRandom random) throws NoSuchAlgorithmException,
KeyManagementException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnectionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnectionFactory.java
index d1c875d40f..b9f009f1b7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnectionFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/JDKHttpConnectionFactory.java
@@ -52,10 +52,12 @@ import java.net.URL;
* @since 3.3
*/
public class JDKHttpConnectionFactory implements HttpConnectionFactory {
+ @Override
public HttpConnection create(URL url) throws IOException {
return new JDKHttpConnection(url);
}
+ @Override
public HttpConnection create(URL url, Proxy proxy)
throws IOException {
return new JDKHttpConnection(url, proxy);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/FileResolver.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/FileResolver.java
index 6964e7fa28..44d90aba00 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/FileResolver.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/FileResolver.java
@@ -91,6 +91,7 @@ public class FileResolver<C> implements RepositoryResolver<C> {
setExportAll(exportAll);
}
+ @Override
public Repository open(final C req, final String name)
throws RepositoryNotFoundException, ServiceNotEnabledException {
if (isUnreasonableName(name))
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/ReceivePackFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/ReceivePackFactory.java
index 4cf49f5531..73c2ed80c9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/ReceivePackFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/ReceivePackFactory.java
@@ -55,6 +55,7 @@ import org.eclipse.jgit.transport.ReceivePack;
public interface ReceivePackFactory<C> {
/** A factory disabling the ReceivePack service for all repositories */
public static final ReceivePackFactory<?> DISABLED = new ReceivePackFactory<Object>() {
+ @Override
public ReceivePack create(Object req, Repository db)
throws ServiceNotEnabledException {
throw new ServiceNotEnabledException();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/RepositoryResolver.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/RepositoryResolver.java
index c7f0d32cb4..80211e5812 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/RepositoryResolver.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/RepositoryResolver.java
@@ -56,6 +56,7 @@ import org.eclipse.jgit.transport.ServiceMayNotContinueException;
public interface RepositoryResolver<C> {
/** Resolver configured to open nothing. */
public static final RepositoryResolver<?> NONE = new RepositoryResolver<Object>() {
+ @Override
public Repository open(Object req, String name)
throws RepositoryNotFoundException {
throw new RepositoryNotFoundException(name);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/UploadPackFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/UploadPackFactory.java
index f0d2ba865b..d7ed0f68cf 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/UploadPackFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/resolver/UploadPackFactory.java
@@ -55,6 +55,7 @@ import org.eclipse.jgit.transport.UploadPack;
public interface UploadPackFactory<C> {
/** A factory disabling the UploadPack service for all repositories. */
public static final UploadPackFactory<?> DISABLED = new UploadPackFactory<Object>() {
+ @Override
public UploadPack create(Object req, Repository db)
throws ServiceNotEnabledException {
throw new ServiceNotEnabledException();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java
index c038f07725..2d6abd1ad0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java
@@ -249,6 +249,7 @@ public class CanonicalTreeParser extends AbstractTreeIterator {
return p;
}
+ @Override
public CanonicalTreeParser createSubtreeIterator(final ObjectReader reader)
throws IncorrectObjectTypeException, IOException {
return createSubtreeIterator(reader, new MutableObjectId());
@@ -280,6 +281,7 @@ public class CanonicalTreeParser extends AbstractTreeIterator {
return currPtr == 0;
}
+ @Override
public boolean eof() {
return currPtr == raw.length;
}
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 b9293ebfb6..c0b29ef930 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/NameConflictTreeWalk.java
@@ -353,6 +353,7 @@ public class NameConflictTreeWalk extends TreeWalk {
dfConflict = null;
}
+ @Override
void stopWalk() throws IOException {
if (!needsStopWalk()) {
return;
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 5dfebe9ca7..01156c338d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java
@@ -559,6 +559,7 @@ public class TreeWalk implements AutoCloseable, AttributesProvider {
* @return a {@link Set} of {@link Attribute}s that match the current entry.
* @since 4.2
*/
+ @Override
public Attributes getAttributes() {
if (attrs != null)
return attrs;
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 52477cb573..4eb530e981 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java
@@ -715,6 +715,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
}
private static final Comparator<Entry> ENTRY_CMP = new Comparator<Entry>() {
+ @Override
public int compare(Entry a, Entry b) {
return Paths.compare(
a.encodedName, 0, a.encodedNameLen, a.getMode().getBits(),
@@ -1154,6 +1155,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator {
b.get(encodedName = new byte[encodedNameLen]);
}
+ @Override
public String toString() {
return getMode().toString() + " " + getName(); //$NON-NLS-1$
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeOptions.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeOptions.java
index 112ce8fb9f..7d2b33f43d 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeOptions.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeOptions.java
@@ -56,6 +56,7 @@ import org.eclipse.jgit.lib.CoreConfig.SymLinks;
public class WorkingTreeOptions {
/** Key for {@link Config#get(SectionParser)}. */
public static final Config.SectionParser<WorkingTreeOptions> KEY = new SectionParser<WorkingTreeOptions>() {
+ @Override
public WorkingTreeOptions parse(final Config cfg) {
return new WorkingTreeOptions(cfg);
}
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 d85ea8cc5d..103b0e2270 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
@@ -113,6 +113,7 @@ public class PathFilter extends TreeFilter {
return this;
}
+ @Override
@SuppressWarnings("nls")
public String toString() {
return "PATH(\"" + pathStr + "\")";
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 7601956c43..174a4f5b06 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
@@ -173,6 +173,7 @@ public class PathFilterGroup {
return this;
}
+ @Override
public String toString() {
return "FAST_" + path.toString(); //$NON-NLS-1$
}
@@ -267,6 +268,7 @@ public class PathFilterGroup {
return this;
}
+ @Override
public String toString() {
final StringBuilder r = new StringBuilder();
r.append("FAST("); //$NON-NLS-1$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java
index 7d99e58f38..9f468ec3f6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/TreeFilter.java
@@ -220,6 +220,7 @@ public abstract class TreeFilter {
*
* @return another copy of this filter, suitable for another thread.
*/
+ @Override
public abstract TreeFilter clone();
@Override
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/BlockList.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/BlockList.java
index 9d0ad736fa..c86c588acd 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/BlockList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/BlockList.java
@@ -309,10 +309,12 @@ public class BlockList<T> extends AbstractList<T> {
private T[] block = directory[0];
+ @Override
public boolean hasNext() {
return index < size;
}
+ @Override
public T next() {
if (size <= index)
throw new NoSuchElementException();
@@ -329,6 +331,7 @@ public class BlockList<T> extends AbstractList<T> {
return res;
}
+ @Override
public void remove() {
if (index == 0)
throw new IllegalStateException();
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 2f570ee51c..f189b3586b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -409,6 +409,7 @@ public abstract class FS {
protected File userHomeImpl() {
final String home = AccessController
.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return System.getProperty("user.home"); //$NON-NLS-1$
}
@@ -1342,6 +1343,7 @@ public abstract class FS {
this.out = output;
}
+ @Override
public void run() {
try {
copy();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java
index 0e9172e8c0..dffd665691 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32.java
@@ -83,18 +83,22 @@ public class FS_Win32 extends FS {
super(src);
}
+ @Override
public FS newInstance() {
return new FS_Win32(this);
}
+ @Override
public boolean supportsExecute() {
return false;
}
+ @Override
public boolean canExecute(final File f) {
return false;
}
+ @Override
public boolean setExecute(final File f, final boolean canExec) {
return false;
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
index f8ea5d0aa6..e62083e9c5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
@@ -77,6 +77,7 @@ public class FS_Win32_Cygwin extends FS_Win32 {
public static boolean isCygwin() {
final String path = AccessController
.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return System.getProperty("java.library.path"); //$NON-NLS-1$
}
@@ -106,10 +107,12 @@ public class FS_Win32_Cygwin extends FS_Win32 {
super(src);
}
+ @Override
public FS newInstance() {
return new FS_Win32_Cygwin(this);
}
+ @Override
public File resolve(final File dir, final String pn) {
String useCygPath = System.getProperty("jgit.usecygpath"); //$NON-NLS-1$
if (useCygPath != null && useCygPath.equals("true")) { //$NON-NLS-1$
@@ -133,6 +136,7 @@ public class FS_Win32_Cygwin extends FS_Win32 {
protected File userHomeImpl() {
final String home = AccessController
.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return System.getenv("HOME"); //$NON-NLS-1$
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java
index 7bc3c88c5d..4aafa3a2c4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/GitDateParser.java
@@ -75,6 +75,7 @@ public class GitDateParser {
private static ThreadLocal<Map<Locale, Map<ParseableSimpleDateFormat, SimpleDateFormat>>> formatCache =
new ThreadLocal<Map<Locale, Map<ParseableSimpleDateFormat, SimpleDateFormat>>>() {
+ @Override
protected Map<Locale, Map<ParseableSimpleDateFormat, SimpleDateFormat>> initialValue() {
return new HashMap<Locale, Map<ParseableSimpleDateFormat, SimpleDateFormat>>();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java
index 9f828adc20..13e61a7972 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java
@@ -303,15 +303,18 @@ public class HttpSupport {
}
private static class DummyX509TrustManager implements X509TrustManager {
+ @Override
public X509Certificate[] getAcceptedIssuers() {
return null;
}
+ @Override
public void checkClientTrusted(X509Certificate[] certs,
String authType) {
// no check
}
+ @Override
public void checkServerTrusted(X509Certificate[] certs,
String authType) {
// no check
@@ -319,6 +322,7 @@ public class HttpSupport {
}
private static class DummyHostnameVerifier implements HostnameVerifier {
+ @Override
public boolean verify(String hostname, SSLSession session) {
// always accept
return true;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java
index f7688e3609..658dd06d46 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java
@@ -138,6 +138,7 @@ public class IntList {
entries = n;
}
+ @Override
public String toString() {
final StringBuilder r = new StringBuilder();
r.append('[');
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/LongList.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/LongList.java
index dc4004fcef..e3639f5c65 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/LongList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/LongList.java
@@ -159,6 +159,7 @@ public class LongList {
entries = n;
}
+ @Override
public String toString() {
final StringBuilder r = new StringBuilder();
r.append('[');
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawCharSequence.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawCharSequence.java
index 4eeecdbf2d..e85bd659b4 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawCharSequence.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawCharSequence.java
@@ -74,14 +74,17 @@ public final class RawCharSequence implements CharSequence {
endPtr = end;
}
+ @Override
public char charAt(final int index) {
return (char) (buffer[startPtr + index] & 0xff);
}
+ @Override
public int length() {
return endPtr - startPtr;
}
+ @Override
public CharSequence subSequence(final int start, final int end) {
return new RawCharSequence(buffer, startPtr + start, startPtr + end);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java
index 0853e95366..96c1a89f2b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java
@@ -100,20 +100,24 @@ public class RefList<T extends Ref> implements Iterable<Ref> {
this.cnt = src.cnt;
}
+ @Override
public Iterator<Ref> iterator() {
return new Iterator<Ref>() {
private int idx;
+ @Override
public boolean hasNext() {
return idx < cnt;
}
+ @Override
public Ref next() {
if (idx < cnt)
return list[idx++];
throw new NoSuchElementException();
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java
index c72727b542..510e81821e 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java
@@ -304,12 +304,14 @@ public class RefMap extends AbstractMap<String, Ref> {
}
}
+ @Override
public boolean hasNext() {
if (next == null)
next = peek();
return next != null;
}
+ @Override
public Entry<String, Ref> next() {
if (hasNext()) {
Entry<String, Ref> r = next;
@@ -367,6 +369,7 @@ public class RefMap extends AbstractMap<String, Ref> {
return null;
}
+ @Override
public void remove() {
throw new UnsupportedOperationException();
}
@@ -379,14 +382,17 @@ public class RefMap extends AbstractMap<String, Ref> {
this.ref = ref;
}
+ @Override
public String getKey() {
return toMapKey(ref);
}
+ @Override
public Ref getValue() {
return ref;
}
+ @Override
public Ref setValue(Ref value) {
Ref prior = put(getKey(), value);
ref = value;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
index b36fc2391a..2cd8035854 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SystemReader.java
@@ -87,22 +87,27 @@ public abstract class SystemReader {
private static class Default extends SystemReader {
private volatile String hostname;
+ @Override
public String getenv(String variable) {
return System.getenv(variable);
}
+ @Override
public String getProperty(String key) {
return System.getProperty(key);
}
+ @Override
public FileBasedConfig openSystemConfig(Config parent, FS fs) {
File configFile = fs.getGitSystemConfig();
if (configFile == null) {
return new FileBasedConfig(null, fs) {
+ @Override
public void load() {
// empty, do not load
}
+ @Override
public boolean isOutdated() {
// regular class would bomb here
return false;
@@ -112,11 +117,13 @@ public abstract class SystemReader {
return new FileBasedConfig(parent, configFile, fs);
}
+ @Override
public FileBasedConfig openUserConfig(Config parent, FS fs) {
final File home = fs.userHome();
return new FileBasedConfig(parent, new File(home, ".gitconfig"), fs); //$NON-NLS-1$
}
+ @Override
public String getHostname() {
if (hostname == null) {
try {
@@ -331,6 +338,7 @@ public abstract class SystemReader {
private String getOsName() {
return AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return getProperty("os.name"); //$NON-NLS-1$
}
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 57bcfbd5e5..9509db0db2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/TemporaryBuffer.java
@@ -363,6 +363,7 @@ public abstract class TemporaryBuffer extends OutputStream {
overflow.write(last.buffer, 0, last.count);
}
+ @Override
public void close() throws IOException {
if (overflow != null) {
try {
@@ -441,11 +442,13 @@ public abstract class TemporaryBuffer extends OutputStream {
this.directory = directory;
}
+ @Override
protected OutputStream overflow() throws IOException {
onDiskFile = File.createTempFile("jgit_", ".buf", directory); //$NON-NLS-1$ //$NON-NLS-2$
return new BufferedOutputStream(new FileOutputStream(onDiskFile));
}
+ @Override
public long length() {
if (onDiskFile == null) {
return super.length();
@@ -453,6 +456,7 @@ public abstract class TemporaryBuffer extends OutputStream {
return onDiskFile.length();
}
+ @Override
public byte[] toByteArray() throws IOException {
if (onDiskFile == null) {
return super.toByteArray();
@@ -471,6 +475,7 @@ public abstract class TemporaryBuffer extends OutputStream {
return out;
}
+ @Override
public void writeTo(final OutputStream os, ProgressMonitor pm)
throws IOException {
if (onDiskFile == 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 1024380264..0c5edb0070 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
@@ -176,6 +176,7 @@ public final class InterruptTimer {
callingThread = Thread.currentThread();
}
+ @Override
public synchronized void run() {
while (!terminated && callingThread.isAlive()) {
try {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeInputStream.java
index 6adadbbb82..a7a0347401 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeInputStream.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeInputStream.java
@@ -115,6 +115,7 @@ public class TeeInputStream extends InputStream {
return n;
}
+ @Override
public void close() throws IOException {
byte[] b = skipBuffer();
for (;;) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/ThrowingPrintWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/ThrowingPrintWriter.java
index c34c1fb681..5eca0d99e1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/ThrowingPrintWriter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/ThrowingPrintWriter.java
@@ -69,6 +69,7 @@ public class ThrowingPrintWriter extends Writer {
public ThrowingPrintWriter(Writer out) {
this.out = out;
LF = AccessController.doPrivileged(new PrivilegedAction<String>() {
+ @Override
public String run() {
return SystemReader.getInstance().getProperty("line.separator"); //$NON-NLS-1$
}