From 7b955048eb86e1c12114554beacb27b329252b15 Mon Sep 17 00:00:00 2001 From: Antoine Musso Date: Wed, 31 May 2023 17:57:28 +0200 Subject: [PATCH] Fix all Javadoc warnings and fail on them This fixes all the javadoc warnings, stops ignoring doclint 'missing' category and fails the build on javadoc warnings for public and protected classes and class members. Since javadoc doesn't allow access specifiers when specifying doclint configuration we cannot set `-Xdoclint:all,-missing/private` hence there is no simple way to skip private elements from doclint. Therefore we check javadoc using the Eclipse Java compiler (which is used by default) and javadoc configuration in `.settings/org.eclipse.jdt.core.prefs` files. This allows more fine grained configuration. We can reconsider this when javadoc starts supporting access specifiers in the doclint configuration. Below are detailled explanations for most modifications. @inheritDoc =========== doclint complains about explicits `{@inheritDoc}` when the parent does not have any documentation. As far as I can tell, javadoc defaults to inherit comments and should only be used when one wants to append extra documentation from the parent. Given the parent has no documentation, remove those usages which doclint complains about. In some case I have moved up the documentation from the concrete class up to the abstract class. Remove `{@inheritDoc}` on overriden methods which don't add additional documentation since javadoc defaults to inherit javadoc of overridden methods. @value to @link =============== In PackConfig, DEFAULT_SEARCH_FOR_REUSE_TIMEOUT and similar are forged from Integer.MAX_VALUE and are thus not considered constants (I guess cause the value would depends on the platform). Replace it with a link to `Integer.MAX_VALUE`. In `StringUtils.toBoolean`, @value was used to refer to the `stringValue` parameter. I have replaced it with `{@code stringValue}`. {@link } to ==================== @link does not support being given an external URL. Replaces them with HTML ``. @since: being invalid ===================== org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java has an invalid tag `@since: ` due to the extra `:`. Javadoc does not complain about it with version 11.0.18+10 but does with 11.0.19.7. It is invalid regardless. invalid HTML syntax =================== - javadoc doesn't allow
,

and

anymore, use
and

instead - replace code by {@code code} - tags don't allow summary attribute, specify caption as to fix this doclint visibility issue ======================== In the private abstract classes `BaseDirCacheEditor` and `BasePackConnection` links to other methods in the abstract class are inherited in the public subclasses but doclint gets confused and considers them unreachable. The HTML documentation for the sub classes shows the relative links in the sub classes, so it is all correct. It must be a bug somewhere in javadoc. Mute those warnings with: @SuppressWarnings("doclint:missing") Misc ==== Replace `<` and `>` with HTML encoded entities (`< and `>`). In `SshConstants` I went enclosing a serie of -> arrows in @literal. Additional tags =============== Configure maven-javad0c-plugin to allow the following additional tags defined in https://openjdk.org/jeps/8068562: - apiNote - implSpec - implNote Missing javadoc =============== Add missing @params and descriptions Change-Id: I840056389aa59135cfb360da0d5e40463ce35bd0 Also-By: Matthias Sohn --- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../eclipse/jgit/ant/tasks/GitAddTask.java | 1 - .../jgit/ant/tasks/GitCheckoutTask.java | 1 - .../eclipse/jgit/ant/tasks/GitCloneTask.java | 1 - .../eclipse/jgit/ant/tasks/GitInitTask.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../org/eclipse/jgit/archive/BaseFormat.java | 1 + .../org/eclipse/jgit/archive/TarFormat.java | 6 -- .../org/eclipse/jgit/archive/Tbz2Format.java | 6 -- .../org/eclipse/jgit/archive/TgzFormat.java | 6 -- .../org/eclipse/jgit/archive/TxzFormat.java | 6 -- .../org/eclipse/jgit/archive/ZipFormat.java | 6 -- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../internal/BouncyCastleGpgKeyLocator.java | 10 +++- .../BouncyCastleGpgKeyPassphrasePrompt.java | 3 + .../jgit/gpg/bc/internal/keys/KeyGrip.java | 4 +- .../gpg/bc/internal/keys/SExprParser.java | 4 ++ .../jgit/gpg/bc/internal/keys/SecretKeys.java | 1 + .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../http/apache/HttpClientConnection.java | 33 ++++------- .../http/apache/TemporaryBufferEntity.java | 7 +-- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../jgit/http/server/AsIsFileFilter.java | 3 - .../eclipse/jgit/http/server/GitFilter.java | 2 - .../eclipse/jgit/http/server/GitServlet.java | 1 - .../jgit/http/server/InfoPacksServlet.java | 1 - .../jgit/http/server/InfoRefsServlet.java | 1 - .../jgit/http/server/IsLocalFilter.java | 3 - .../jgit/http/server/NoCacheFilter.java | 3 - .../jgit/http/server/ObjectFileServlet.java | 2 - .../http/server/ReceivePackErrorHandler.java | 3 + .../jgit/http/server/ReceivePackServlet.java | 1 - .../jgit/http/server/RepositoryFilter.java | 3 - .../jgit/http/server/SmartOutputStream.java | 2 - .../http/server/SmartServiceInfoRefs.java | 35 +++++++---- .../jgit/http/server/TextFileServlet.java | 1 - .../http/server/UploadPackErrorHandler.java | 4 ++ .../jgit/http/server/UploadPackServlet.java | 1 - .../jgit/http/server/glue/ErrorServlet.java | 1 - .../jgit/http/server/glue/MetaFilter.java | 3 - .../jgit/http/server/glue/MetaServlet.java | 3 - .../server/glue/NoParameterFilterConfig.java | 4 -- .../http/server/glue/RegexGroupFilter.java | 3 - .../jgit/http/server/glue/RegexPipeline.java | 1 - .../http/server/glue/ServletBinderImpl.java | 2 - .../jgit/http/server/glue/SuffixPipeline.java | 1 - .../jgit/http/server/glue/WrappedRequest.java | 3 - .../resolver/DefaultReceivePackFactory.java | 1 - .../resolver/DefaultUploadPackFactory.java | 1 - .../RefsUnreadableInMemoryRepository.java | 6 -- .../http/test/TestRepositoryResolver.java | 1 - .../eclipse/jgit/junit/http/AccessEvent.java | 1 - .../eclipse/jgit/junit/http/AppServer.java | 2 + .../eclipse/jgit/junit/http/HttpTestCase.java | 27 ++++++++- .../jgit/junit/http/MockServletConfig.java | 6 +- .../jgit/junit/http/RecordingLogger.java | 1 + .../jgit/junit/http/SimpleHttpServer.java | 5 ++ .../jgit/junit/http/TestRequestLog.java | 1 - .../jgit/junit/ssh/SshTestGitServer.java | 6 ++ .../jgit/junit/ssh/SshTestHarness.java | 1 + .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../org/eclipse/jgit/junit/JGitTestUtil.java | 21 +++++++ .../junit/LocalDiskRepositoryTestCase.java | 10 +++- .../eclipse/jgit/junit/MockSystemReader.java | 14 +---- .../src/org/eclipse/jgit/junit/Repeat.java | 2 + .../org/eclipse/jgit/junit/RepeatRule.java | 1 - .../jgit/junit/RepositoryTestCase.java | 53 +++++++++++++++-- .../eclipse/jgit/junit/StrictWorkMonitor.java | 5 -- .../eclipse/jgit/junit/TestRepository.java | 59 +++++++++++++++---- .../jgit/junit/time/MonotonicFakeClock.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../jgit/lfs/server/LargeFileRepository.java | 1 + .../jgit/lfs/server/LfsProtocolServlet.java | 1 - .../jgit/lfs/server/fs/FileLfsRepository.java | 13 ++-- .../lfs/server/fs/ObjectDownloadListener.java | 5 +- .../lfs/server/fs/ObjectUploadListener.java | 5 +- .../jgit/lfs/server/s3/S3Repository.java | 4 -- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../src/org/eclipse/jgit/lfs/CleanFilter.java | 1 - .../src/org/eclipse/jgit/lfs/LfsPointer.java | 2 +- .../org/eclipse/jgit/lfs/SmudgeFilter.java | 2 +- .../internal/AtomicObjectOutputStream.java | 6 +- .../eclipse/jgit/lfs/internal/LfsConfig.java | 6 ++ .../lfs/internal/LfsConnectionFactory.java | 2 + .../jgit/lfs/lib/AbbreviatedLongObjectId.java | 3 - .../eclipse/jgit/lfs/lib/AnyLongObjectId.java | 3 - .../jgit/lfs/lib/LfsPointerFilter.java | 3 - .../eclipse/jgit/lfs/lib/LongObjectId.java | 1 - .../jgit/lfs/lib/MutableLongObjectId.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../jgit/console/ConsoleAuthenticator.java | 1 - .../console/ConsoleCredentialsProvider.java | 3 - .../src/org/eclipse/jgit/pgm/Add.java | 1 - .../org/eclipse/jgit/pgm/AmazonS3Client.java | 2 - .../src/org/eclipse/jgit/pgm/Archive.java | 1 - .../src/org/eclipse/jgit/pgm/Blame.java | 1 - .../src/org/eclipse/jgit/pgm/Branch.java | 1 - .../src/org/eclipse/jgit/pgm/Checkout.java | 1 - .../src/org/eclipse/jgit/pgm/Clean.java | 1 - .../src/org/eclipse/jgit/pgm/Clone.java | 5 -- .../src/org/eclipse/jgit/pgm/CommandRef.java | 1 - .../src/org/eclipse/jgit/pgm/Commit.java | 1 - .../src/org/eclipse/jgit/pgm/Config.java | 1 - .../eclipse/jgit/pgm/ConvertRefStorage.java | 1 - .../src/org/eclipse/jgit/pgm/Daemon.java | 2 - .../src/org/eclipse/jgit/pgm/Describe.java | 1 - .../src/org/eclipse/jgit/pgm/Diff.java | 2 - .../src/org/eclipse/jgit/pgm/DiffTree.java | 1 - .../src/org/eclipse/jgit/pgm/Fetch.java | 2 - .../src/org/eclipse/jgit/pgm/Gc.java | 1 - .../src/org/eclipse/jgit/pgm/Glog.java | 3 - .../src/org/eclipse/jgit/pgm/IndexPack.java | 1 - .../src/org/eclipse/jgit/pgm/Init.java | 2 - .../src/org/eclipse/jgit/pgm/Log.java | 12 +++- .../src/org/eclipse/jgit/pgm/LsRemote.java | 2 - .../src/org/eclipse/jgit/pgm/LsTree.java | 1 - .../src/org/eclipse/jgit/pgm/Main.java | 4 ++ .../src/org/eclipse/jgit/pgm/Merge.java | 1 - .../src/org/eclipse/jgit/pgm/MergeBase.java | 1 - .../src/org/eclipse/jgit/pgm/Push.java | 1 - .../src/org/eclipse/jgit/pgm/ReceivePack.java | 2 - .../src/org/eclipse/jgit/pgm/Reflog.java | 1 - .../src/org/eclipse/jgit/pgm/Remote.java | 2 - .../src/org/eclipse/jgit/pgm/Repo.java | 1 - .../src/org/eclipse/jgit/pgm/Reset.java | 1 - .../src/org/eclipse/jgit/pgm/RevList.java | 2 - .../src/org/eclipse/jgit/pgm/RevParse.java | 1 - .../eclipse/jgit/pgm/RevWalkTextBuiltin.java | 7 ++- .../src/org/eclipse/jgit/pgm/Rm.java | 1 - .../src/org/eclipse/jgit/pgm/Show.java | 2 - .../src/org/eclipse/jgit/pgm/ShowRef.java | 1 - .../src/org/eclipse/jgit/pgm/Status.java | 32 +++++----- .../src/org/eclipse/jgit/pgm/Tag.java | 1 - .../src/org/eclipse/jgit/pgm/TextBuiltin.java | 4 ++ .../src/org/eclipse/jgit/pgm/UploadPack.java | 2 - .../src/org/eclipse/jgit/pgm/Version.java | 2 - .../jgit/pgm/debug/BenchmarkReftable.java | 1 - .../jgit/pgm/debug/DiffAlgorithms.java | 2 - .../org/eclipse/jgit/pgm/debug/LfsStore.java | 2 - .../eclipse/jgit/pgm/debug/MakeCacheTree.java | 1 - .../eclipse/jgit/pgm/debug/ReadDirCache.java | 1 - .../eclipse/jgit/pgm/debug/ReadReftable.java | 1 - .../jgit/pgm/debug/RebuildCommitGraph.java | 1 - .../eclipse/jgit/pgm/debug/ShowCacheTree.java | 1 - .../eclipse/jgit/pgm/debug/ShowCommands.java | 1 - .../eclipse/jgit/pgm/debug/ShowDirCache.java | 1 - .../eclipse/jgit/pgm/debug/ShowPackDelta.java | 1 - .../jgit/pgm/debug/TextHashFunctions.java | 2 - .../jgit/pgm/debug/VerifyReftable.java | 1 - .../eclipse/jgit/pgm/debug/WriteDirCache.java | 1 - .../eclipse/jgit/pgm/debug/WriteReftable.java | 1 - .../pgm/opt/AbstractTreeIteratorHandler.java | 2 - .../eclipse/jgit/pgm/opt/CmdLineParser.java | 3 - .../eclipse/jgit/pgm/opt/GpgSignHandler.java | 1 - .../eclipse/jgit/pgm/opt/InstantHandler.java | 2 - .../eclipse/jgit/pgm/opt/ObjectIdHandler.java | 2 - .../pgm/opt/OptionWithValuesListHandler.java | 2 - .../jgit/pgm/opt/PathTreeFilterHandler.java | 2 - .../eclipse/jgit/pgm/opt/RefSpecHandler.java | 2 - .../jgit/pgm/opt/RevCommitHandler.java | 2 - .../eclipse/jgit/pgm/opt/RevTreeHandler.java | 2 - .../jgit/pgm/opt/SubcommandHandler.java | 2 - .../jgit/pgm/opt/UntrackedFilesHandler.java | 1 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../sshd/agent/connector/UnixSockets.java | 1 + .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../transport/sshd/JGitClientSession.java | 3 + .../transport/sshd/KnownHostEntryReader.java | 6 +- .../sshd/OpenSshServerKeyDatabase.java | 6 -- .../sshd/IdentityPasswordProvider.java | 2 + .../transport/sshd/KeyPasswordProvider.java | 2 + .../transport/sshd/SshdSessionFactory.java | 1 + .../jgit/transport/sshd/agent/Connector.java | 2 +- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../ssh/jsch/CredentialsProviderUserInfo.java | 7 --- .../ssh/jsch/JschConfigSessionFactory.java | 11 +++- .../jgit/transport/ssh/jsch/JschSession.java | 3 - .../transport/ssh/jsch/OpenSshConfig.java | 1 - .../org/eclipse/jgit/api/PushCommandTest.java | 4 +- .../revwalk/ObjectReachabilityTestCase.java | 1 - .../revwalk/ReachabilityCheckerTestCase.java | 1 - ...eRepositoryBuilderAfterOpenConfigTest.java | 1 - .../file/RefDirectoryAfterOpenConfigTest.java | 1 - .../file/SnapshottingRefDirectoryTest.java | 1 - .../jgit/transport/UploadPackTest.java | 8 +-- .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../eclipse/jgit/awtui/AwtAuthenticator.java | 1 - .../jgit/awtui/AwtCredentialsProvider.java | 3 - .../eclipse/jgit/awtui/CommitGraphPane.java | 2 - .../.settings/org.eclipse.jdt.core.prefs | 2 +- .../org/eclipse/jgit/api/AddNoteCommand.java | 1 - .../org/eclipse/jgit/api/ApplyCommand.java | 9 +-- .../org/eclipse/jgit/api/ArchiveCommand.java | 1 - .../org/eclipse/jgit/api/CheckoutCommand.java | 3 +- .../eclipse/jgit/api/CherryPickCommand.java | 1 - .../org/eclipse/jgit/api/CleanCommand.java | 21 +++---- .../eclipse/jgit/api/CreateBranchCommand.java | 1 - .../eclipse/jgit/api/DeleteBranchCommand.java | 1 - .../eclipse/jgit/api/DeleteTagCommand.java | 1 - .../jgit/api/GarbageCollectCommand.java | 1 - .../src/org/eclipse/jgit/api/Git.java | 3 +- .../eclipse/jgit/api/ListBranchCommand.java | 1 - .../eclipse/jgit/api/ListNotesCommand.java | 1 - .../org/eclipse/jgit/api/ListTagCommand.java | 4 +- .../src/org/eclipse/jgit/api/LogCommand.java | 2 - .../src/org/eclipse/jgit/api/MergeResult.java | 1 - .../org/eclipse/jgit/api/NameRevCommand.java | 1 - .../src/org/eclipse/jgit/api/PullResult.java | 1 - .../org/eclipse/jgit/api/RebaseCommand.java | 8 ++- .../org/eclipse/jgit/api/RebaseResult.java | 1 + .../eclipse/jgit/api/RemoveNoteCommand.java | 1 - .../eclipse/jgit/api/RenameBranchCommand.java | 1 - .../org/eclipse/jgit/api/ResetCommand.java | 1 - .../org/eclipse/jgit/api/ShowNoteCommand.java | 1 - .../eclipse/jgit/api/StashListCommand.java | 1 - .../eclipse/jgit/api/SubmoduleAddCommand.java | 2 + .../jgit/api/SubmoduleDeinitCommand.java | 9 ++- .../jgit/api/SubmoduleDeinitResult.java | 1 + .../jgit/api/SubmoduleInitCommand.java | 1 - .../jgit/api/SubmoduleStatusCommand.java | 1 - .../jgit/api/SubmoduleSyncCommand.java | 2 +- .../src/org/eclipse/jgit/api/TagCommand.java | 2 - .../eclipse/jgit/api/TransportCommand.java | 2 + .../api/errors/CheckoutConflictException.java | 1 + .../eclipse/jgit/attributes/Attribute.java | 3 - .../eclipse/jgit/attributes/Attributes.java | 3 - .../jgit/attributes/AttributesHandler.java | 11 ++++ .../jgit/attributes/AttributesRule.java | 1 - .../attributes/FilterCommandRegistry.java | 11 ++-- .../org/eclipse/jgit/blame/BlameResult.java | 1 - .../src/org/eclipse/jgit/blame/Candidate.java | 1 - .../src/org/eclipse/jgit/blame/Region.java | 1 - .../org/eclipse/jgit/blame/ReverseWalk.java | 2 - .../org/eclipse/jgit/diff/DiffAlgorithm.java | 4 ++ .../src/org/eclipse/jgit/diff/DiffEntry.java | 2 - .../org/eclipse/jgit/diff/DiffFormatter.java | 5 ++ .../src/org/eclipse/jgit/diff/Edit.java | 3 - .../src/org/eclipse/jgit/diff/EditList.java | 1 - .../org/eclipse/jgit/diff/HashedSequence.java | 1 - .../jgit/diff/HashedSequenceComparator.java | 2 - .../org/eclipse/jgit/diff/HistogramDiff.java | 1 - .../jgit/diff/LowLevelDiffAlgorithm.java | 3 +- .../jgit/diff/PatchIdDiffFormatter.java | 2 - .../src/org/eclipse/jgit/diff/RawText.java | 1 - .../eclipse/jgit/diff/RawTextComparator.java | 1 - .../org/eclipse/jgit/diff/RenameDetector.java | 9 +-- .../org/eclipse/jgit/diff/Subsequence.java | 9 ++- .../jgit/diff/SubsequenceComparator.java | 2 - .../jgit/dircache/BaseDirCacheEditor.java | 7 ++- .../org/eclipse/jgit/dircache/DirCache.java | 2 + .../jgit/dircache/DirCacheBuildIterator.java | 4 -- .../jgit/dircache/DirCacheBuilder.java | 1 - .../jgit/dircache/DirCacheCheckout.java | 39 ++++++++++-- .../eclipse/jgit/dircache/DirCacheEditor.java | 3 - .../jgit/dircache/DirCacheIterator.java | 11 +--- .../eclipse/jgit/dircache/DirCacheTree.java | 1 - .../jgit/errors/LargeObjectException.java | 1 - .../jgit/errors/RevisionSyntaxException.java | 1 - .../jgit/events/ConfigChangedEvent.java | 2 - .../jgit/events/IndexChangedEvent.java | 2 - .../eclipse/jgit/events/ListenerHandle.java | 1 - .../org/eclipse/jgit/events/ListenerList.java | 2 + .../eclipse/jgit/events/RefsChangedEvent.java | 2 - .../eclipse/jgit/events/RepositoryEvent.java | 1 - .../jgit/events/WorkingTreeModifiedEvent.java | 2 - .../eclipse/jgit/fnmatch/AbstractHead.java | 1 - .../eclipse/jgit/fnmatch/CharacterHead.java | 2 - .../org/eclipse/jgit/fnmatch/GroupHead.java | 1 - .../org/eclipse/jgit/fnmatch/LastHead.java | 1 - .../jgit/fnmatch/RestrictedWildCardHead.java | 2 - .../eclipse/jgit/fnmatch/WildCardHead.java | 1 - .../eclipse/jgit/gitrepo/ManifestParser.java | 6 +- .../org/eclipse/jgit/gitrepo/RepoCommand.java | 5 +- .../org/eclipse/jgit/gitrepo/RepoProject.java | 4 +- .../org/eclipse/jgit/hooks/CommitMsgHook.java | 2 - .../eclipse/jgit/hooks/PostCommitHook.java | 2 - .../org/eclipse/jgit/hooks/PreCommitHook.java | 2 - .../org/eclipse/jgit/hooks/PrePushHook.java | 3 - .../eclipse/jgit/ignore/FastIgnoreRule.java | 3 - .../org/eclipse/jgit/ignore/IgnoreNode.java | 1 - .../jgit/ignore/internal/AbstractMatcher.java | 3 - .../internal/LeadingAsteriskMatcher.java | 1 - .../jgit/ignore/internal/NameMatcher.java | 2 - .../jgit/ignore/internal/PathMatcher.java | 3 +- .../eclipse/jgit/ignore/internal/Strings.java | 15 +++-- .../internal/TrailingAsteriskMatcher.java | 1 - .../jgit/ignore/internal/WildCardMatcher.java | 1 - .../jgit/ignore/internal/WildMatcher.java | 2 - .../internal/diff/FilteredRenameDetector.java | 2 + .../diffmergetool/CommandExecutor.java | 6 ++ .../internal/diffmergetool/DiffTools.java | 2 + .../diffmergetool/ExternalToolUtils.java | 3 + .../internal/diffmergetool/FileElement.java | 4 ++ .../internal/diffmergetool/MergeTools.java | 3 + .../diffmergetool/PreDefinedDiffTool.java | 1 + .../diffmergetool/UserDefinedMergeTool.java | 2 +- .../jgit/internal/fsck/FsckPackParser.java | 18 ------ .../internal/revwalk/AddToBitmapFilter.java | 3 - .../revwalk/AddToBitmapWithCacheFilter.java | 3 - .../revwalk/AddUnseenToBitmapFilter.java | 3 - .../revwalk/BitmappedReachabilityChecker.java | 3 - .../storage/commitgraph/CommitGraph.java | 4 -- .../commitgraph/CommitGraphConstants.java | 6 +- .../storage/commitgraph/CommitGraphV1.java | 4 -- .../commitgraph/CommitGraphWriter.java | 1 + .../storage/commitgraph/GraphCommits.java | 2 +- .../dfs/BeforeDfsPackIndexLoadedEvent.java | 2 - .../internal/storage/dfs/DfsBlockCache.java | 1 + .../internal/storage/dfs/DfsCachedPack.java | 3 - .../jgit/internal/storage/dfs/DfsConfig.java | 2 - .../internal/storage/dfs/DfsInserter.java | 6 -- .../internal/storage/dfs/DfsObjDatabase.java | 3 - .../storage/dfs/DfsObjectRepresentation.java | 4 -- .../internal/storage/dfs/DfsObjectToPack.java | 2 - .../internal/storage/dfs/DfsOutputStream.java | 2 - .../storage/dfs/DfsPackDescription.java | 3 - .../internal/storage/dfs/DfsPackParser.java | 18 ------ .../storage/dfs/DfsPacksChangedEvent.java | 2 - .../jgit/internal/storage/dfs/DfsReader.java | 16 ----- .../internal/storage/dfs/DfsRefDatabase.java | 10 ---- .../internal/storage/dfs/DfsRefRename.java | 1 - .../internal/storage/dfs/DfsRefUpdate.java | 8 --- .../storage/dfs/DfsReftableDatabase.java | 14 ----- .../storage/dfs/DfsReftableStack.java | 1 - .../internal/storage/dfs/DfsRepository.java | 8 --- .../storage/dfs/DfsRepositoryBuilder.java | 6 -- .../storage/dfs/DfsRepositoryDescription.java | 3 - .../internal/storage/dfs/DfsStreamKey.java | 3 - .../storage/dfs/InMemoryRepository.java | 4 -- .../storage/dfs/LargePackedWholeObject.java | 5 -- .../internal/storage/dfs/PackInputStream.java | 3 - .../storage/file/BasePackBitmapIndex.java | 1 - .../storage/file/BitmapIndexImpl.java | 4 +- .../storage/file/ByteArrayWindow.java | 2 - .../storage/file/ByteBufferWindow.java | 2 - .../storage/file/CachedObjectDirectory.java | 4 -- .../storage/file/CheckoutEntryImpl.java | 2 - .../storage/file/FileObjectDatabase.java | 2 - .../storage/file/FileReftableDatabase.java | 15 +---- .../storage/file/FileReftableStack.java | 3 + .../internal/storage/file/FileRepository.java | 12 +--- .../internal/storage/file/FileSnapshot.java | 3 - .../jgit/internal/storage/file/GC.java | 44 +++++++++++--- .../jgit/internal/storage/file/GcLog.java | 1 + .../storage/file/GlobalAttributesNode.java | 1 + .../storage/file/InfoAttributesNode.java | 1 + .../storage/file/LargePackedWholeObject.java | 5 -- .../storage/file/LazyObjectIdSetFile.java | 1 - .../storage/file/LocalCachedPack.java | 2 - .../file/LocalObjectRepresentation.java | 2 - .../storage/file/LocalObjectToPack.java | 2 - .../jgit/internal/storage/file/LockFile.java | 2 +- .../internal/storage/file/LooseObjects.java | 1 - .../storage/file/ObjectDirectory.java | 12 ---- .../storage/file/ObjectDirectoryInserter.java | 23 +++++--- .../file/ObjectDirectoryPackParser.java | 19 ------ .../jgit/internal/storage/file/Pack.java | 1 + .../storage/file/PackBitmapIndex.java | 1 + .../storage/file/PackBitmapIndexBuilder.java | 5 -- .../storage/file/PackBitmapIndexRemapper.java | 7 --- .../storage/file/PackBitmapIndexV1.java | 7 --- .../internal/storage/file/PackDirectory.java | 3 +- .../storage/file/PackFileSnapshot.java | 1 - .../jgit/internal/storage/file/PackIndex.java | 1 - .../internal/storage/file/PackIndexV1.java | 9 --- .../internal/storage/file/PackIndexV2.java | 10 ---- .../storage/file/PackIndexWriterV1.java | 1 - .../storage/file/PackIndexWriterV2.java | 1 - .../storage/file/PackInputStream.java | 3 - .../internal/storage/file/PackInserter.java | 6 -- .../file/PackObjectSizeIndexWriter.java | 33 +++++++---- .../storage/file/PackedBatchRefUpdate.java | 1 - .../internal/storage/file/RefDirectory.java | 41 +++++-------- .../storage/file/RefDirectoryRename.java | 1 - .../storage/file/RefDirectoryUpdate.java | 7 --- .../storage/file/ReflogEntryImpl.java | 6 -- .../storage/file/ReflogReaderImpl.java | 6 +- .../internal/storage/file/ReflogWriter.java | 4 ++ .../storage/file/SimpleDataInput.java | 15 ----- .../storage/file/SimpleDataOutput.java | 14 ----- .../file/SnapshottingRefDirectory.java | 6 +- .../internal/storage/file/WindowCursor.java | 15 ----- .../jgit/internal/storage/io/BlockSource.java | 1 - .../io/CancellableDigestOutputStream.java | 3 - .../storage/memory/TernarySearchTree.java | 1 + .../internal/storage/pack/DeltaIndex.java | 1 - .../jgit/internal/storage/pack/DeltaTask.java | 1 - .../internal/storage/pack/ObjectToPack.java | 2 - .../jgit/internal/storage/pack/PackExt.java | 1 - .../internal/storage/pack/PackWriter.java | 2 +- .../storage/reftable/EmptyLogCursor.java | 5 -- .../internal/storage/reftable/LogCursor.java | 1 - .../storage/reftable/MergedReftable.java | 8 --- .../internal/storage/reftable/RefCursor.java | 1 - .../internal/storage/reftable/Reftable.java | 2 +- .../reftable/ReftableBatchRefUpdate.java | 1 - .../reftable/ReftableOutputStream.java | 2 - .../storage/reftable/ReftableReader.java | 7 --- .../reftable/ReftableReflogReader.java | 4 -- .../submodule/SubmoduleValidator.java | 4 +- .../transport/ssh/OpenSshConfigFile.java | 1 - .../org/eclipse/jgit/lib/AbbrevConfig.java | 6 +- .../eclipse/jgit/lib/AbbreviatedObjectId.java | 3 - .../src/org/eclipse/jgit/lib/AnyObjectId.java | 3 - .../org/eclipse/jgit/lib/BatchRefUpdate.java | 1 - .../jgit/lib/BatchingProgressMonitor.java | 5 -- .../jgit/lib/BranchTrackingStatus.java | 1 + .../org/eclipse/jgit/lib/CommitBuilder.java | 1 - .../src/org/eclipse/jgit/lib/Config.java | 8 ++- .../org/eclipse/jgit/lib/ConfigConstants.java | 3 +- .../src/org/eclipse/jgit/lib/ConfigLine.java | 1 - .../src/org/eclipse/jgit/lib/Constants.java | 6 +- .../jgit/lib/DefaultTypedConfigGetter.java | 7 --- .../jgit/lib/EmptyProgressMonitor.java | 5 -- .../org/eclipse/jgit/lib/GpgSignature.java | 1 - .../src/org/eclipse/jgit/lib/IndexDiff.java | 10 +++- .../org/eclipse/jgit/lib/MutableObjectId.java | 1 - .../eclipse/jgit/lib/NullProgressMonitor.java | 5 -- .../org/eclipse/jgit/lib/ObjectBuilder.java | 1 - .../org/eclipse/jgit/lib/ObjectChecker.java | 1 + .../src/org/eclipse/jgit/lib/ObjectId.java | 1 - .../eclipse/jgit/lib/ObjectIdOwnerMap.java | 8 ++- .../src/org/eclipse/jgit/lib/ObjectIdRef.java | 7 --- .../eclipse/jgit/lib/ObjectIdSubclassMap.java | 5 +- .../org/eclipse/jgit/lib/ObjectReader.java | 5 ++ .../src/org/eclipse/jgit/lib/PersonIdent.java | 2 - .../org/eclipse/jgit/lib/RebaseTodoFile.java | 5 ++ .../org/eclipse/jgit/lib/RebaseTodoLine.java | 2 +- .../org/eclipse/jgit/lib/RefComparator.java | 1 - .../src/org/eclipse/jgit/lib/RefDatabase.java | 1 + .../src/org/eclipse/jgit/lib/RefRename.java | 2 + .../src/org/eclipse/jgit/lib/RefUpdate.java | 7 ++- .../src/org/eclipse/jgit/lib/RefWriter.java | 1 + .../org/eclipse/jgit/lib/ReflogReader.java | 7 ++- .../src/org/eclipse/jgit/lib/Repository.java | 40 +++++++++++-- .../org/eclipse/jgit/lib/StoredConfig.java | 1 - .../src/org/eclipse/jgit/lib/SymbolicRef.java | 9 --- .../src/org/eclipse/jgit/lib/TagBuilder.java | 1 - .../eclipse/jgit/lib/TextProgressMonitor.java | 4 -- .../jgit/lib/ThreadSafeProgressMonitor.java | 5 -- .../org/eclipse/jgit/lib/TreeFormatter.java | 1 - .../eclipse/jgit/lib/TypedConfigGetter.java | 2 + .../jgit/merge/EolAwareOutputStream.java | 2 - .../eclipse/jgit/merge/MergeAlgorithm.java | 14 +++-- .../eclipse/jgit/merge/MergeFormatter.java | 4 ++ .../org/eclipse/jgit/merge/MergeResult.java | 1 - .../eclipse/jgit/merge/RecursiveMerger.java | 2 + .../org/eclipse/jgit/merge/ResolveMerger.java | 30 ++++++++-- .../eclipse/jgit/merge/StrategyOneSided.java | 4 -- .../eclipse/jgit/merge/StrategyRecursive.java | 4 -- .../eclipse/jgit/merge/StrategyResolve.java | 4 -- .../merge/StrategySimpleTwoWayInCore.java | 4 -- .../jgit/merge/ThreeWayMergeStrategy.java | 2 - .../eclipse/jgit/merge/ThreeWayMerger.java | 3 +- .../src/org/eclipse/jgit/nls/NLS.java | 2 + .../eclipse/jgit/notes/DefaultNoteMerger.java | 1 - .../src/org/eclipse/jgit/notes/Note.java | 1 - .../src/org/eclipse/jgit/notes/NoteMap.java | 1 - .../org/eclipse/jgit/notes/NoteMapMerger.java | 6 ++ .../jgit/patch/CombinedFileHeader.java | 15 +---- .../jgit/patch/CombinedHunkHeader.java | 2 - .../org/eclipse/jgit/patch/FileHeader.java | 7 +++ .../org/eclipse/jgit/patch/FormatError.java | 1 - .../org/eclipse/jgit/patch/HunkHeader.java | 1 - .../org/eclipse/jgit/patch/PatchApplier.java | 4 ++ .../org/eclipse/jgit/revplot/PlotCommit.java | 1 - .../eclipse/jgit/revplot/PlotCommitList.java | 7 ++- .../org/eclipse/jgit/revplot/PlotWalk.java | 5 +- .../jgit/revwalk/AbstractRevQueue.java | 2 - .../eclipse/jgit/revwalk/BlockRevQueue.java | 7 ++- .../eclipse/jgit/revwalk/DateRevQueue.java | 4 -- .../eclipse/jgit/revwalk/DepthGenerator.java | 7 ++- .../org/eclipse/jgit/revwalk/DepthWalk.java | 9 +++ .../eclipse/jgit/revwalk/FIFORevQueue.java | 4 -- .../eclipse/jgit/revwalk/FollowFilter.java | 4 -- .../org/eclipse/jgit/revwalk/FooterKey.java | 1 - .../org/eclipse/jgit/revwalk/FooterLine.java | 1 - .../org/eclipse/jgit/revwalk/Generator.java | 3 + .../eclipse/jgit/revwalk/LIFORevQueue.java | 4 -- .../org/eclipse/jgit/revwalk/ObjectWalk.java | 5 -- .../src/org/eclipse/jgit/revwalk/RevBlob.java | 1 - .../org/eclipse/jgit/revwalk/RevCommit.java | 2 - .../org/eclipse/jgit/revwalk/RevCommitCG.java | 3 - .../eclipse/jgit/revwalk/RevCommitList.java | 2 - .../src/org/eclipse/jgit/revwalk/RevFlag.java | 1 - .../org/eclipse/jgit/revwalk/RevObject.java | 1 - .../eclipse/jgit/revwalk/RevObjectList.java | 5 -- .../src/org/eclipse/jgit/revwalk/RevTag.java | 1 - .../src/org/eclipse/jgit/revwalk/RevTree.java | 1 - .../src/org/eclipse/jgit/revwalk/RevWalk.java | 5 +- .../eclipse/jgit/revwalk/RevWalkUtils.java | 12 ++++ .../jgit/revwalk/RewriteGenerator.java | 4 ++ .../revwalk/TopoNonIntermixSortGenerator.java | 3 + .../jgit/revwalk/TopoSortGenerator.java | 3 + .../eclipse/jgit/revwalk/TreeRevFilter.java | 3 - .../revwalk/filter/CommitTimeRevFilter.java | 2 - .../revwalk/filter/MaxCountRevFilter.java | 2 - .../jgit/revwalk/filter/NotRevFilter.java | 5 -- .../jgit/revwalk/filter/RevFilter.java | 1 - .../jgit/revwalk/filter/RevFlagFilter.java | 2 - .../jgit/revwalk/filter/SkipRevFilter.java | 2 - .../revwalk/filter/SubStringRevFilter.java | 4 -- .../jgit/storage/file/FileBasedConfig.java | 3 - .../eclipse/jgit/storage/pack/PackConfig.java | 12 ++-- .../jgit/submodule/SubmoduleConflict.java | 8 ++- .../eclipse/jgit/submodule/SubmoduleWalk.java | 56 ++++++++++++++---- .../transport/AbstractAdvertiseRefsHook.java | 2 - .../jgit/transport/AdvertiseRefsHook.java | 1 + .../transport/AdvertiseRefsHookChain.java | 4 -- .../jgit/transport/BaseConnection.java | 5 -- .../jgit/transport/BaseFetchConnection.java | 2 - .../jgit/transport/BasePackConnection.java | 20 ++++--- .../transport/BasePackFetchConnection.java | 7 --- .../transport/BasePackPushConnection.java | 3 - .../jgit/transport/BundleFetchConnection.java | 5 -- .../ChainingCredentialsProvider.java | 2 - .../jgit/transport/CredentialItem.java | 3 +- .../eclipse/jgit/transport/FilterSpec.java | 2 - .../eclipse/jgit/transport/FtpChannel.java | 8 +++ .../transport/HMACSHA1NonceGenerator.java | 8 +-- .../jgit/transport/HttpAuthMethod.java | 4 ++ .../transport/InternalFetchConnection.java | 1 - .../transport/InternalPushConnection.java | 1 - .../jgit/transport/LsRefsV2Request.java | 9 ++- .../transport/NetRCCredentialsProvider.java | 3 - .../jgit/transport/NonceGenerator.java | 4 +- .../jgit/transport/ObjectInfoRequest.java | 7 ++- .../eclipse/jgit/transport/PackParser.java | 1 + .../jgit/transport/PackedObjectInfo.java | 1 + .../jgit/transport/PostReceiveHookChain.java | 1 - .../jgit/transport/PostUploadHookChain.java | 1 - .../jgit/transport/PreReceiveHookChain.java | 1 - .../jgit/transport/PreUploadHookChain.java | 3 - .../jgit/transport/ProtocolV0Parser.java | 2 + .../jgit/transport/PushCertificate.java | 3 - .../jgit/transport/PushCertificateIdent.java | 3 - .../jgit/transport/PushConnection.java | 6 -- .../eclipse/jgit/transport/PushProcess.java | 3 + .../jgit/transport/ReceiveCommand.java | 1 - .../eclipse/jgit/transport/ReceivePack.java | 11 +++- .../eclipse/jgit/transport/RefAdvertiser.java | 2 +- .../eclipse/jgit/transport/RefLeaseSpec.java | 1 - .../org/eclipse/jgit/transport/RefSpec.java | 3 - .../jgit/transport/RemoteRefUpdate.java | 1 - .../jgit/transport/SideBandInputStream.java | 2 - .../jgit/transport/SideBandOutputStream.java | 3 - .../transport/SideBandProgressMonitor.java | 4 -- .../jgit/transport/SshConfigStore.java | 1 + .../eclipse/jgit/transport/SshConstants.java | 4 +- .../eclipse/jgit/transport/SshTransport.java | 1 - .../eclipse/jgit/transport/TestProtocol.java | 5 -- .../jgit/transport/TrackingRefUpdate.java | 1 - .../org/eclipse/jgit/transport/Transport.java | 5 +- .../jgit/transport/TransportAmazonS3.java | 3 - .../jgit/transport/TransportBundleFile.java | 3 - .../jgit/transport/TransportBundleStream.java | 3 - .../jgit/transport/TransportGitAnon.java | 3 - .../jgit/transport/TransportGitSsh.java | 2 - .../eclipse/jgit/transport/TransportHttp.java | 18 +++--- .../jgit/transport/TransportLocal.java | 3 - .../jgit/transport/TransportProtocol.java | 2 + .../eclipse/jgit/transport/TransportSftp.java | 2 - .../org/eclipse/jgit/transport/URIish.java | 10 ++-- .../eclipse/jgit/transport/UploadPack.java | 10 +++- .../org/eclipse/jgit/transport/UserAgent.java | 11 ++-- .../UsernamePasswordCredentialsProvider.java | 3 - .../jgit/transport/WalkEncryption.java | 6 +- .../jgit/transport/WalkFetchConnection.java | 5 -- .../jgit/transport/WalkPushConnection.java | 3 - .../jgit/transport/http/HttpConnection.java | 18 ++++-- .../transport/http/HttpConnectionFactory.java | 2 + .../http/HttpConnectionFactory2.java | 2 +- .../transport/http/JDKHttpConnection.java | 27 ++------- .../jgit/transport/resolver/FileResolver.java | 1 - .../jgit/treewalk/AbstractTreeIterator.java | 1 - .../jgit/treewalk/CanonicalTreeParser.java | 11 +--- .../jgit/treewalk/EmptyTreeIterator.java | 12 ---- .../jgit/treewalk/FileTreeIterator.java | 3 - .../org/eclipse/jgit/treewalk/TreeWalk.java | 18 ++++-- .../jgit/treewalk/WorkingTreeIterator.java | 16 +++-- .../jgit/treewalk/filter/ByteArraySet.java | 2 +- .../jgit/treewalk/filter/IndexDiffFilter.java | 4 -- .../treewalk/filter/InterIndexDiffFilter.java | 4 -- .../treewalk/filter/NotIgnoredFilter.java | 4 -- .../jgit/treewalk/filter/NotTreeFilter.java | 6 -- .../jgit/treewalk/filter/PathFilter.java | 5 -- .../treewalk/filter/PathSuffixFilter.java | 3 - .../treewalk/filter/SkipWorkTreeFilter.java | 4 -- .../jgit/treewalk/filter/TreeFilter.java | 1 - .../src/org/eclipse/jgit/util/BlockList.java | 8 --- .../jgit/util/CachedAuthenticator.java | 1 - .../src/org/eclipse/jgit/util/Equality.java | 26 ++++---- .../src/org/eclipse/jgit/util/FS.java | 28 ++++++++- .../src/org/eclipse/jgit/util/FS_POSIX.java | 1 + .../src/org/eclipse/jgit/util/FS_Win32.java | 11 ---- .../eclipse/jgit/util/FS_Win32_Cygwin.java | 6 -- .../src/org/eclipse/jgit/util/FileUtils.java | 40 ++++++++++++- .../org/eclipse/jgit/util/HttpSupport.java | 11 ++-- .../src/org/eclipse/jgit/util/IntList.java | 5 +- .../src/org/eclipse/jgit/util/LfsFactory.java | 4 ++ .../src/org/eclipse/jgit/util/LongList.java | 1 - .../eclipse/jgit/util/RawCharSequence.java | 4 -- .../jgit/util/RawSubStringPattern.java | 1 - .../src/org/eclipse/jgit/util/RefList.java | 9 ++- .../src/org/eclipse/jgit/util/RefMap.java | 8 +-- .../src/org/eclipse/jgit/util/SshSupport.java | 1 + .../org/eclipse/jgit/util/StringUtils.java | 8 +-- .../jgit/util/io/AutoCRLFInputStream.java | 3 - .../jgit/util/io/AutoCRLFOutputStream.java | 5 -- .../jgit/util/io/AutoLFInputStream.java | 3 - .../jgit/util/io/AutoLFOutputStream.java | 5 -- .../jgit/util/io/CountingOutputStream.java | 4 -- .../jgit/util/io/DisabledOutputStream.java | 1 - .../jgit/util/io/IsolatedOutputStream.java | 4 -- .../jgit/util/io/LimitedInputStream.java | 6 -- .../eclipse/jgit/util/io/MessageWriter.java | 4 -- .../jgit/util/io/StreamCopyThread.java | 1 - .../eclipse/jgit/util/io/TeeInputStream.java | 4 -- .../eclipse/jgit/util/io/TeeOutputStream.java | 5 -- .../jgit/util/io/ThrowingPrintWriter.java | 23 +++++--- .../jgit/util/io/TimeoutInputStream.java | 4 -- .../jgit/util/io/TimeoutOutputStream.java | 5 -- .../jgit/util/io/UnionInputStream.java | 5 -- .../src/org/eclipse/jgit/util/sha1/SHA1.java | 1 - .../jgit/util/time/MonotonicSystemClock.java | 1 - .../jgit/util/time/ProposedTimestamp.java | 1 - pom.xml | 29 ++++++++- 627 files changed, 1204 insertions(+), 1653 deletions(-) diff --git a/org.eclipse.jgit.ant/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ant/.settings/org.eclipse.jdt.core.prefs index f79df5b9d..a08ba7b56 100644 --- a/org.eclipse.jgit.ant/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ant/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitAddTask.java b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitAddTask.java index 0d409bbf0..07b60cfc7 100644 --- a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitAddTask.java +++ b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitAddTask.java @@ -75,7 +75,6 @@ private synchronized Union getPath() { return path; } - /** {@inheritDoc} */ @Override public void execute() throws BuildException { if (src == null) { diff --git a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCheckoutTask.java b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCheckoutTask.java index 1f10588b4..ecb5f9add 100644 --- a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCheckoutTask.java +++ b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCheckoutTask.java @@ -77,7 +77,6 @@ public void setForce(boolean force) { this.force = force; } - /** {@inheritDoc} */ @Override public void execute() throws BuildException { CheckoutCommand checkout; diff --git a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java index c143c9c6e..facf2ac6a 100644 --- a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java +++ b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitCloneTask.java @@ -76,7 +76,6 @@ public void setBranch(String branch) { this.branch = branch; } - /** {@inheritDoc} */ @Override public void execute() throws BuildException { log("Cloning repository " + uri); diff --git a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitInitTask.java b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitInitTask.java index 161168fbe..5c2a26b9e 100644 --- a/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitInitTask.java +++ b/org.eclipse.jgit.ant/src/org/eclipse/jgit/ant/tasks/GitInitTask.java @@ -48,7 +48,6 @@ public void setBare(boolean bare) { this.bare = bare; } - /** {@inheritDoc} */ @Override public void execute() throws BuildException { if (bare) { diff --git a/org.eclipse.jgit.archive/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.archive/.settings/org.eclipse.jdt.core.prefs index 2abe9529d..b27b6c3c7 100644 --- a/org.eclipse.jgit.archive/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.archive/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java index 0ebac7722..25cd36817 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/BaseFormat.java @@ -40,6 +40,7 @@ public class BaseFormat { * options map * @return stream with option applied * @throws IOException + * if an IO error occurred */ protected ArchiveOutputStream applyFormatOptions(ArchiveOutputStream s, Map o) throws IOException { diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java index 702bad62f..dfa60321b 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TarFormat.java @@ -39,7 +39,6 @@ public final class TarFormat extends BaseFormat implements private static final List SUFFIXES = Collections .unmodifiableList(Arrays.asList(".tar")); //$NON-NLS-1$ - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s) throws IOException { @@ -47,7 +46,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s) Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -58,7 +56,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s, return applyFormatOptions(out, o); } - /** {@inheritDoc} */ @Override public void putEntry(ArchiveOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) @@ -108,19 +105,16 @@ public void putEntry(ArchiveOutputStream out, out.closeArchiveEntry(); } - /** {@inheritDoc} */ @Override public Iterable suffixes() { return SUFFIXES; } - /** {@inheritDoc} */ @Override public boolean equals(Object other) { return (other instanceof TarFormat); } - /** {@inheritDoc} */ @Override public int hashCode() { return getClass().hashCode(); diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java index 940dafd40..26da43114 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/Tbz2Format.java @@ -33,7 +33,6 @@ public final class Tbz2Format extends BaseFormat implements private final ArchiveCommand.Format tarFormat = new TarFormat(); - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s) throws IOException { @@ -41,7 +40,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s) Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -55,7 +53,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s, return tarFormat.createArchiveOutputStream(out, o); } - /** {@inheritDoc} */ @Override public void putEntry(ArchiveOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) @@ -63,19 +60,16 @@ public void putEntry(ArchiveOutputStream out, tarFormat.putEntry(out, tree, path, mode, loader); } - /** {@inheritDoc} */ @Override public Iterable suffixes() { return SUFFIXES; } - /** {@inheritDoc} */ @Override public boolean equals(Object other) { return (other instanceof Tbz2Format); } - /** {@inheritDoc} */ @Override public int hashCode() { return getClass().hashCode(); diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java index 72e2439f6..d1ed035d0 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TgzFormat.java @@ -34,7 +34,6 @@ public final class TgzFormat extends BaseFormat implements private final ArchiveCommand.Format tarFormat = new TarFormat(); - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s) throws IOException { @@ -42,7 +41,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s) Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -58,7 +56,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s, return tarFormat.createArchiveOutputStream(out, o); } - /** {@inheritDoc} */ @Override public void putEntry(ArchiveOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) @@ -66,19 +63,16 @@ public void putEntry(ArchiveOutputStream out, tarFormat.putEntry(out, tree, path, mode, loader); } - /** {@inheritDoc} */ @Override public Iterable suffixes() { return SUFFIXES; } - /** {@inheritDoc} */ @Override public boolean equals(Object other) { return (other instanceof TgzFormat); } - /** {@inheritDoc} */ @Override public int hashCode() { return getClass().hashCode(); diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java index b16fb6dcb..42549de30 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/TxzFormat.java @@ -33,7 +33,6 @@ public final class TxzFormat extends BaseFormat implements private final ArchiveCommand.Format tarFormat = new TarFormat(); - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s) throws IOException { @@ -41,7 +40,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s) Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -55,7 +53,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s, return tarFormat.createArchiveOutputStream(out, o); } - /** {@inheritDoc} */ @Override public void putEntry(ArchiveOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) @@ -63,19 +60,16 @@ public void putEntry(ArchiveOutputStream out, tarFormat.putEntry(out, tree, path, mode, loader); } - /** {@inheritDoc} */ @Override public Iterable suffixes() { return SUFFIXES; } - /** {@inheritDoc} */ @Override public boolean equals(Object other) { return (other instanceof TxzFormat); } - /** {@inheritDoc} */ @Override public int hashCode() { return getClass().hashCode(); diff --git a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java index 97a24c75c..6cb42ae1e 100644 --- a/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java +++ b/org.eclipse.jgit.archive/src/org/eclipse/jgit/archive/ZipFormat.java @@ -35,7 +35,6 @@ public final class ZipFormat extends BaseFormat implements private static final List SUFFIXES = Collections .unmodifiableList(Arrays.asList(".zip")); //$NON-NLS-1$ - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s) throws IOException { @@ -43,7 +42,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s) Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -55,7 +53,6 @@ public ArchiveOutputStream createArchiveOutputStream(OutputStream s, return applyFormatOptions(out, o); } - /** {@inheritDoc} */ @Override public void putEntry(ArchiveOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) @@ -97,19 +94,16 @@ public void putEntry(ArchiveOutputStream out, out.closeArchiveEntry(); } - /** {@inheritDoc} */ @Override public Iterable suffixes() { return SUFFIXES; } - /** {@inheritDoc} */ @Override public boolean equals(Object other) { return (other instanceof ZipFormat); } - /** {@inheritDoc} */ @Override public int hashCode() { return getClass().hashCode(); diff --git a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs index d1f54bbe6..d5c0e6c7e 100644 --- a/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.gpg.bc/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java index 8cd03bd36..d7bf34e3a 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyLocator.java @@ -324,7 +324,9 @@ private static PGPPublicKey findPublicKeyByUserId(KeyBlob keyBlob, * @throws IOException * in case of problems reading the file * @throws NoSuchAlgorithmException + * if an algorithm isn't available * @throws NoSuchProviderException + * if a provider isn't available * @throws NoOpenPgpKeyException * if the file does not contain any OpenPGP key */ @@ -368,12 +370,17 @@ private static PGPPublicKey findPublicKeyInKeyBox(Path keyboxFile, * @throws IOException * in case of issues reading key files * @throws NoSuchAlgorithmException + * algorithm is not available * @throws NoSuchProviderException + * provider is not available * @throws PGPException * in case of issues finding a key, including no key found * @throws CanceledException + * operation was cancelled * @throws URISyntaxException + * URI is invalid * @throws UnsupportedCredentialItem + * credential item is not supported */ @NonNull public BouncyCastleGpgKey findSecretKey() throws IOException, @@ -543,10 +550,11 @@ private BouncyCastleGpgKey findSecretKeyForKeyBoxPublicKey( /** * Return the first suitable key for signing in the key ring collection. For * this case we only expect there to be one key available for signing. - *

* * @param signingkey + * the signing key * @param secringFile + * the secring file * * @return the first suitable PGP secret key found for signing * @throws IOException diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java index 614419598..463b66112 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/BouncyCastleGpgKeyPassphrasePrompt.java @@ -69,10 +69,13 @@ private URIish createURI(Path keyLocation) throws URISyntaxException { * the location the key was loaded from * @return the passphrase (maybe null) * @throws PGPException + * if a PGP problem occurred * @throws CanceledException * in case passphrase was not entered by user * @throws URISyntaxException + * if the URI isn't parseable * @throws UnsupportedCredentialItem + * if a credential item isn't supported */ public char[] getPassphrase(byte[] keyFingerprint, Path keyLocation) throws PGPException, CanceledException, UnsupportedCredentialItem, diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java index c93172471..3eee18aef 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/KeyGrip.java @@ -36,8 +36,8 @@ * Utilities to compute the keygrip of a key. A keygrip is a SHA1 hash * over the public key parameters and is used internally by the gpg-agent to * find the secret key belonging to a public key: the secret key is stored in a - * file under ~/.gnupg/private-keys-v1.d/ with a name "<keygrip>.key". While - * this storage organization is an implementation detail of GPG, the way + * file under ~/.gnupg/private-keys-v1.d/ with a name "<keygrip>.key". + * While this storage organization is an implementation detail of GPG, the way * keygrips are computed is not; they are computed by libgcrypt and their * definition is stable. */ diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/SExprParser.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/SExprParser.java index a9bb22c78..c93c2164c 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/SExprParser.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/SExprParser.java @@ -95,7 +95,9 @@ public SExprParser(PGPDigestCalculatorProvider digestProvider) { * * @return a secret key object. * @throws IOException + * if an IO error occurred * @throws PGPException + * if some PGP error occurred */ public PGPSecretKey parseSecretKey(InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, @@ -252,7 +254,9 @@ public PGPSecretKey parseSecretKey(InputStream inputStream, * * @return a secret key object. * @throws IOException + * if an IO error occurred * @throws PGPException + * if a PGP error occurred */ public PGPSecretKey parseSecretKey(InputStream inputStream, PBEProtectionRemoverFactory keyProtectionRemoverFactory, diff --git a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/SecretKeys.java b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/SecretKeys.java index 269a1ba0f..a659d38fd 100644 --- a/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/SecretKeys.java +++ b/org.eclipse.jgit.gpg.bc/src/org/eclipse/jgit/gpg/bc/internal/keys/SecretKeys.java @@ -373,6 +373,7 @@ && matches(humanForm, start, OCB_PROTECTED)) { * index of the closing quote in {@code in} * @return the dequoted raw string value * @throws StreamCorruptedException + * if object stream is corrupt */ private static byte[] dequote(byte[] in, int from, int to) throws StreamCorruptedException { diff --git a/org.eclipse.jgit.http.apache/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.http.apache/.settings/org.eclipse.jdt.core.prefs index f79df5b9d..a08ba7b56 100644 --- a/org.eclipse.jgit.http.apache/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.http.apache/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java index 90348f54b..6d806dee3 100644 --- a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java +++ b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java @@ -203,6 +203,7 @@ private SSLContext getSSLContext() { * Sets the buffer from which to take the request body * * @param buffer + * the buffer */ public void setBuffer(TemporaryBuffer buffer) { this.entity = new TemporaryBufferEntity(buffer); @@ -212,7 +213,9 @@ public void setBuffer(TemporaryBuffer buffer) { * Constructor for HttpClientConnection. * * @param urlStr + * url string * @throws MalformedURLException + * if url is malformed */ public HttpClientConnection(String urlStr) throws MalformedURLException { this(urlStr, null); @@ -222,8 +225,11 @@ public HttpClientConnection(String urlStr) throws MalformedURLException { * Constructor for HttpClientConnection. * * @param urlStr + * url string * @param proxy + * proxy * @throws MalformedURLException + * if url is malformed */ public HttpClientConnection(String urlStr, Proxy proxy) throws MalformedURLException { @@ -234,9 +240,13 @@ public HttpClientConnection(String urlStr, Proxy proxy) * Constructor for HttpClientConnection. * * @param urlStr + * url string * @param proxy + * proxy * @param cl + * client * @throws MalformedURLException + * if url is malformed */ public HttpClientConnection(String urlStr, Proxy proxy, HttpClient cl) throws MalformedURLException { @@ -245,20 +255,17 @@ public HttpClientConnection(String urlStr, Proxy proxy, HttpClient cl) this.proxy = proxy; } - /** {@inheritDoc} */ @Override public int getResponseCode() throws IOException { execute(); return resp.getStatusLine().getStatusCode(); } - /** {@inheritDoc} */ @Override public URL getURL() { return url; } - /** {@inheritDoc} */ @Override public String getResponseMessage() throws IOException { execute(); @@ -287,7 +294,6 @@ private void execute() throws IOException, ClientProtocolException { } } - /** {@inheritDoc} */ @Override public Map> getHeaderFields() { Map> ret = new HashMap<>(); @@ -304,13 +310,11 @@ public Map> getHeaderFields() { return ret; } - /** {@inheritDoc} */ @Override public void setRequestProperty(String name, String value) { req.addHeader(name, value); } - /** {@inheritDoc} */ @Override public void setRequestMethod(String method) throws ProtocolException { this.method = method; @@ -328,25 +332,21 @@ public void setRequestMethod(String method) throws ProtocolException { } } - /** {@inheritDoc} */ @Override public void setUseCaches(boolean usecaches) { // not needed } - /** {@inheritDoc} */ @Override public void setConnectTimeout(int timeout) { this.timeout = Integer.valueOf(timeout); } - /** {@inheritDoc} */ @Override public void setReadTimeout(int readTimeout) { this.readTimeout = Integer.valueOf(readTimeout); } - /** {@inheritDoc} */ @Override public String getContentType() { HttpEntity responseEntity = resp.getEntity(); @@ -358,7 +358,6 @@ public String getContentType() { return null; } - /** {@inheritDoc} */ @Override public InputStream getInputStream() throws IOException { execute(); @@ -366,7 +365,6 @@ public InputStream getInputStream() throws IOException { } // will return only the first field - /** {@inheritDoc} */ @Override public String getHeaderField(@NonNull String name) { Header header = resp.getFirstHeader(name); @@ -379,7 +377,6 @@ public List getHeaderFields(@NonNull String name) { .stream().map(Header::getValue).collect(Collectors.toList())); } - /** {@inheritDoc} */ @Override public int getContentLength() { Header contentLength = resp.getFirstHeader("content-length"); //$NON-NLS-1$ @@ -395,19 +392,16 @@ public int getContentLength() { } } - /** {@inheritDoc} */ @Override public void setInstanceFollowRedirects(boolean followRedirects) { this.followRedirects = Boolean.valueOf(followRedirects); } - /** {@inheritDoc} */ @Override public void setDoOutput(boolean dooutput) { // TODO: check whether we can really ignore this. } - /** {@inheritDoc} */ @Override public void setFixedLengthStreamingMode(int contentLength) { if (entity != null) @@ -416,7 +410,6 @@ public void setFixedLengthStreamingMode(int contentLength) { entity.setContentLength(contentLength); } - /** {@inheritDoc} */ @Override public OutputStream getOutputStream() throws IOException { if (entity == null) @@ -424,7 +417,6 @@ public OutputStream getOutputStream() throws IOException { return entity.getBuffer(); } - /** {@inheritDoc} */ @Override public void setChunkedStreamingMode(int chunklen) { if (entity == null) @@ -432,31 +424,26 @@ public void setChunkedStreamingMode(int chunklen) { entity.setChunked(true); } - /** {@inheritDoc} */ @Override public String getRequestMethod() { return method; } - /** {@inheritDoc} */ @Override public boolean usingProxy() { return isUsingProxy; } - /** {@inheritDoc} */ @Override public void connect() throws IOException { execute(); } - /** {@inheritDoc} */ @Override public void setHostnameVerifier(HostnameVerifier hostnameverifier) { this.hostnameverifier = hostnameverifier; } - /** {@inheritDoc} */ @Override public void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws KeyManagementException { diff --git a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java index 101886c88..40be0747e 100644 --- a/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java +++ b/org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java @@ -33,6 +33,7 @@ public class TemporaryBufferEntity extends AbstractHttpEntity * content stored in the specified buffer * * @param buffer + * the buffer */ public TemporaryBufferEntity(TemporaryBuffer buffer) { this.buffer = buffer; @@ -47,13 +48,11 @@ public TemporaryBuffer getBuffer() { return buffer; } - /** {@inheritDoc} */ @Override public boolean isRepeatable() { return true; } - /** {@inheritDoc} */ @Override public long getContentLength() { if (contentLength != null) @@ -61,20 +60,17 @@ public long getContentLength() { return buffer.length(); } - /** {@inheritDoc} */ @Override public InputStream getContent() throws IOException, IllegalStateException { return buffer.openInputStream(); } - /** {@inheritDoc} */ @Override public void writeTo(OutputStream outstream) throws IOException { // TODO: dont we need a progressmonitor buffer.writeTo(outstream, null); } - /** {@inheritDoc} */ @Override public boolean isStreaming() { return false; @@ -84,6 +80,7 @@ public boolean isStreaming() { * Set the contentLength * * @param contentLength + * content length */ public void setContentLength(int contentLength) { this.contentLength = Integer.valueOf(contentLength); diff --git a/org.eclipse.jgit.http.server/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.http.server/.settings/org.eclipse.jdt.core.prefs index f79df5b9d..a08ba7b56 100644 --- a/org.eclipse.jgit.http.server/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.http.server/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java index 59dc309cc..fb74dc702 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/AsIsFileFilter.java @@ -37,19 +37,16 @@ class AsIsFileFilter implements Filter { this.asIs = getAnyFile; } - /** {@inheritDoc} */ @Override public void init(FilterConfig config) throws ServletException { // Do nothing. } - /** {@inheritDoc} */ @Override public void destroy() { // Do nothing. } - /** {@inheritDoc} */ @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java index 0957cc80f..2f3eee41d 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java @@ -189,7 +189,6 @@ private void assertNotInitialized() { throw new IllegalStateException(HttpServerText.get().alreadyInitializedByContainer); } - /** {@inheritDoc} */ @Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); @@ -305,7 +304,6 @@ private static boolean getBoolean(FilterConfig cfg, String param) } } - /** {@inheritDoc} */ @Override protected ServletBinder register(ServletBinder binder) { if (resolver == null) diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java index 8e49b37b3..0157dff9f 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitServlet.java @@ -170,7 +170,6 @@ public void addReceivePackFilter(Filter filter) { gitFilter.addReceivePackFilter(filter); } - /** {@inheritDoc} */ @Override public void init(ServletConfig config) throws ServletException { gitFilter.init(new FilterConfig() { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoPacksServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoPacksServlet.java index e90580b75..d94cc4126 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoPacksServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoPacksServlet.java @@ -27,7 +27,6 @@ class InfoPacksServlet extends HttpServlet { private static final long serialVersionUID = 1L; - /** {@inheritDoc} */ @Override public void doGet(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java index f67313d77..4d86be191 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/InfoRefsServlet.java @@ -29,7 +29,6 @@ class InfoRefsServlet extends HttpServlet { private static final long serialVersionUID = 1L; - /** {@inheritDoc} */ @Override public void doGet(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/IsLocalFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/IsLocalFilter.java index e0d95128e..434cdb48d 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/IsLocalFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/IsLocalFilter.java @@ -33,19 +33,16 @@ * downstream servlet can directly access its contents on disk. */ class IsLocalFilter implements Filter { - /** {@inheritDoc} */ @Override public void init(FilterConfig config) throws ServletException { // Do nothing. } - /** {@inheritDoc} */ @Override public void destroy() { // Do nothing. } - /** {@inheritDoc} */ @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/NoCacheFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/NoCacheFilter.java index 4f9e6f222..b1a2b3099 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/NoCacheFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/NoCacheFilter.java @@ -26,19 +26,16 @@ /** Add HTTP response headers to prevent caching by proxies/browsers. */ class NoCacheFilter implements Filter { - /** {@inheritDoc} */ @Override public void init(FilterConfig config) throws ServletException { // Do nothing. } - /** {@inheritDoc} */ @Override public void destroy() { // Do nothing. } - /** {@inheritDoc} */ @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java index 625ab3e66..e581707cc 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ObjectFileServlet.java @@ -87,14 +87,12 @@ static class PackIdx extends PackData { abstract String etag(FileSender sender) throws IOException; - /** {@inheritDoc} */ @Override public void doGet(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { serve(req, rsp, true); } - /** {@inheritDoc} */ @Override protected void doHead(final HttpServletRequest req, final HttpServletResponse rsp) throws ServletException, IOException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackErrorHandler.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackErrorHandler.java index a7ca4d093..c87bbe614 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackErrorHandler.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackErrorHandler.java @@ -42,6 +42,7 @@ public interface ReceivePackErrorHandler { * @param r * A continuation that handles a git-receive-pack request. * @throws IOException + * if an IO error occurred */ void receive(HttpServletRequest req, HttpServletResponse rsp, ReceivePackRunnable r) throws IOException; @@ -52,7 +53,9 @@ public interface ReceivePackRunnable { * See {@link ReceivePack#receiveWithExceptionPropagation}. * * @throws ServiceMayNotContinueException + * if transport service cannot continue * @throws IOException + * if an IO error occurred */ void receive() throws ServiceMayNotContinueException, IOException; } diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java index f8c95f56d..56b4c8074 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/ReceivePackServlet.java @@ -136,7 +136,6 @@ public void destroy() { this.handler = handler; } - /** {@inheritDoc} */ @Override public void doPost(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java index 943e7f5d4..9ff922bd7 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/RepositoryFilter.java @@ -71,19 +71,16 @@ public RepositoryFilter(RepositoryResolver resolver) { this.resolver = resolver; } - /** {@inheritDoc} */ @Override public void init(FilterConfig config) throws ServletException { context = config.getServletContext(); } - /** {@inheritDoc} */ @Override public void destroy() { context = null; } - /** {@inheritDoc} */ @Override public void doFilter(final ServletRequest request, final ServletResponse response, final FilterChain chain) diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartOutputStream.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartOutputStream.java index 11123d007..fdac79d4b 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartOutputStream.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartOutputStream.java @@ -50,7 +50,6 @@ class SmartOutputStream extends TemporaryBuffer { this.compressStream = compressStream; } - /** {@inheritDoc} */ @Override protected OutputStream overflow() throws IOException { startedOutput = true; @@ -63,7 +62,6 @@ protected OutputStream overflow() throws IOException { return out; } - /** {@inheritDoc} */ @Override public void close() throws IOException { super.close(); diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java index 6110bff33..aa0443128 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/SmartServiceInfoRefs.java @@ -47,19 +47,16 @@ abstract class SmartServiceInfoRefs implements Filter { this.filters = filters.toArray(new Filter[0]); } - /** {@inheritDoc} */ @Override public void init(FilterConfig config) throws ServletException { // Do nothing. } - /** {@inheritDoc} */ @Override public void destroy() { // Do nothing. } - /** {@inheritDoc} */ @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { @@ -122,8 +119,12 @@ private void service(ServletRequest request, ServletResponse response) * @param db * repository * @throws IOException + * if an IO error occurred * @throws ServiceNotEnabledException + * if a service is not available * @throws ServiceNotAuthorizedException + * if service requires authentication and the current user + * didn't provide credentials */ protected abstract void begin(HttpServletRequest req, Repository db) throws IOException, ServiceNotEnabledException, @@ -135,35 +136,43 @@ protected abstract void begin(HttpServletRequest req, Repository db) * @param req * request * @param pck + * used to frame lines in PacketLineOut format * @throws IOException + * if an IO error occurred * @throws ServiceNotEnabledException + * if a service is not available * @throws ServiceNotAuthorizedException + * if service requires authentication and the current user + * didn't provide credentials */ protected abstract void advertise(HttpServletRequest req, PacketLineOutRefAdvertiser pck) throws IOException, ServiceNotEnabledException, ServiceNotAuthorizedException; /** - * Writes the appropriate response to an info/refs request received by - * a smart service. In protocol v0, this starts with "# - * service=serviceName" followed by a flush packet, but this is not - * necessarily the case in other protocol versions. + * Writes the appropriate response to an info/refs request received by a + * smart service. In protocol v0, this starts with "# service=serviceName" + * followed by a flush packet, but this is not necessarily the case in other + * protocol versions. *

- * The default implementation writes "# service=serviceName" and a - * flush packet, then calls {@link #advertise}. Subclasses should - * override this method if they support protocol versions other than - * protocol v0. + * The default implementation writes "# service=serviceName" and a flush + * packet, then calls {@link #advertise}. Subclasses should override this + * method if they support protocol versions other than protocol v0. * * @param req * request * @param pckOut * destination of response * @param serviceName - * service name to be written out in protocol v0; may or may - * not be used in other versions + * service name to be written out in protocol v0; may or may not + * be used in other versions * @throws IOException + * if an IO error occurred * @throws ServiceNotEnabledException + * if a service is not available * @throws ServiceNotAuthorizedException + * if service requires authentication and the current user + * didn't provide credentials */ protected void respond(HttpServletRequest req, PacketLineOut pckOut, String serviceName) diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java index df8eb7727..0b225e769 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/TextFileServlet.java @@ -35,7 +35,6 @@ class TextFileServlet extends HttpServlet { this.fileName = name; } - /** {@inheritDoc} */ @Override public void doGet(final HttpServletRequest req, final HttpServletResponse rsp) throws IOException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackErrorHandler.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackErrorHandler.java index 2aadbbc98..aaf537f28 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackErrorHandler.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackErrorHandler.java @@ -58,6 +58,7 @@ public static int statusCodeForThrowable(Throwable error) { } return SC_INTERNAL_SERVER_ERROR; } + /** * @param req * The HTTP request @@ -66,6 +67,7 @@ public static int statusCodeForThrowable(Throwable error) { * @param r * A continuation that handles a git-upload-pack request. * @throws IOException + * if an IO error occurred */ void upload(HttpServletRequest req, HttpServletResponse rsp, UploadPackRunnable r) throws IOException; @@ -76,7 +78,9 @@ public interface UploadPackRunnable { * See {@link UploadPack#uploadWithExceptionPropagation}. * * @throws ServiceMayNotContinueException + * transport service cannot continue * @throws IOException + * if an IO error occurred */ void upload() throws ServiceMayNotContinueException, IOException; } diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java index f16e56d94..74419a50d 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/UploadPackServlet.java @@ -158,7 +158,6 @@ public void destroy() { : this::defaultUploadPackHandler; } - /** {@inheritDoc} */ @Override public void doPost(HttpServletRequest req, HttpServletResponse rsp) throws IOException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ErrorServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ErrorServlet.java index 7f4243a73..822bb7964 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ErrorServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ErrorServlet.java @@ -35,7 +35,6 @@ public ErrorServlet(int status) { this.status = status; } - /** {@inheritDoc} */ @Override protected void doGet(HttpServletRequest req, HttpServletResponse rsp) throws ServletException, IOException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java index 772b99661..e626bec13 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaFilter.java @@ -97,13 +97,11 @@ public ServletBinder serveRegex(Pattern pattern) { return register(new RegexPipeline.Binder(pattern)); } - /** {@inheritDoc} */ @Override public void init(FilterConfig filterConfig) throws ServletException { servletContext = filterConfig.getServletContext(); } - /** {@inheritDoc} */ @Override public void destroy() { if (pipelines != null) { @@ -140,7 +138,6 @@ public int size() { }; } - /** {@inheritDoc} */ @Override public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java index a0fa5ea5b..9a1a24960 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/MetaServlet.java @@ -88,7 +88,6 @@ public ServletBinder serveRegex(String expression) { return filter.serveRegex(expression); } - /** {@inheritDoc} */ @Override public void init(ServletConfig config) throws ServletException { String name = filter.getClass().getName(); @@ -96,13 +95,11 @@ public void init(ServletConfig config) throws ServletException { filter.init(new NoParameterFilterConfig(name, ctx)); } - /** {@inheritDoc} */ @Override public void destroy() { filter.destroy(); } - /** {@inheritDoc} */ @Override protected void service(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java index ebe272885..3f7ee2a66 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/NoParameterFilterConfig.java @@ -26,13 +26,11 @@ final class NoParameterFilterConfig implements FilterConfig { this.context = context; } - /** {@inheritDoc} */ @Override public String getInitParameter(String name) { return null; } - /** {@inheritDoc} */ @Override public Enumeration getInitParameterNames() { return new Enumeration<>() { @@ -49,13 +47,11 @@ public String nextElement() { }; } - /** {@inheritDoc} */ @Override public ServletContext getServletContext() { return context; } - /** {@inheritDoc} */ @Override public String getFilterName() { return filterName; diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java index a321c9672..c8ff6a330 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexGroupFilter.java @@ -49,19 +49,16 @@ public RegexGroupFilter(int groupIdx) { this.groupIdx = groupIdx - 1; } - /** {@inheritDoc} */ @Override public void init(FilterConfig config) throws ServletException { // Do nothing. } - /** {@inheritDoc} */ @Override public void destroy() { // Do nothing. } - /** {@inheritDoc} */ @Override public void doFilter(final ServletRequest request, final ServletResponse rsp, final FilterChain chain) diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java index 431202b2b..5baa14a61 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java @@ -131,7 +131,6 @@ void service(HttpServletRequest req, HttpServletResponse rsp) } } - /** {@inheritDoc} */ @Override public String toString() { return "Pipeline[regex: " + pattern + " ]"; diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java index 21f180023..cd490230d 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/ServletBinderImpl.java @@ -28,7 +28,6 @@ abstract class ServletBinderImpl implements ServletBinder { this.filters = new ArrayList<>(); } - /** {@inheritDoc} */ @Override public ServletBinder through(Filter filter) { if (filter == null) @@ -37,7 +36,6 @@ public ServletBinder through(Filter filter) { return this; } - /** {@inheritDoc} */ @Override public void with(HttpServlet servlet) { if (servlet == null) diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java index 86441b18c..39d57b59e 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/SuffixPipeline.java @@ -70,7 +70,6 @@ void service(HttpServletRequest req, HttpServletResponse rsp) super.service(new WrappedRequest(req, newPath, newInfo), rsp); } - /** {@inheritDoc} */ @Override public String toString() { return "Pipeline[ *" + suffix + " ]"; diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/WrappedRequest.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/WrappedRequest.java index e6bc93428..4bac04023 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/WrappedRequest.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/WrappedRequest.java @@ -38,20 +38,17 @@ public WrappedRequest(final HttpServletRequest originalRequest, this.pathInfo = pathInfo; } - /** {@inheritDoc} */ @Override public String getPathTranslated() { final String p = getPathInfo(); return p != null ? getSession().getServletContext().getRealPath(p) : null; } - /** {@inheritDoc} */ @Override public String getPathInfo() { return pathInfo; } - /** {@inheritDoc} */ @Override public String getServletPath() { return path; diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java index 16b27e8bd..0bf10cbd7 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultReceivePackFactory.java @@ -47,7 +47,6 @@ private static class ServiceConfig { } } - /** {@inheritDoc} */ @Override public ReceivePack create(HttpServletRequest req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java index d362a96be..29314359c 100644 --- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java +++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/resolver/DefaultUploadPackFactory.java @@ -38,7 +38,6 @@ private static class ServiceConfig { } } - /** {@inheritDoc} */ @Override public UploadPack create(HttpServletRequest req, Repository db) throws ServiceNotEnabledException, ServiceNotAuthorizedException { diff --git a/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java b/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java index 4167b038e..86da87f8d 100644 --- a/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java +++ b/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/RefsUnreadableInMemoryRepository.java @@ -36,7 +36,6 @@ class RefsUnreadableInMemoryRepository extends InMemoryRepository { failing = false; } - /** {@inheritDoc} */ @Override public RefDatabase getRefDatabase() { return refs; @@ -54,7 +53,6 @@ void startFailing() { private class RefsUnreadableRefDatabase extends MemRefDatabase { - /** {@inheritDoc} */ @Override public Ref exactRef(String name) throws IOException { if (failing) { @@ -63,7 +61,6 @@ public Ref exactRef(String name) throws IOException { return super.exactRef(name); } - /** {@inheritDoc} */ @Override public Map getRefs(String prefix) throws IOException { if (failing) { @@ -73,7 +70,6 @@ public Map getRefs(String prefix) throws IOException { return super.getRefs(prefix); } - /** {@inheritDoc} */ @Override public List getRefsByPrefix(String prefix) throws IOException { if (failing) { @@ -83,7 +79,6 @@ public List getRefsByPrefix(String prefix) throws IOException { return super.getRefsByPrefix(prefix); } - /** {@inheritDoc} */ @Override public List getRefsByPrefixWithExclusions(String include, Set excludes) throws IOException { @@ -94,7 +89,6 @@ public List getRefsByPrefixWithExclusions(String include, Set exclu return super.getRefsByPrefixWithExclusions(include, excludes); } - /** {@inheritDoc} */ @Override public Set getTipsWithSha1(ObjectId id) throws IOException { if (failing) { diff --git a/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/TestRepositoryResolver.java b/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/TestRepositoryResolver.java index 6478b9422..82168d1c5 100644 --- a/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/TestRepositoryResolver.java +++ b/org.eclipse.jgit.http.test/src/org/eclipse/jgit/http/test/TestRepositoryResolver.java @@ -41,7 +41,6 @@ public TestRepositoryResolver(TestRepository repo, String repoName) this.repoName = repoName; } - /** {@inheritDoc} */ @Override public Repository open(HttpServletRequest req, String name) throws RepositoryNotFoundException, ServiceNotEnabledException { diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java index 873d43067..3d4f37924 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AccessEvent.java @@ -146,7 +146,6 @@ public String getResponseHeader(String name) { return responseHeaders != null ? responseHeaders.get(name) : null; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder b = new StringBuilder(); diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java index 36f2f2bc7..de4535ab5 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/AppServer.java @@ -260,7 +260,9 @@ public ServletContextHandler addContext(String path) { * Configure basic authentication. * * @param ctx + * servlet context handler * @param methods + * the methods * @return servlet context handler */ public ServletContextHandler authBasic(ServletContextHandler ctx, diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java index 877b91869..8a4d36370 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/HttpTestCase.java @@ -45,14 +45,12 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { /** In-memory application server; subclass must start. */ protected AppServer server; - /** {@inheritDoc} */ @Override public void setUp() throws Exception { super.setUp(); server = createServer(); } - /** {@inheritDoc} */ @Override public void tearDown() throws Exception { server.tearDown(); @@ -78,6 +76,7 @@ protected AppServer createServer() { * * @return the TestRepository * @throws IOException + * if an IO error occurred */ protected TestRepository createTestRepository() throws IOException { @@ -90,8 +89,10 @@ protected TestRepository createTestRepository() * Convert path to URIish * * @param path + * the path * @return the URIish * @throws URISyntaxException + * if URI is invalid */ protected URIish toURIish(String path) throws URISyntaxException { URI u = server.getURI().resolve(path); @@ -102,9 +103,12 @@ protected URIish toURIish(String path) throws URISyntaxException { * Convert a path relative to the app's context path to a URIish * * @param app + * app name * @param name + * context path name * @return the warnings (if any) from the last execution * @throws URISyntaxException + * if URI is invalid */ protected URIish toURIish(ServletContextHandler app, String name) throws URISyntaxException { @@ -128,7 +132,9 @@ protected List getRequests() { * Get requests. * * @param base + * base URI * @param path + * the request path relative to {@code base} * * @return list of events */ @@ -140,6 +146,7 @@ protected List getRequests(URIish base, String path) { * Get requests. * * @param path + * request path * * @return list of events */ @@ -151,8 +158,11 @@ protected List getRequests(String path) { * Run fsck * * @param db + * the repository * @param tips + * tips to start checking from * @throws Exception + * if an error occurred */ protected static void fsck(Repository db, RevObject... tips) throws Exception { @@ -166,6 +176,7 @@ protected static void fsck(Repository db, RevObject... tips) * Mirror refs * * @param refs + * the refs * @return set of RefSpecs */ protected static Set mirror(String... refs) { @@ -183,9 +194,12 @@ protected static Set mirror(String... refs) { * Push a commit * * @param from + * repository from which to push * @param q + * commit to push * @return collection of RefUpdates * @throws IOException + * if an IO error occurred */ protected static Collection push(TestRepository from, RevCommit q) throws IOException { @@ -205,7 +219,9 @@ protected static Collection push(TestRepository from, * Create loose object path * * @param base + * base URI * @param id + * objectId * @return path of the loose object */ public static String loose(URIish base, AnyObjectId id) { @@ -219,6 +235,7 @@ public static String loose(URIish base, AnyObjectId id) { * Join a base URIish and a path * * @param base + * base URI * @param path * a relative path * @return the joined path @@ -237,8 +254,11 @@ public static String join(URIish base, String path) { * Rewrite a url * * @param url + * the URL * @param newProtocol + * new protocol * @param newPort + * new port * @return the rewritten url */ protected static String rewriteUrl(String url, String newProtocol, @@ -263,9 +283,12 @@ protected static String rewriteUrl(String url, String newProtocol, * Extend a path * * @param uri + * the URI * @param pathComponents + * path components * @return the extended URIish * @throws URISyntaxException + * if URI is invalid */ protected static URIish extendPath(URIish uri, String pathComponents) throws URISyntaxException { diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/MockServletConfig.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/MockServletConfig.java index 715fd1945..cd1eba4bf 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/MockServletConfig.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/MockServletConfig.java @@ -28,19 +28,19 @@ public class MockServletConfig implements ServletConfig { * Set init parameter. * * @param name + * parameter name * @param value + * parameter value */ public void setInitParameter(String name, String value) { parameters.put(name, value); } - /** {@inheritDoc} */ @Override public String getInitParameter(String name) { return parameters.get(name); } - /** {@inheritDoc} */ @Override public Enumeration getInitParameterNames() { final Iterator i = parameters.keySet().iterator(); @@ -58,13 +58,11 @@ public String nextElement() { }; } - /** {@inheritDoc} */ @Override public String getServletName() { return "MOCK_SERVLET"; } - /** {@inheritDoc} */ @Override public ServletContext getServletContext() { return null; diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java index af63084e9..f56e1fa5c 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/RecordingLogger.java @@ -70,6 +70,7 @@ public RecordingLogger() { * Constructor for RecordingLogger. * * @param name + * logger name */ public RecordingLogger(String name) { this.name = name; diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java index 2493f999f..01f18dab7 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/SimpleHttpServer.java @@ -40,6 +40,7 @@ public class SimpleHttpServer { * Constructor for SimpleHttpServer. * * @param repository + * the repository */ public SimpleHttpServer(Repository repository) { this(repository, false); @@ -49,7 +50,9 @@ public SimpleHttpServer(Repository repository) { * Constructor for SimpleHttpServer. * * @param repository + * the repository * @param withSsl + * whether to encrypt the communication */ public SimpleHttpServer(Repository repository, boolean withSsl) { this.db = repository; @@ -60,6 +63,7 @@ public SimpleHttpServer(Repository repository, boolean withSsl) { * Start the server * * @throws Exception + * if an error occurred */ public void start() throws Exception { ServletContextHandler sBasic = server.authBasic(smart("/sbasic")); @@ -76,6 +80,7 @@ public void start() throws Exception { * Stop the server. * * @throws Exception + * if an error occurred */ public void stop() throws Exception { server.tearDown(); diff --git a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java index 04cb2428a..afa8c35bb 100644 --- a/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java +++ b/org.eclipse.jgit.junit.http/src/org/eclipse/jgit/junit/http/TestRequestLog.java @@ -72,7 +72,6 @@ List getEvents() { } } - /** {@inheritDoc} */ @Override public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) diff --git a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java index 5d043ffc3..1138be8a9 100644 --- a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java +++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestGitServer.java @@ -116,7 +116,9 @@ public class SshTestGitServer { * @param hostKey * the unencrypted private key to use as host key * @throws IOException + * if an IO error occurred * @throws GeneralSecurityException + * if something went wrong */ public SshTestGitServer(@NonNull String testUser, @NonNull Path testKey, @NonNull Repository repository, @NonNull byte[] hostKey) @@ -138,7 +140,9 @@ public SshTestGitServer(@NonNull String testUser, @NonNull Path testKey, * @param hostKey * the unencrypted private key to use as host key * @throws IOException + * if an IO error occurred * @throws GeneralSecurityException + * if something went wrong * @since 5.9 */ public SshTestGitServer(@NonNull String testUser, @NonNull Path testKey, @@ -413,6 +417,7 @@ public PropertyResolver getPropertyResolver() { * @return the port the server listens on; test clients should connect to * that port * @throws IOException + * if an IO error occurred */ public int start() throws IOException { server.start(); @@ -423,6 +428,7 @@ public int start() throws IOException { * Stops the test server. * * @throws IOException + * if an IO error occurred */ public void stop() throws IOException { executorService.shutdownNow(); diff --git a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java index a28d5ebd9..6fa30d7e1 100644 --- a/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java +++ b/org.eclipse.jgit.junit.ssh/src/org/eclipse/jgit/junit/ssh/SshTestHarness.java @@ -191,6 +191,7 @@ private static void write(BufferedWriter out, byte[] bytes, int lineLength) * to use * @return the public-key part of the line * @throws IOException + * if an IO error occurred */ protected static String createKnownHostsFile(File file, String host, int port, File publicKey) throws IOException { diff --git a/org.eclipse.jgit.junit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.junit/.settings/org.eclipse.jdt.core.prefs index bdfba71f5..bb15648cb 100644 --- a/org.eclipse.jgit.junit/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.junit/.settings/org.eclipse.jdt.core.prefs @@ -56,7 +56,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java index 61d3b860e..177d8737c 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/JGitTestUtil.java @@ -107,6 +107,7 @@ private static String s(byte[] raw) { * Get test resource file. * * @param fileName + * file name * @return the test resource file */ public static File getTestResourceFile(String fileName) { @@ -141,8 +142,11 @@ public static File getTestResourceFile(String fileName) { * Copy test resource. * * @param name + * resource name * @param dest + * destination file * @throws IOException + * if an IO error occurred */ public static void copyTestResource(String name, File dest) throws IOException { @@ -165,10 +169,14 @@ private static ClassLoader cl() { * Write a trash file. * * @param db + * the repository * @param name + * file name * @param data + * file content * @return the trash file * @throws IOException + * if an IO error occurred */ public static File writeTrashFile(final Repository db, final String name, final String data) throws IOException { @@ -181,11 +189,16 @@ public static File writeTrashFile(final Repository db, * Write a trash file. * * @param db + * the repository * @param subdir + * under working tree * @param name + * file name * @param data + * file content * @return the trash file * @throws IOException + * if an IO error occurred */ public static File writeTrashFile(final Repository db, final String subdir, @@ -237,9 +250,12 @@ public static String read(File file) throws IOException { * Read a file's content * * @param db + * the repository * @param name + * file name * @return the content of the file * @throws IOException + * if an IO error occurred */ public static String read(Repository db, String name) throws IOException { @@ -251,6 +267,7 @@ public static String read(Repository db, String name) * Check if file exists * * @param db + * the repository * @param name * name of the file * @return {@code true} if the file exists @@ -264,8 +281,11 @@ public static boolean check(Repository db, String name) { * Delete a trash file. * * @param db + * the repository * @param name + * file name * @throws IOException + * if an IO error occurred */ public static void deleteTrashFile(final Repository db, final String name) throws IOException { @@ -284,6 +304,7 @@ public static void deleteTrashFile(final Repository db, * the target of the symbolic link * @return the path to the symbolic link * @throws Exception + * if an error occurred * @since 4.2 */ public static Path writeLink(Repository db, String link, diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java index 59662cec9..0945327ab 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/LocalDiskRepositoryTestCase.java @@ -107,6 +107,7 @@ private String getTestName() { * Setup test * * @throws Exception + * if an error occurred */ @Before public void setUp() throws Exception { @@ -189,6 +190,7 @@ private static String makePath(List objects) { * Tear down the test * * @throws Exception + * if an error occurred */ @After public void tearDown() throws Exception { @@ -314,11 +316,11 @@ private static void reportDeleteFailure(boolean failOnError, File f, * {@link #CONTENT} controlling which info is present in the * resulting string. * @return a string encoding the index state - * @throws IllegalStateException * @throws IOException + * if an IO error occurred */ public static String indexState(Repository repo, int includedOptions) - throws IllegalStateException, IOException { + throws IOException { DirCache dc = repo.readDirCache(); StringBuilder sb = new StringBuilder(); TreeSet timeStamps = new TreeSet<>(); @@ -452,6 +454,7 @@ public void addRepoToClose(Repository r) { * a subdirectory * @return a unique directory for a test * @throws IOException + * if an IO error occurred */ protected File createTempDirectory(String name) throws IOException { File directory = new File(createTempFile(), name); @@ -467,6 +470,7 @@ protected File createTempDirectory(String name) throws IOException { * working directory * @return a unique directory for a test repository * @throws IOException + * if an IO error occurred */ protected File createUniqueTestGitDir(boolean bare) throws IOException { String gitdirName = createTempFile().getPath(); @@ -487,6 +491,7 @@ protected File createUniqueTestGitDir(boolean bare) throws IOException { * * @return a unique path that does not exist. * @throws IOException + * if an IO error occurred */ protected File createTempFile() throws IOException { File p = File.createTempFile("tmp_", "", tmp); @@ -586,6 +591,7 @@ protected void write(File f, String body) throws IOException { * the file * @return the content of the file * @throws IOException + * if an IO error occurred */ protected String read(File f) throws IOException { return JGitTestUtil.read(f); diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java index 6bfe70659..4dbfc59ec 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/MockSystemReader.java @@ -144,32 +144,30 @@ public void clearProperties() { * Set a property * * @param key + * the key * @param value + * the value */ public void setProperty(String key, String value) { values.put(key, value); } - /** {@inheritDoc} */ @Override public String getenv(String variable) { return values.get(variable); } - /** {@inheritDoc} */ @Override public String getProperty(String key) { return values.get(key); } - /** {@inheritDoc} */ @Override public FileBasedConfig openUserConfig(Config parent, FS fs) { assert parent == null || parent == systemGitConfig; return userGitConfig; } - /** {@inheritDoc} */ @Override public FileBasedConfig openSystemConfig(Config parent, FS fs) { assert parent == null; @@ -193,19 +191,16 @@ public StoredConfig getSystemConfig() return systemGitConfig; } - /** {@inheritDoc} */ @Override public String getHostname() { return "fake.host.example.com"; } - /** {@inheritDoc} */ @Override public long getCurrentTime() { return now; } - /** {@inheritDoc} */ @Override public MonotonicClock getClock() { return () -> { @@ -236,31 +231,26 @@ public void tick(int secDelta) { now += secDelta * 1000L; } - /** {@inheritDoc} */ @Override public int getTimezone(long when) { return getTimeZone().getOffset(when) / (60 * 1000); } - /** {@inheritDoc} */ @Override public TimeZone getTimeZone() { return TimeZone.getTimeZone("GMT-03:30"); } - /** {@inheritDoc} */ @Override public Locale getLocale() { return Locale.US; } - /** {@inheritDoc} */ @Override public SimpleDateFormat getSimpleDateFormat(String pattern) { return new SimpleDateFormat(pattern, getLocale()); } - /** {@inheritDoc} */ @Override public DateFormat getDateTimeInstance(int dateStyle, int timeStyle) { return DateFormat diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/Repeat.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/Repeat.java index 343aa92f8..4bf2eb59d 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/Repeat.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/Repeat.java @@ -21,6 +21,8 @@ public @interface Repeat { /** * Number of repetitions + * + * @return number of repetitions */ public abstract int n(); diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java index adcc10cad..30fffe9d9 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java @@ -125,7 +125,6 @@ public void evaluate() throws Throwable { } } - /** {@inheritDoc} */ @Override public Statement apply(Statement statement, Description description) { Statement result = statement; diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java index 04988f628..3a283ce10 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepositoryTestCase.java @@ -62,8 +62,11 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * Copy a file * * @param src + * file to copy * @param dst + * destination of the copy * @throws IOException + * if an IO error occurred */ protected static void copyFile(File src, File dst) throws IOException { @@ -81,9 +84,12 @@ protected static void copyFile(File src, File dst) * Write a trash file * * @param name + * file name * @param data + * file content * @return the trash file * @throws IOException + * if an IO error occurred */ protected File writeTrashFile(String name, String data) throws IOException { @@ -99,6 +105,7 @@ protected File writeTrashFile(String name, String data) * the target of the symbolic link * @return the path to the symbolic link * @throws Exception + * if an error occurred * @since 4.2 */ protected Path writeLink(String link, String target) @@ -110,10 +117,14 @@ protected Path writeLink(String link, String target) * Write a trash file * * @param subdir + * in working tree * @param name + * file name * @param data + * file content * @return the trash file * @throws IOException + * if an IO error occurred */ protected File writeTrashFile(final String subdir, final String name, final String data) @@ -125,8 +136,10 @@ protected File writeTrashFile(final String subdir, final String name, * Read content of a file * * @param name + * file name * @return the file's content * @throws IOException + * if an IO error occurred */ protected String read(String name) throws IOException { return JGitTestUtil.read(db, name); @@ -149,6 +162,7 @@ protected boolean check(String name) { * @param name * file name * @throws IOException + * if an IO error occurred */ protected void deleteTrashFile(String name) throws IOException { JGitTestUtil.deleteTrashFile(db, name); @@ -158,9 +172,11 @@ protected void deleteTrashFile(String name) throws IOException { * Check content of a file. * * @param f + * file * @param checkData * expected content * @throws IOException + * if an IO error occurred */ protected static void checkFile(File f, String checkData) throws IOException { @@ -181,7 +197,6 @@ protected static void checkFile(File f, String checkData) /** Working directory of {@link #db}. */ protected File trash; - /** {@inheritDoc} */ @Override @Before public void setUp() throws Exception { @@ -229,11 +244,11 @@ public void tearDown() throws Exception { * {@link #CONTENT} controlling which info is present in the * resulting string. * @return a string encoding the index state - * @throws IllegalStateException * @throws IOException + * if an IO error occurred */ public String indexState(int includedOptions) - throws IllegalStateException, IOException { + throws IOException { return indexState(db, includedOptions); } @@ -251,7 +266,9 @@ public String indexState(int includedOptions) * a {@link org.eclipse.jgit.treewalk.FileTreeIterator} which * determines which files should go into the new index * @throws FileNotFoundException + * file was not found * @throws IOException + * if an IO error occurred */ protected void resetIndex(FileTreeIterator treeItr) throws FileNotFoundException, IOException { @@ -339,7 +356,9 @@ public static String slashify(String str) { * @return return the last measured value of the filesystem timer which is * greater than then the lastmodification time of lastfile. * @throws InterruptedException + * if thread was interrupted * @throws IOException + * if an IO error occurred * @since 5.1.9 */ public static Instant fsTick(File lastFile) @@ -378,8 +397,11 @@ public static Instant fsTick(File lastFile) * Create a branch * * @param objectId + * new value to create the branch on * @param branchName + * branch name * @throws IOException + * if an IO error occurred */ protected void createBranch(ObjectId objectId, String branchName) throws IOException { @@ -393,6 +415,7 @@ protected void createBranch(ObjectId objectId, String branchName) * * @return list of refs * @throws IOException + * if an IO error occurred */ public List getRefs() throws IOException { return db.getRefDatabase().getRefs(); @@ -402,11 +425,12 @@ public List getRefs() throws IOException { * Checkout a branch * * @param branchName - * @throws IllegalStateException + * branch name * @throws IOException + * if an IO error occurred */ protected void checkoutBranch(String branchName) - throws IllegalStateException, IOException { + throws IOException { try (RevWalk walk = new RevWalk(db)) { RevCommit head = walk.parseCommit(db.resolve(Constants.HEAD)); RevCommit branch = walk.parseCommit(db.resolve(branchName)); @@ -436,7 +460,9 @@ protected void checkoutBranch(String branchName) * the contents which should be written into the files * @return the File object associated to the last written file. * @throws IOException + * if an IO error occurred * @throws InterruptedException + * if thread was interrupted */ protected File writeTrashFiles(boolean ensureDistinctTimestamps, String... contents) @@ -459,8 +485,11 @@ protected File writeTrashFiles(boolean ensureDistinctTimestamps, * one. * * @param filename + * file name * @param contents + * file content * @param branch + * branch name * @return the created commit */ protected RevCommit commitFile(String filename, String contents, String branch) { @@ -494,7 +523,9 @@ else if (empty) * Create DirCacheEntry * * @param path + * file path * @param mode + * file mode * @return the DirCacheEntry */ protected DirCacheEntry createEntry(String path, FileMode mode) { @@ -505,8 +536,11 @@ protected DirCacheEntry createEntry(String path, FileMode mode) { * Create DirCacheEntry * * @param path + * file path * @param mode + * file mode * @param content + * file content * @return the DirCacheEntry */ protected DirCacheEntry createEntry(final String path, final FileMode mode, @@ -518,9 +552,13 @@ protected DirCacheEntry createEntry(final String path, final FileMode mode, * Create DirCacheEntry * * @param path + * file path * @param mode + * file mode * @param stage + * stage index of the new entry * @param content + * file content * @return the DirCacheEntry */ protected DirCacheEntry createEntry(final String path, final FileMode mode, @@ -538,7 +576,9 @@ protected DirCacheEntry createEntry(final String path, final FileMode mode, * Create DirCacheEntry * * @param path + * file path * @param objectId + * of the entry * @return the DirCacheEntry */ protected DirCacheEntry createGitLink(String path, AnyObjectId objectId) { @@ -553,8 +593,11 @@ protected DirCacheEntry createGitLink(String path, AnyObjectId objectId) { * Assert files are equal * * @param expected + * expected file * @param actual + * actual file * @throws IOException + * if an IO error occurred */ public static void assertEqualsFile(File expected, File actual) throws IOException { diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java index c77bca975..0168ecea3 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/StrictWorkMonitor.java @@ -20,32 +20,27 @@ public final class StrictWorkMonitor implements ProgressMonitor { private int lastWork, totalWork; - /** {@inheritDoc} */ @Override public void start(int totalTasks) { // empty } - /** {@inheritDoc} */ @Override public void beginTask(String title, int total) { this.totalWork = total; lastWork = 0; } - /** {@inheritDoc} */ @Override public void update(int completed) { lastWork += completed; } - /** {@inheritDoc} */ @Override public void endTask() { assertEquals("Units of work recorded", totalWork, lastWork); } - /** {@inheritDoc} */ @Override public boolean isCancelled() { return false; diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java index 483b9a7c8..4b4553547 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java @@ -115,6 +115,7 @@ public class TestRepository implements AutoCloseable { * @param db * the test repository to write into. * @throws IOException + * if an IO error occurred */ public TestRepository(R db) throws IOException { this(db, new RevWalk(db), new MockSystemReader()); @@ -128,6 +129,7 @@ public TestRepository(R db) throws IOException { * @param rw * the RevObject pool to use for object lookup. * @throws IOException + * if an IO error occurred */ public TestRepository(R db, RevWalk rw) throws IOException { this(db, rw, new MockSystemReader()); @@ -144,6 +146,7 @@ public TestRepository(R db, RevWalk rw) throws IOException { * the MockSystemReader to use for clock and other system * operations. * @throws IOException + * if an IO error occurred * @since 4.2 */ public TestRepository(R db, RevWalk rw, MockSystemReader reader) @@ -235,6 +238,7 @@ public void setAuthorAndCommitter(org.eclipse.jgit.lib.CommitBuilder c) { * file content, will be UTF-8 encoded. * @return reference to the blob. * @throws Exception + * if an error occurred */ public RevBlob blob(String content) throws Exception { return blob(content.getBytes(UTF_8)); @@ -247,6 +251,7 @@ public RevBlob blob(String content) throws Exception { * binary file content. * @return the new, fully parsed blob. * @throws Exception + * if an error occurred */ public RevBlob blob(byte[] content) throws Exception { ObjectId id; @@ -266,6 +271,7 @@ public RevBlob blob(byte[] content) throws Exception { * a blob, previously constructed in the repository. * @return the entry. * @throws Exception + * if an error occurred */ public DirCacheEntry file(String path, RevBlob blob) throws Exception { @@ -284,6 +290,7 @@ public DirCacheEntry file(String path, RevBlob blob) * a blob, previously constructed in the repository. * @return the entry. * @throws Exception + * if an error occurred * @since 6.3 */ public DirCacheEntry link(String path, RevBlob blob) throws Exception { @@ -301,6 +308,7 @@ public DirCacheEntry link(String path, RevBlob blob) throws Exception { * to be sorted properly and may be empty. * @return the new, fully parsed tree specified by the entry list. * @throws Exception + * if an error occurred */ public RevTree tree(DirCacheEntry... entries) throws Exception { final DirCache dc = DirCache.newInCore(); @@ -326,6 +334,7 @@ public RevTree tree(DirCacheEntry... entries) throws Exception { * the path to find the entry of. * @return the parsed object entry at this path, never null. * @throws Exception + * if an error occurred */ public RevObject get(RevTree tree, String path) throws Exception { @@ -357,6 +366,7 @@ public RevObject get(RevTree tree, String path) * zero or more IDs of the commit's parents. * @return the ID of the new commit. * @throws Exception + * if an error occurred * @since 5.5 */ public ObjectId unparsedCommit(ObjectId... parents) throws Exception { @@ -373,6 +383,7 @@ public ObjectId unparsedCommit(ObjectId... parents) throws Exception { * zero or more parents of the commit. * @return the new commit. * @throws Exception + * if an error occurred */ public RevCommit commit(RevCommit... parents) throws Exception { return commit(1, tree(), parents); @@ -389,6 +400,7 @@ public RevCommit commit(RevCommit... parents) throws Exception { * zero or more parents of the commit. * @return the new commit. * @throws Exception + * if an error occurred */ public RevCommit commit(RevTree tree, RevCommit... parents) throws Exception { @@ -407,6 +419,7 @@ public RevCommit commit(RevTree tree, RevCommit... parents) * zero or more parents of the commit. * @return the new commit. * @throws Exception + * if an error occurred */ public RevCommit commit(int secDelta, RevCommit... parents) throws Exception { @@ -428,6 +441,7 @@ public RevCommit commit(int secDelta, RevCommit... parents) * zero or more parents of the commit. * @return the new, fully parsed commit. * @throws Exception + * if an error occurred */ public RevCommit commit(final int secDelta, final RevTree tree, final RevCommit... parents) throws Exception { @@ -450,6 +464,7 @@ public RevCommit commit(final int secDelta, final RevTree tree, * zero or more IDs of the commit's parents. * @return the ID of the new commit. * @throws Exception + * if an error occurred * @since 5.5 */ public ObjectId unparsedCommit(final int secDelta, final RevTree tree, @@ -496,6 +511,7 @@ public CommitBuilder commit() { * object the tag should be pointed at. * @return the new, fully parsed annotated tag object. * @throws Exception + * if an error occurred */ public RevTag tag(String name, RevObject dst) throws Exception { final TagBuilder t = new TagBuilder(); @@ -524,6 +540,7 @@ public RevTag tag(String name, RevObject dst) throws Exception { * the target object. * @return the target object. * @throws Exception + * if an error occurred */ public RevCommit update(String ref, CommitBuilder to) throws Exception { return update(ref, to.create()); @@ -534,12 +551,13 @@ public RevCommit update(String ref, CommitBuilder to) throws Exception { * * @param ref * the name of the reference to amend, which must already exist. - * If {@code ref} does not start with {@code refs/} and is not the - * magic names {@code HEAD} {@code FETCH_HEAD} or {@code - * MERGE_HEAD}, then {@code refs/heads/} will be prefixed in front - * of the given name, thereby assuming it is a branch. + * If {@code ref} does not start with {@code refs/} and is not + * the magic names {@code HEAD} {@code FETCH_HEAD} or {@code + * MERGE_HEAD}, then {@code refs/heads/} will be prefixed in + * front of the given name, thereby assuming it is a branch. * @return commit builder that amends the branch on commit. * @throws Exception + * if an error occurred */ public CommitBuilder amendRef(String ref) throws Exception { String name = normalizeRef(ref); @@ -556,6 +574,7 @@ public CommitBuilder amendRef(String ref) throws Exception { * the id of the commit to amend. * @return commit builder. * @throws Exception + * if an error occurred */ public CommitBuilder amend(AnyObjectId id) throws Exception { return amend(pool.parseCommit(id), commit()); @@ -610,6 +629,7 @@ public void apply(DirCacheEntry ent) { * the target object. * @return the target object. * @throws Exception + * if an error occurred */ public T update(String ref, T obj) throws Exception { ref = normalizeRef(ref); @@ -632,9 +652,10 @@ public T update(String ref, T obj) throws Exception { * Delete a reference. * * @param ref - * the name of the reference to delete. This is normalized - * in the same way as {@link #update(String, AnyObjectId)}. + * the name of the reference to delete. This is normalized in the + * same way as {@link #update(String, AnyObjectId)}. * @throws Exception + * if an error occurred * @since 4.4 */ public void delete(String ref) throws Exception { @@ -674,6 +695,7 @@ private static String normalizeRef(String ref) { * @param id * ID of detached head. * @throws Exception + * if an error occurred * @see #reset(String) */ public void reset(AnyObjectId id) throws Exception { @@ -695,13 +717,14 @@ public void reset(AnyObjectId id) throws Exception { /** * Soft-reset HEAD to a different commit. *

- * This is equivalent to {@code git reset --soft} in that it modifies HEAD but - * not the index or the working tree of a non-bare repository. + * This is equivalent to {@code git reset --soft} in that it modifies HEAD + * but not the index or the working tree of a non-bare repository. * * @param name - * revision string; either an existing ref name, or something that - * can be parsed to an object ID. + * revision string; either an existing ref name, or something + * that can be parsed to an object ID. * @throws Exception + * if an error occurred */ public void reset(String name) throws Exception { RefUpdate.Result result; @@ -735,6 +758,7 @@ public void reset(String name) throws Exception { * @return the new, fully parsed commit, or null if no work was done due to * the resulting tree being identical. * @throws Exception + * if an error occurred */ public RevCommit cherryPick(AnyObjectId id) throws Exception { RevCommit commit = pool.parseCommit(id); @@ -779,6 +803,7 @@ public RevCommit cherryPick(AnyObjectId id) throws Exception { * Update the dumb client server info files. * * @throws Exception + * if an error occurred */ public void updateServerInfo() throws Exception { if (db instanceof FileRepository) { @@ -816,6 +841,7 @@ protected void writeFile(String name, byte[] bin) * parsing of. * @return {@code object} * @throws Exception + * if an error occurred */ public T parseBody(T object) throws Exception { pool.parseBody(object); @@ -851,6 +877,7 @@ public BranchBuilder branch(String ref) { * the object to tag * @return the tagged object * @throws Exception + * if an error occurred */ public ObjectId lightweightTag(String name, ObjectId obj) throws Exception { if (!name.startsWith(Constants.R_TAGS)) @@ -868,8 +895,11 @@ public ObjectId lightweightTag(String name, ObjectId obj) throws Exception { * the tips to start checking from; if not supplied the refs of * the repository are used instead. * @throws MissingObjectException + * if object is missing * @throws IncorrectObjectTypeException + * if object has unexpected type * @throws IOException + * if an IO error occurred */ public void fsck(RevObject... tips) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -922,6 +952,7 @@ private static void assertHash(RevObject id, byte[] bin) { * not removed. * * @throws Exception + * if an error occurred */ public void packAndPrune() throws Exception { if (db.getObjectDatabase() instanceof ObjectDirectory) { @@ -1022,6 +1053,7 @@ public CommitBuilder commit() throws Exception { * the commit to update to. * @return {@code to}. * @throws Exception + * if an error occurred */ public RevCommit update(CommitBuilder to) throws Exception { return update(to.create()); @@ -1034,6 +1066,7 @@ public RevCommit update(CommitBuilder to) throws Exception { * the commit to update to. * @return {@code to}. * @throws Exception + * if an error occurred */ public RevCommit update(RevCommit to) throws Exception { return TestRepository.this.update(ref, to); @@ -1041,7 +1074,9 @@ public RevCommit update(RevCommit to) throws Exception { /** * Delete this branch. + * * @throws Exception + * if an error occurred * @since 4.4 */ public void delete() throws Exception { @@ -1102,6 +1137,7 @@ public class CommitBuilder { * parent commit * @return this commit builder * @throws Exception + * if an error occurred */ public CommitBuilder parent(RevCommit p) throws Exception { if (parents.isEmpty()) { @@ -1165,6 +1201,7 @@ public CommitBuilder setTopLevelTree(ObjectId treeId) { * the file content * @return this commit builder * @throws Exception + * if an error occurred */ public CommitBuilder add(String path, String content) throws Exception { return add(path, blob(content)); @@ -1179,6 +1216,7 @@ public CommitBuilder add(String path, String content) throws Exception { * blob for this file * @return this commit builder * @throws Exception + * if an error occurred */ public CommitBuilder add(String path, RevBlob id) throws Exception { @@ -1404,6 +1442,7 @@ private void insertChangeId(org.eclipse.jgit.lib.CommitBuilder c) { * * @return child commit builder * @throws Exception + * if an error occurred */ public CommitBuilder child() throws Exception { return new CommitBuilder(this); diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/time/MonotonicFakeClock.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/time/MonotonicFakeClock.java index e5338d36c..31db6a2c7 100644 --- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/time/MonotonicFakeClock.java +++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/time/MonotonicFakeClock.java @@ -40,7 +40,6 @@ public void tick(long add, TimeUnit unit) { now += unit.toMillis(add); } - /** {@inheritDoc} */ @Override public ProposedTimestamp propose() { long t = now++; diff --git a/org.eclipse.jgit.lfs.server/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.lfs.server/.settings/org.eclipse.jdt.core.prefs index 0857bc15f..3a92f0c43 100644 --- a/org.eclipse.jgit.lfs.server/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.lfs.server/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java index 5e37664eb..4c81baf83 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LargeFileRepository.java @@ -60,6 +60,7 @@ public interface LargeFileRepository { * @return length of the object content in bytes, -1 if the object doesn't * exist * @throws java.io.IOException + * if an IO error occurred */ long getSize(AnyLongObjectId id) throws IOException; } diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java index 3ec08ecc8..6747b014d 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java @@ -164,7 +164,6 @@ public boolean isVerify() { } } - /** {@inheritDoc} */ @Override protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException { diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java index 31d5b2f8c..ff648aaeb 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/FileLfsRepository.java @@ -38,13 +38,16 @@ public class FileLfsRepository implements LargeFileRepository { private final Path dir; /** - *

Constructor for FileLfsRepository.

+ *

+ * Constructor for FileLfsRepository. + *

* * @param url * external URL of this repository * @param dir * storage directory * @throws java.io.IOException + * if an IO error occurred */ public FileLfsRepository(String url, Path dir) throws IOException { this.url = url; @@ -52,26 +55,22 @@ public FileLfsRepository(String url, Path dir) throws IOException { Files.createDirectories(dir); } - /** {@inheritDoc} */ @Override public Response.Action getDownloadAction(AnyLongObjectId id) { return getAction(id); } - /** {@inheritDoc} */ @Override public Action getUploadAction(AnyLongObjectId id, long size) { return getAction(id); } - /** {@inheritDoc} */ @Override @Nullable public Action getVerifyAction(AnyLongObjectId id) { return null; } - /** {@inheritDoc} */ @Override public long getSize(AnyLongObjectId id) throws IOException { Path p = getPath(id); @@ -148,6 +147,8 @@ private static void formatHexChar(char[] dst, int p, int b) { } /** + * Get URL of content server + * * @return the url of the content server * @since 4.11 */ @@ -156,6 +157,8 @@ public String getUrl() { } /** + * Set the URL of the content server + * * @param url * the url of the content server * @since 4.11 diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java index d42701125..2ea92da82 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java @@ -50,7 +50,9 @@ public class ObjectDownloadListener implements WriteListener { private ByteBuffer buffer = ByteBuffer.allocateDirect(8192); /** - *

Constructor for ObjectDownloadListener.

+ *

+ * Constructor for ObjectDownloadListener. + *

* * @param repository * the repository storing large objects @@ -61,6 +63,7 @@ public class ObjectDownloadListener implements WriteListener { * @param id * id of the object to be downloaded * @throws java.io.IOException + * if an IO error occurred */ public ObjectDownloadListener(FileLfsRepository repository, AsyncContext context, HttpServletResponse response, diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java index f5212fe25..1ac2b2072 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java @@ -92,7 +92,9 @@ public interface Callback { * @param id * a {@link org.eclipse.jgit.lfs.lib.AnyLongObjectId} object. * @throws java.io.FileNotFoundException + * if file wasn't found * @throws java.io.IOException + * if an IO error occurred */ public ObjectUploadListener(FileLfsRepository repository, AsyncContext context, HttpServletRequest request, @@ -146,7 +148,6 @@ public void onDataAvailable() throws IOException { } } - /** {@inheritDoc} */ @Override public void onAllDataRead() throws IOException { close(); @@ -156,6 +157,7 @@ public void onAllDataRead() throws IOException { * Close resources held by this listener * * @throws java.io.IOException + * if an IO error occurred */ protected void close() throws IOException { try { @@ -174,7 +176,6 @@ protected void close() throws IOException { } } - /** {@inheritDoc} */ @Override public void onError(Throwable e) { try { diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java index c7c7a7146..3c98d7b9e 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Repository.java @@ -58,7 +58,6 @@ public S3Repository(S3Config config) { this.s3Config = config; } - /** {@inheritDoc} */ @Override public Response.Action getDownloadAction(AnyLongObjectId oid) { URL endpointUrl = getObjectUrl(oid); @@ -75,7 +74,6 @@ public Response.Action getDownloadAction(AnyLongObjectId oid) { return a; } - /** {@inheritDoc} */ @Override public Response.Action getUploadAction(AnyLongObjectId oid, long size) { cacheObjectMetaData(oid, size); @@ -95,13 +93,11 @@ public Response.Action getUploadAction(AnyLongObjectId oid, long size) { return a; } - /** {@inheritDoc} */ @Override public Action getVerifyAction(AnyLongObjectId id) { return null; // TODO(ms) implement this } - /** {@inheritDoc} */ @Override public long getSize(AnyLongObjectId oid) throws IOException { URL endpointUrl = getObjectUrl(oid); diff --git a/org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs index 0857bc15f..3a92f0c43 100644 --- a/org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java index f0526ff8a..13b74dff7 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java @@ -95,7 +95,6 @@ public CleanFilter(Repository db, InputStream in, OutputStream out) this.aOut = new AtomicObjectOutputStream(tmpFile.toAbsolutePath()); } - /** {@inheritDoc} */ @Override public int run() throws IOException { try { diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java index 0a8a3faec..afe963640 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java @@ -136,6 +136,7 @@ public void encode(OutputStream out) { * @return an {@link org.eclipse.jgit.lfs.LfsPointer} or {@code null} if the * stream was not parseable as LfsPointer * @throws java.io.IOException + * if an IO error occurred */ @Nullable public static LfsPointer parseLfsPointer(InputStream in) @@ -264,7 +265,6 @@ private static boolean checkVersionLine(String s) { return VERSION.equals(rest) || VERSION_LEGACY.equals(rest); } - /** {@inheritDoc} */ @Override public String toString() { return "LfsPointer: oid=" + oid.name() + ", size=" //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java index c26a1bfbb..b6515b92e 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java @@ -127,6 +127,7 @@ private SmudgeFilter(InputStream in, OutputStream out, Repository db) * the objects to download * @return the paths of all mediafiles which have been downloaded * @throws IOException + * if an IO error occurred * @since 4.11 */ public static Collection downloadLfsResource(Lfs lfs, Repository db, @@ -217,7 +218,6 @@ public static Collection downloadLfsResource(Lfs lfs, Repository db, return downloadedPaths; } - /** {@inheritDoc} */ @Override public int run() throws IOException { try { diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java index 3f1f0acac..009250294 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java @@ -45,6 +45,7 @@ public class AtomicObjectOutputStream extends OutputStream { * @param id * a {@link org.eclipse.jgit.lfs.lib.AnyLongObjectId} object. * @throws java.io.IOException + * if an IO error occurred */ public AtomicObjectOutputStream(Path path, AnyLongObjectId id) throws IOException { @@ -61,6 +62,7 @@ public AtomicObjectOutputStream(Path path, AnyLongObjectId id) * @param path * a {@link java.nio.file.Path} object. * @throws java.io.IOException + * if an IO error occurred */ public AtomicObjectOutputStream(Path path) throws IOException { this(path, null); @@ -78,25 +80,21 @@ public AnyLongObjectId getId() { return id; } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { out.write(b); } - /** {@inheritDoc} */ @Override public void write(byte[] b) throws IOException { out.write(b); } - /** {@inheritDoc} */ @Override public void write(byte[] b, int off, int len) throws IOException { out.write(b, off, len); } - /** {@inheritDoc} */ @Override public void close() throws IOException { out.close(); diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java index 857ccbe05..0469337b1 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java @@ -70,6 +70,7 @@ public LfsConfig(Repository db) { * * @return the delegate {@link Config} * @throws IOException + * if an IO error occurred */ private Config getDelegate() throws IOException { if (delegate == null) { @@ -86,6 +87,7 @@ private Config getDelegate() throws IOException { * @return The loaded lfs config * * @throws IOException + * if an IO error occurred */ private Config load() throws IOException { Config result = null; @@ -114,6 +116,7 @@ private Config load() throws IOException { * * @return the config, or null * @throws IOException + * if an IO error occurred */ @Nullable private Config loadFromWorkingTree() @@ -139,6 +142,7 @@ private Config loadFromWorkingTree() * * @return the config, or null if the entry does not exist * @throws IOException + * if an IO error occurred */ @Nullable private Config loadFromIndex() @@ -162,6 +166,7 @@ private Config loadFromIndex() * * @return the config, or null if the file does not exist * @throws IOException + * if an IO error occurred */ @Nullable private Config loadFromHead() throws IOException { @@ -207,6 +212,7 @@ private Config emptyConfig() { * the key name * @return a String value from the config, null if not found * @throws IOException + * if an IO error occurred */ @Nullable public String getString(final String section, final String subsection, diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java index 12b688d15..f9c623d8b 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java @@ -67,6 +67,7 @@ public class LfsConnectionFactory { * @return the connection for the lfs server. e.g. * "https://github.com/github/git-lfs.git/info/lfs" * @throws IOException + * if an IO error occurred */ public static HttpConnection getLfsConnection(Repository db, String method, String purpose) throws IOException { @@ -287,6 +288,7 @@ private static final class AuthCache { * no timeout can be determined, the token will be used only once. * * @param action + * action with an additional expiration timestamp */ public AuthCache(Protocol.ExpiringAction action) { this.cachedAction = action; diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java index 9016e5394..7ae805c33 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java @@ -314,13 +314,11 @@ private long mask(long word, long v) { return mask(nibbles, word, v); } - /** {@inheritDoc} */ @Override public int hashCode() { return (int) (w1 >> 32); } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof AbbreviatedLongObjectId) { @@ -355,7 +353,6 @@ public final String name() { return new String(b, 0, nibbles); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java index d866db4a2..75d500ef2 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java @@ -249,7 +249,6 @@ public boolean startsWith(AbbreviatedLongObjectId abbr) { return abbr.prefixCompare(this) == 0; } - /** {@inheritDoc} */ @Override public final int hashCode() { return (int) (w1 >> 32); @@ -267,7 +266,6 @@ public final boolean equals(AnyLongObjectId other) { return other != null ? equals(this, other) : false; } - /** {@inheritDoc} */ @Override public final boolean equals(Object o) { if (o instanceof AnyLongObjectId) { @@ -475,7 +473,6 @@ static void formatHexChar(char[] dst, int p, long w) { dst[o--] = '0'; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java index 99bae49ab..75798ca0f 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java @@ -41,7 +41,6 @@ public LfsPointer getPointer() { return pointer; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -63,13 +62,11 @@ public boolean include(TreeWalk walk) throws MissingObjectException, } } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return false; } - /** {@inheritDoc} */ @Override public TreeFilter clone() { return new LfsPointerFilter(); diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java index 15b3ca4c6..395911546 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java @@ -256,7 +256,6 @@ protected LongObjectId(AnyLongObjectId src) { w4 = src.w4; } - /** {@inheritDoc} */ @Override public LongObjectId toObjectId() { return this; diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java index 012e4ae91..5397d8135 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java @@ -221,7 +221,6 @@ private void fromHexString(byte[] bs, int p) { } } - /** {@inheritDoc} */ @Override public LongObjectId toObjectId() { return new LongObjectId(this); diff --git a/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs index 2abe9529d..b27b6c3c7 100644 --- a/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.pgm/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleAuthenticator.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleAuthenticator.java index 681cf5d62..201fa3d22 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleAuthenticator.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleAuthenticator.java @@ -38,7 +38,6 @@ public static void install() { private final Console cons = System.console(); - /** {@inheritDoc} */ @Override protected PasswordAuthentication promptPasswordAuthentication() { final String realm = formatRealm(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java index 63ce838f0..5bdfc7bb5 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/console/ConsoleCredentialsProvider.java @@ -43,13 +43,11 @@ public static void install() { private final Console cons = System.console(); - /** {@inheritDoc} */ @Override public boolean isInteractive() { return true; } - /** {@inheritDoc} */ @Override public boolean supports(CredentialItem... items) { for (CredentialItem i : items) { @@ -71,7 +69,6 @@ else if (i instanceof CredentialItem.InformationalMessage) return true; } - /** {@inheritDoc} */ @Override public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java index ff0b55d1b..2ebab5e5d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Add.java @@ -31,7 +31,6 @@ class Add extends TextBuiltin { @Argument(required = true, metaVar = "metaVar_filepattern", usage = "usage_filesToAddContentFrom") private List filepatterns = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected void run() throws Exception { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java index 0acad86f4..9c0915c63 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/AmazonS3Client.java @@ -42,13 +42,11 @@ class AmazonS3Client extends TextBuiltin { @Argument(index = 3, metaVar = "metaVar_KEY", required = true) private String key; - /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() throws Exception { final AmazonS3 s3 = new AmazonS3(properties()); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java index 4028105b8..f98f8cb72 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Archive.java @@ -41,7 +41,6 @@ class Archive extends TextBuiltin { @Option(name = "--output", aliases = { "-o" }, metaVar = "metaVar_file", usage = "usage_archiveOutput") private String output; - /** {@inheritDoc} */ @Override protected void run() throws Exception { if (tree == null) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java index 1a3a2f6f4..93d02c196 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Blame.java @@ -104,7 +104,6 @@ void ignoreAllSpace(@SuppressWarnings("unused") boolean on) { /** Used to get a current time stamp for lines without commit. */ private final PersonIdent dummyDate = new PersonIdent("", ""); //$NON-NLS-1$ //$NON-NLS-2$ - /** {@inheritDoc} */ @Override protected void run() { if (file == null) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java index 27668b537..e680394a7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Branch.java @@ -148,7 +148,6 @@ public void moveRename(List currentAndNew) { private int maxNameLength; - /** {@inheritDoc} */ @Override protected void run() { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java index 98724bfce..229d54d44 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java @@ -51,7 +51,6 @@ class Checkout extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class) private List paths = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected void run() throws Exception { if (createBranch) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java index 6db73e632..348f2e7db 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clean.java @@ -32,7 +32,6 @@ class Clean extends TextBuiltin { @Option(name = "--dryRun", aliases = { "-n" }) private boolean dryRun = false; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java index 9f9fa8fe9..1efba55f0 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java @@ -72,13 +72,11 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback { @Argument(index = 1, metaVar = "metaVar_directory") private String localName; - /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() throws Exception { if (localName != null && gitdir != null) @@ -148,7 +146,6 @@ protected void run() throws Exception { } } - /** {@inheritDoc} */ @Override public void initializedSubmodules(Collection submodules) { try { @@ -162,7 +159,6 @@ public void initializedSubmodules(Collection submodules) { } } - /** {@inheritDoc} */ @Override public void cloningSubmodule(String path) { try { @@ -174,7 +170,6 @@ public void cloningSubmodule(String path) { } } - /** {@inheritDoc} */ @Override public void checkingOut(AnyObjectId commit, String path) { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java index 7a197a75a..fb5a8fffc 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/CommandRef.java @@ -141,7 +141,6 @@ public TextBuiltin create() { return r; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java index b0713f782..8df028d2e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Commit.java @@ -84,7 +84,6 @@ class Commit extends TextBuiltin { @Argument(metaVar = "metaVar_commitPaths", usage = "usage_CommitPaths") private List paths = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java index 979c6fa94..52f40c295 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Config.java @@ -68,7 +68,6 @@ class Config extends TextBuiltin { @Option(name = "--file", aliases = { "-f" }, metaVar = "metaVar_file", usage = "usage_configFile") private File configFile; - /** {@inheritDoc} */ @Override protected void run() { if (!list) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java index 47e4b6ba7..06e37da84 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ConvertRefStorage.java @@ -28,7 +28,6 @@ class ConvertRefStorage extends TextBuiltin { "-r" }, usage = "usage_convertRefStorageRefLogs") private boolean writeLogs = true; - /** {@inheritDoc} */ @Override protected void run() throws Exception { ((FileRepository) db).convertRefStorage(format, writeLogs, backup); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java index f987f2c80..ec201a55e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Daemon.java @@ -64,13 +64,11 @@ class Daemon extends TextBuiltin { @Argument(required = true, metaVar = "metaVar_directory", usage = "usage_directoriesToExport") List directory = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() throws Exception { PackConfig packConfig = new PackConfig(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java index 116db037d..913d7c790 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Describe.java @@ -47,7 +47,6 @@ class Describe extends TextBuiltin { @Option(name = "--abbrev", usage = "usage_Abbrev") private Integer abbrev; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java index 3152c4455..61979d169 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java @@ -155,14 +155,12 @@ void noPrefix(@SuppressWarnings("unused") boolean on) { // END -- Options shared with Log - /** {@inheritDoc} */ @Override protected void init(Repository repository, String gitDir) { super.init(repository, gitDir); diffFmt = new DiffFormatter(new BufferedOutputStream(outs)); } - /** {@inheritDoc} */ @Override protected void run() { diffFmt.setRepository(db); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java index 9aaf3f5c5..352ffde26 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/DiffTree.java @@ -40,7 +40,6 @@ void tree_0(final AbstractTreeIterator c) { @Option(name = "--", metaVar = "metaVar_path", handler = PathTreeFilterHandler.class) private TreeFilter pathFilter = TreeFilter.ALL; - /** {@inheritDoc} */ @Override protected void run() { try (TreeWalk walk = new TreeWalk(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java index 2e0c36b28..7a007e3b5 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Fetch.java @@ -113,7 +113,6 @@ void noRecurseSubmodules(@SuppressWarnings("unused") @Argument(index = 1, metaVar = "metaVar_refspec") private List toget; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { @@ -167,7 +166,6 @@ protected void run() { } } - /** {@inheritDoc} */ @Override public void fetchingSubmodule(String name) { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java index c87f0b6dc..2796b9115 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Gc.java @@ -27,7 +27,6 @@ class Gc extends TextBuiltin { @Option(name = "--prune-preserved", usage = "usage_PrunePreserved") private Boolean prunePreserved; - /** {@inheritDoc} */ @Override protected void run() { Git git = Git.wrap(db); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java index 531801892..ce687c463 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Glog.java @@ -65,7 +65,6 @@ public void windowClosing(WindowEvent e) { frame.getContentPane().add(world); } - /** {@inheritDoc} */ @Override protected int walkLoop() throws Exception { graphPane.getCommitList().source(walk); @@ -77,13 +76,11 @@ protected int walkLoop() throws Exception { return graphPane.getCommitList().size(); } - /** {@inheritDoc} */ @Override protected void show(RevCommit c) throws Exception { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override protected RevWalk createWalk() { if (objects) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java index 973233513..b3808d6fd 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/IndexPack.java @@ -28,7 +28,6 @@ class IndexPack extends TextBuiltin { @Option(name = "--index-version", usage = "usage_indexFileFormatToCreate") private int indexVersion = -1; - /** {@inheritDoc} */ @Override protected void run() { BufferedInputStream in = new BufferedInputStream(ins); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java index 7a0d96d41..9c4af813a 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Init.java @@ -40,13 +40,11 @@ class Init extends TextBuiltin { @Argument(index = 0, metaVar = "metaVar_directory") private String directory; - /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() { InitCommand command = Git.init(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java index d69305173..852a4b377 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java @@ -182,14 +182,12 @@ void noPrefix(@SuppressWarnings("unused") boolean on) { dateFormatter = new GitDateFormatter(Format.DEFAULT); } - /** {@inheritDoc} */ @Override protected void init(Repository repository, String gitDir) { super.init(repository, gitDir); diffFmt = new DiffFormatter(new BufferedOutputStream(outs)); } - /** {@inheritDoc} */ @Override protected void run() { config = new GpgConfig(db.getConfig()); @@ -244,7 +242,6 @@ private void addNoteMap(String notesRef) throws IOException { NoteMap.read(argWalk.getObjectReader(), notesCommit)); } - /** {@inheritDoc} */ @Override protected void show(RevCommit c) throws Exception { outw.print(CLIText.get().commitLabel); @@ -314,10 +311,14 @@ private void showSignature(RevCommit c) throws IOException { } /** + * Show notes for given commit + * * @param c + * given commit * @return true if at least one note was printed, * false otherwise * @throws IOException + * if an IO error occurred */ private boolean showNotes(RevCommit c) throws IOException { if (noteMaps == null) @@ -344,12 +345,17 @@ private boolean showNotes(RevCommit c) throws IOException { /** * @param c + * given commit * @param map + * note map * @param label + * label * @param emptyLine + * whether to start with an empty line * @return true if note was printed, false * otherwise * @throws IOException + * if an IO error occurred */ private boolean showNotes(RevCommit c, NoteMap map, String label, boolean emptyLine) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java index 83446ccd5..89ceed256 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsRemote.java @@ -40,7 +40,6 @@ class LsRemote extends TextBuiltin { @Argument(index = 0, metaVar = "metaVar_uriish", required = true) private String remote; - /** {@inheritDoc} */ @Override protected void run() { LsRemoteCommand command = Git.lsRemoteRepository().setRemote(remote) @@ -63,7 +62,6 @@ protected void run() { } } - /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java index bb140018b..34b48c1b1 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/LsTree.java @@ -38,7 +38,6 @@ class LsTree extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_paths", handler = StopOptionHandler.class) private List paths = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected void run() { try (TreeWalk walk = new TreeWalk(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java index 613fc5ff3..d059eff5d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Main.java @@ -97,6 +97,7 @@ public Thread newThread(Runnable taskBody) { * @param argv * arguments. * @throws java.lang.Exception + * if an error occurred */ public static void main(String[] argv) throws Exception { // make sure built-in filters are registered @@ -121,6 +122,7 @@ public static void main(String[] argv) throws Exception { * @param argv * arguments. * @throws java.lang.Exception + * if an error occurred */ protected void run(String[] argv) throws Exception { writer = createErrorWriter(); @@ -263,9 +265,11 @@ void init(TextBuiltin cmd) throws IOException { /** * @param status + * exit status code, nonzero value indicates an error * @param t * can be {@code null} * @throws Exception + * if an IO error occurred */ void exit(int status, Exception t) throws Exception { writer.flush(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java index 27a3d90fa..b78998dd7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Merge.java @@ -86,7 +86,6 @@ void extraArg(String name) { } } - /** {@inheritDoc} */ @Override protected void run() { if (squash && ff == FastForwardMode.NO_FF) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java index 68eeff748..aacde2f43 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/MergeBase.java @@ -33,7 +33,6 @@ void commit_0(final RevCommit c) { @Argument(index = 1, metaVar = "metaVar_commitish", required = true) private List commits = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected void run() { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java index f2e3a1600..6535d95e9 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Push.java @@ -81,7 +81,6 @@ void nothin(@SuppressWarnings("unused") final boolean ignored) { private boolean shownURI; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java index f570f7f99..f89a4d12b 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java @@ -26,13 +26,11 @@ class ReceivePack extends TextBuiltin { @Argument(index = 0, required = true, metaVar = "metaVar_directory", usage = "usage_RepositoryToReceiveInto") File dstGitdir; - /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() { final org.eclipse.jgit.transport.ReceivePack rp; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java index c63532df6..46485cc5e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reflog.java @@ -28,7 +28,6 @@ class Reflog extends TextBuiltin { @Argument(metaVar = "metaVar_ref") private String ref; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java index 6d6feed7b..a3100ac8e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Remote.java @@ -52,7 +52,6 @@ class Remote extends TextBuiltin { @Argument(index = 2, metaVar = "metaVar_uriish") private String uri; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { @@ -114,7 +113,6 @@ protected void run() { } } - /** {@inheritDoc} */ @Override public void printUsage(String message, CmdLineParser clp) throws IOException { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java index 0588a7cdb..da622e113 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Repo.java @@ -26,7 +26,6 @@ class Repo extends TextBuiltin { @Argument(required = true, metaVar = "metaVar_path", usage = "usage_pathToXml") private String path; - /** {@inheritDoc} */ @Override protected void run() { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java index 3454cf251..f33cb6be7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Reset.java @@ -41,7 +41,6 @@ class Reset extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class) private List paths = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java index e86ad0182..59fc5f296 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevList.java @@ -18,7 +18,6 @@ @Command(usage = "usage_RevList") class RevList extends RevWalkTextBuiltin { - /** {@inheritDoc} */ @Override protected void show(RevCommit c) throws Exception { if (c.has(RevFlag.UNINTERESTING)) @@ -32,7 +31,6 @@ protected void show(RevCommit c) throws Exception { outw.println(); } - /** {@inheritDoc} */ @Override protected void show(ObjectWalk ow, RevObject obj) throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java index 9e4d1c9dd..b1fb07b5b 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevParse.java @@ -35,7 +35,6 @@ class RevParse extends TextBuiltin { @Argument(index = 0, metaVar = "metaVar_commitish") private List commits = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected void run() { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java index 696a924ec..51e597c57 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/RevWalkTextBuiltin.java @@ -114,7 +114,6 @@ void addCMessageRevFilter(String msg) { @Option(name = "--max-count", aliases = "-n", metaVar = "metaVar_n") private int maxCount = -1; - /** {@inheritDoc} */ @Override protected void run() throws Exception { walk = createWalk(); @@ -228,7 +227,8 @@ protected int walkLoop() throws Exception { * * @param c * The current {@link org.eclipse.jgit.revwalk.RevCommit} - * @throws java.lang.Exception + * @throws Exception + * if an error occurred */ protected abstract void show(RevCommit c) throws Exception; @@ -243,7 +243,8 @@ protected int walkLoop() throws Exception { * {@link #walkLoop()} * @param currentObject * The current {@link org.eclipse.jgit.revwalk.RevObject} - * @throws java.lang.Exception + * @throws Exception + * if an error occurred */ protected void show(final ObjectWalk objectWalk, final RevObject currentObject) throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java index 4a337983e..234da1a1c 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Rm.java @@ -27,7 +27,6 @@ class Rm extends TextBuiltin { @Option(name = "--", handler = StopOptionHandler.class) private List paths = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java index c18d35a20..4feb09003 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Show.java @@ -161,14 +161,12 @@ void noPrefix(@SuppressWarnings("unused") boolean on) { fmt = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy ZZZZZ", Locale.US); //$NON-NLS-1$ } - /** {@inheritDoc} */ @Override protected void init(Repository repository, String gitDir) { super.init(repository, gitDir); diffFmt = new DiffFormatter(new BufferedOutputStream(outs)); } - /** {@inheritDoc} */ @SuppressWarnings("boxing") @Override protected void run() { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java index a58785fef..64b182e17 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ShowRef.java @@ -21,7 +21,6 @@ @Command(usage = "usage_ShowRef") class ShowRef extends TextBuiltin { - /** {@inheritDoc} */ @Override protected void run() { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java index 141de0cd5..1ef39a1a7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Status.java @@ -55,7 +55,6 @@ class Status extends TextBuiltin { @Option(name = "--", metaVar = "metaVar_paths", handler = RestOfArgumentsHandler.class) protected List filterPaths; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { @@ -239,10 +238,11 @@ private void printLongStatus(org.eclipse.jgit.api.Status status) * Print section header * * @param pattern - * a {@link java.lang.String} object. + * a {@link String} object. * @param arguments - * a {@link java.lang.Object} object. - * @throws java.io.IOException + * a {@link Object} object. + * @throws IOException + * if an IO error occurred */ protected void printSectionHeader(String pattern, Object... arguments) throws IOException { @@ -259,9 +259,10 @@ protected void printSectionHeader(String pattern, Object... arguments) * Print String list * * @param list - * a {@link java.util.Collection} object. - * @return a int. - * @throws java.io.IOException + * a {@link Collection} object. + * @return size of the list + * @throws IOException + * if an IO error occurred */ protected int printList(Collection list) throws IOException { if (!list.isEmpty()) { @@ -281,21 +282,22 @@ protected int printList(Collection list) throws IOException { * Print String list * * @param status1 - * a {@link java.lang.String} object. + * a {@link String} object. * @param status2 - * a {@link java.lang.String} object. + * a {@link String} object. * @param status3 - * a {@link java.lang.String} object. + * a {@link String} object. * @param list - * a {@link java.util.Collection} object. + * a {@link Collection} object. * @param set1 - * a {@link java.util.Collection} object. + * a {@link Collection} object. * @param set2 - * a {@link java.util.Collection} object. + * a {@link Collection} object. * @param set3 - * a {@link java.util.Collection} object. + * a {@link Collection} object. * @return a int. - * @throws java.io.IOException + * @throws IOException + * if an IO error occurred */ protected int printList(String status1, String status2, String status3, Collection list, Collection set1, diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java index 0603de18a..4ea67ab92 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java @@ -88,7 +88,6 @@ class Tag extends TextBuiltin { @Argument(index = 1, metaVar = "metaVar_object") private ObjectId object; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java index 6cfe93d85..c572e3bc7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/TextBuiltin.java @@ -249,6 +249,7 @@ public final void execute(String[] args) throws Exception { * @param args * the arguments supplied on the command line, if any. * @throws java.io.IOException + * if an IO error occurred */ protected void parseArguments(String[] args) throws IOException { final CmdLineParser clp = new CmdLineParser(this); @@ -277,6 +278,7 @@ protected void parseArguments(String[] args) throws IOException { * @param clp * a {@link org.eclipse.jgit.pgm.opt.CmdLineParser} object. * @throws java.io.IOException + * if an IO error occurred */ public void printUsageAndExit(CmdLineParser clp) throws IOException { printUsageAndExit("", clp); //$NON-NLS-1$ @@ -290,6 +292,7 @@ public void printUsageAndExit(CmdLineParser clp) throws IOException { * @param clp * a {@link org.eclipse.jgit.pgm.opt.CmdLineParser} object. * @throws java.io.IOException + * if an IO error occurred */ public void printUsageAndExit(String message, CmdLineParser clp) throws IOException { printUsage(message, clp); @@ -304,6 +307,7 @@ public void printUsageAndExit(String message, CmdLineParser clp) throws IOExcept * @param clp * parser used to print options * @throws java.io.IOException + * if an IO error occurred * @since 4.2 */ protected void printUsage(String message, CmdLineParser clp) diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java index ac51643b6..db2c393b9 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java @@ -30,13 +30,11 @@ class UploadPack extends TextBuiltin { @Argument(index = 0, required = true, metaVar = "metaVar_directory", usage = "usage_RepositoryToReadFrom") File srcGitdir; - /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() { try { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java index d06f1e2fb..8546094ac 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Version.java @@ -22,7 +22,6 @@ @Command(common = true, usage = "usage_DisplayTheVersionOfJgit") class Version extends TextBuiltin { - /** {@inheritDoc} */ @Override protected void run() { // read the Implementation-Version from Manifest @@ -48,7 +47,6 @@ protected void run() { } } - /** {@inheritDoc} */ @Override protected final boolean requiresRepository() { return false; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java index f23f4cf0e..f156b8cf4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/BenchmarkReftable.java @@ -70,7 +70,6 @@ enum Test { @Argument(index = 1) private String reftablePath; - /** {@inheritDoc} */ @Override protected void run() throws Exception { switch (test) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java index a63387c24..67300dcc6 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/DiffAlgorithms.java @@ -96,13 +96,11 @@ DiffAlgorithm create() { private ThreadMXBean mxBean; - /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() throws Exception { mxBean = ManagementFactory.getThreadMXBean(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java index 9c0ced5c1..653530d11 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/LfsStore.java @@ -181,13 +181,11 @@ private enum StorageClass { String secretKey; - /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() throws Exception { AppServer server = new AppServer(port); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java index 63897a389..518833689 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/MakeCacheTree.java @@ -24,7 +24,6 @@ @Command(usage = "usage_MakeCacheTree") class MakeCacheTree extends TextBuiltin { - /** {@inheritDoc} */ @Override protected void run() throws Exception { final DirCache cache = db.readDirCache(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java index 33d105991..6e0f915ff 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadDirCache.java @@ -21,7 +21,6 @@ @Command(usage = "usage_ReadDirCache") class ReadDirCache extends TextBuiltin { - /** {@inheritDoc} */ @Override protected void run() throws Exception { final int cnt = 100; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java index 6dace841e..a2443d315 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ReadReftable.java @@ -30,7 +30,6 @@ class ReadReftable extends TextBuiltin { @Argument(index = 1, required = false) private String ref; - /** {@inheritDoc} */ @Override protected void run() throws Exception { try (FileInputStream in = new FileInputStream(input); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java index 8d884c12d..2f96ef7d5 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java @@ -81,7 +81,6 @@ class RebuildCommitGraph extends TextBuiltin { private Map rewrites = new HashMap<>(); - /** {@inheritDoc} */ @Override protected void run() throws Exception { if (!really && db.getRefDatabase().hasRefs()) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java index 28a8d8634..057d20b8d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCacheTree.java @@ -24,7 +24,6 @@ @Command(usage = "usage_ShowCacheTree") class ShowCacheTree extends TextBuiltin { - /** {@inheritDoc} */ @Override protected void run() throws Exception { final DirCache cache = db.readDirCache(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java index 9e61357da..daea1fbe8 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowCommands.java @@ -26,7 +26,6 @@ class ShowCommands extends TextBuiltin { @Option(name = "--pretty", metaVar = "metaVar_commandDetail", usage = "usage_alterTheDetailShown") private Format pretty = Format.USAGE; - /** {@inheritDoc} */ @Override protected void run() throws Exception { final CommandRef[] list = CommandCatalog.all(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java index 1f4733f79..3633d880d 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowDirCache.java @@ -33,7 +33,6 @@ class ShowDirCache extends TextBuiltin { @Option(name = "--millis", aliases = { "-m" }, usage = "usage_showTimeInMilliseconds") private boolean millis = false; - /** {@inheritDoc} */ @Override protected void run() throws Exception { final DateTimeFormatter fmt = DateTimeFormatter diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java index 49f7ada45..c95f1384e 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java @@ -39,7 +39,6 @@ class ShowPackDelta extends TextBuiltin { @Argument(index = 0) private ObjectId objectId; - /** {@inheritDoc} */ @Override protected void run() throws Exception { ObjectReader reader = db.newObjectReader(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java index 1ca3034f4..d7d31bd4b 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/TextHashFunctions.java @@ -228,13 +228,11 @@ public int fold(int hash, int bits) { @Option(name = "--repository", aliases = { "-r" }, metaVar = "GIT_DIR", usage = "Repository to scan") List gitDirs = new ArrayList<>(); - /** {@inheritDoc} */ @Override protected boolean requiresRepository() { return false; } - /** {@inheritDoc} */ @Override protected void run() throws Exception { if (gitDirs.isEmpty()) { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java index 16a4c9f33..aa1b81f2b 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/VerifyReftable.java @@ -42,7 +42,6 @@ class VerifyReftable extends TextBuiltin { @Argument(index = 1) private String reftablePath; - /** {@inheritDoc} */ @Override protected void run() throws Exception { List refs = WriteReftable.readRefs(lsRemotePath); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java index 44836ec0d..d367f0249 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteDirCache.java @@ -18,7 +18,6 @@ @Command(usage = "usage_WriteDirCache") class WriteDirCache extends TextBuiltin { - /** {@inheritDoc} */ @Override protected void run() throws Exception { final DirCache cache = db.readDirCache(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java index 80d2f763f..faa2bceb7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/WriteReftable.java @@ -71,7 +71,6 @@ class WriteReftable extends TextBuiltin { @Argument(index = 1) private String out; - /** {@inheritDoc} */ @SuppressWarnings({ "nls", "boxing" }) @Override protected void run() throws Exception { diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java index d8604726a..cea2309f7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java @@ -63,7 +63,6 @@ public AbstractTreeIteratorHandler(final CmdLineParser parser, clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final String name = params.getParameter(0); @@ -115,7 +114,6 @@ public int parseArguments(Parameters params) throws CmdLineException { return 1; } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_treeish; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java index df0b39b52..463213dc4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/CmdLineParser.java @@ -110,7 +110,6 @@ public CmdLineParser(Object bean, Repository repo) { this.db = repo; } - /** {@inheritDoc} */ @Override public void parseArgument(String... args) throws CmdLineException { final ArrayList tmp = new ArrayList<>(args.length); @@ -265,7 +264,6 @@ public boolean required() { } } - /** {@inheritDoc} */ @Override protected OptionHandler createOptionHandler(OptionDef o, Setter setter) { if (o instanceof NamedOptionDef) { @@ -275,7 +273,6 @@ protected OptionHandler createOptionHandler(OptionDef o, Setter setter) { } - /** {@inheritDoc} */ @Override public void printSingleLineUsage(Writer w, ResourceBundle rb) { List options = getOptions(); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/GpgSignHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/GpgSignHandler.java index af90b83d1..56423ada4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/GpgSignHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/GpgSignHandler.java @@ -53,7 +53,6 @@ public GpgSignHandler(CmdLineParser parser, OptionDef option, super(parser, option, setter); } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { String alias = params.getParameter(-1); diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/InstantHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/InstantHandler.java index feee78e9b..9c5416988 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/InstantHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/InstantHandler.java @@ -44,7 +44,6 @@ public InstantHandler(CmdLineParser parser, OptionDef option, super(parser, option, setter); } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { Instant instant = Instant.parse(params.getParameter(0)); @@ -52,7 +51,6 @@ public int parseArguments(Parameters params) throws CmdLineException { return 1; } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_instant; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java index 6cd36c3d9..b50df9078 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/ObjectIdHandler.java @@ -49,7 +49,6 @@ public ObjectIdHandler(final CmdLineParser parser, final OptionDef option, clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final String name = params.getParameter(0); @@ -68,7 +67,6 @@ public int parseArguments(Parameters params) throws CmdLineException { CLIText.format(CLIText.get().notAnObject), name); } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_object; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java index 7d7c80650..7bb2766fe 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/OptionWithValuesListHandler.java @@ -33,7 +33,6 @@ public OptionWithValuesListHandler(CmdLineParser parser, super(parser, option, setter); } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final List list = new ArrayList<>(); @@ -50,7 +49,6 @@ public int parseArguments(Parameters params) throws CmdLineException { return list.size(); } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_values; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java index 653511947..f21504049 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/PathTreeFilterHandler.java @@ -49,7 +49,6 @@ public PathTreeFilterHandler(final CmdLineParser parser, super(parser, option, setter); } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final List filters = new ArrayList<>(); @@ -73,7 +72,6 @@ public int parseArguments(Parameters params) throws CmdLineException { return filters.size(); } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_paths; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java index effa22a69..049144587 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RefSpecHandler.java @@ -43,14 +43,12 @@ public RefSpecHandler(final CmdLineParser parser, final OptionDef option, super(parser, option, setter); } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { setter.addValue(new RefSpec(params.getParameter(0))); return 1; } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_refspec; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java index 8b2bed36a..a095a28af 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java @@ -53,7 +53,6 @@ public RevCommitHandler(final CmdLineParser parser, final OptionDef option, clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { String name = params.getParameter(0); @@ -116,7 +115,6 @@ private void addOne(String name, boolean interesting) setter.addValue(c); } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_commitish; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java index 357886d0f..08f1d2839 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java @@ -52,7 +52,6 @@ public RevTreeHandler(final CmdLineParser parser, final OptionDef option, clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final String name = params.getParameter(0); @@ -83,7 +82,6 @@ public int parseArguments(Parameters params) throws CmdLineException { return 1; } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_treeish; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java index e0962031e..e71ba90e4 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/SubcommandHandler.java @@ -49,7 +49,6 @@ public SubcommandHandler(final CmdLineParser parser, clp = (org.eclipse.jgit.pgm.opt.CmdLineParser) parser; } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final String name = params.getParameter(0); @@ -67,7 +66,6 @@ public int parseArguments(Parameters params) throws CmdLineException { return 1; } - /** {@inheritDoc} */ @Override public String getDefaultMetaVariable() { return CLIText.get().metaVar_command; diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java index 3562754a0..2f99cff76 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/UntrackedFilesHandler.java @@ -52,7 +52,6 @@ public UntrackedFilesHandler(CmdLineParser parser, OptionDef option, super(parser, option, setter); } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { String alias = params.getParameter(-1); diff --git a/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.core.prefs index d1f54bbe6..d5c0e6c7e 100644 --- a/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ssh.apache.agent/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixSockets.java b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixSockets.java index 6f8153d00..54e4e2a5a 100644 --- a/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixSockets.java +++ b/org.eclipse.jgit.ssh.apache.agent/src/org/eclipse/jgit/internal/transport/sshd/agent/connector/UnixSockets.java @@ -67,6 +67,7 @@ interface UnixSockets extends LibCAPI, Library { * set it * @return -1 on error, otherwise a value >= 0 * @throws LastErrorException + * represents non-zero error code for the last error */ int fcntl(int fd, int command, int flag) throws LastErrorException; diff --git a/org.eclipse.jgit.ssh.apache/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.apache/.settings/org.eclipse.jdt.core.prefs index d1f54bbe6..d5c0e6c7e 100644 --- a/org.eclipse.jgit.ssh.apache/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ssh.apache/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java index 5100bc9e5..76175cc5b 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/JGitClientSession.java @@ -88,8 +88,11 @@ public class JGitClientSession extends ClientSessionImpl { /** * @param manager + * client factory manager * @param session + * the session * @throws Exception + * an error occurred */ public JGitClientSession(ClientFactoryManager manager, IoSession session) throws Exception { diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/KnownHostEntryReader.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/KnownHostEntryReader.java index 7931c76c1..a00e5d96a 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/KnownHostEntryReader.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/KnownHostEntryReader.java @@ -34,9 +34,9 @@ /** * Apache MINA sshd 2.0.0 KnownHostEntry cannot read a host entry line like - * "host:port ssh-rsa "; it complains about an illegal character in the - * host name (correct would be "[host]:port"). The default known_hosts reader - * also aborts reading on the first error. + * "host:port ssh-rsa <key>"; it complains about an illegal character in + * the host name (correct would be "[host]:port"). The default known_hosts + * reader also aborts reading on the first error. *

* This reader is a bit more robust and tries to handle this case if there is * only one colon (otherwise it might be an IPv6 address (without port)), and it diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java index d8bf449ac..65ba5be0c 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/OpenSshServerKeyDatabase.java @@ -74,7 +74,6 @@ * ignored. *

* {@code StrictHostKeyChecking} accepts the following values: - *

*
*
ask
*
Ask the user whether new or changed keys shall be accepted and be added @@ -91,7 +90,6 @@ *

* If {@code StrictHostKeyChecking} is not set, or set to any other value, the * default value ask is active. - *

*

* This implementation relies on the {@link ClientSession} being a * {@link JGitClientSession}. By default Apache MINA sshd does not forward the @@ -100,23 +98,19 @@ * used. If used with some other session type, the implementation assumes * "ask". *

- *

* Asking the user is done via a {@link CredentialsProvider} obtained from the * session. If none is set, the implementation falls back to strict host key * checking ("yes"). - *

*

* Note that adding a key to the known hosts file may create the file. You can * specify in the constructor whether the user shall be asked about that, too. * If the user declines updating the file, but the key was otherwise * accepted (user confirmed for "ask", or "no" or "accept-new" are * active), the key is accepted for this session only. - *

*

* If several known hosts files are specified, a new key is always added to the * first file (even if it doesn't exist yet; see the note about file creation * above). - *

* * @see man * ssh-config diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java index 807bda89b..23f46d8d6 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/IdentityPasswordProvider.java @@ -247,7 +247,9 @@ protected void cancelAuthentication() { * the attempt result - {@code null} for success * @return how to proceed in case of error * @throws IOException + * if an IO error occurred * @throws GeneralSecurityException + * something went wrong */ protected boolean keyLoaded(URIish uri, State state, char[] password, Exception err) diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java index ed9fe37d5..a80a5d166 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/KeyPasswordProvider.java @@ -77,7 +77,9 @@ default int getAttempts() { * {@code error} exception; Ignored if the key was loaded * successfully, i.e., if {@code error == null}. * @throws IOException + * if an IO error occurred * @throws GeneralSecurityException + * something went wrong */ boolean keyLoaded(URIish uri, int attempt, Exception error) throws IOException, GeneralSecurityException; diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java index 7798b80f1..a99847aa9 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/SshdSessionFactory.java @@ -471,6 +471,7 @@ protected ConnectorFactory getConnectorFactory() { * {@code UserKnownHostsFile} overrides this default. * * @param sshDir + * directory containing ssh configurations * @return the possibly empty list of default known host file paths. */ @NonNull diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/Connector.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/Connector.java index d8dfbfc94..b391cf488 100644 --- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/Connector.java +++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/transport/sshd/agent/Connector.java @@ -26,7 +26,7 @@ public interface Connector extends Closeable { * connected just returns {@code true}. * * @return {@code true} if an SSH agent is available and connected, - * {@false} if no SSH agent is available + * {@code false} if no SSH agent is available * @throws IOException * if connecting to the SSH agent failed */ diff --git a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs index d1f54bbe6..d5c0e6c7e 100644 --- a/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ssh.jsch/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/ssh/jsch/CredentialsProviderUserInfo.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/ssh/jsch/CredentialsProviderUserInfo.java index 505349300..b40ff5a0b 100644 --- a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/ssh/jsch/CredentialsProviderUserInfo.java +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/internal/transport/ssh/jsch/CredentialsProviderUserInfo.java @@ -59,19 +59,16 @@ private static URIish createURI(Session session) { return uri; } - /** {@inheritDoc} */ @Override public String getPassword() { return password; } - /** {@inheritDoc} */ @Override public String getPassphrase() { return passphrase; } - /** {@inheritDoc} */ @Override public boolean promptPassphrase(String msg) { CredentialItem.StringType v = newPrompt(msg); @@ -83,7 +80,6 @@ public boolean promptPassphrase(String msg) { return false; } - /** {@inheritDoc} */ @Override public boolean promptPassword(String msg) { CredentialItem.Password p = new CredentialItem.Password(msg); @@ -99,20 +95,17 @@ private CredentialItem.StringType newPrompt(String msg) { return new CredentialItem.StringType(msg, true); } - /** {@inheritDoc} */ @Override public boolean promptYesNo(String msg) { CredentialItem.YesNoType v = new CredentialItem.YesNoType(msg); return provider.get(uri, v) && v.getValue(); } - /** {@inheritDoc} */ @Override public void showMessage(String msg) { provider.get(uri, new CredentialItem.InformationalMessage(msg)); } - /** {@inheritDoc} */ @Override public String[] promptKeyboardInteractive(String destination, String name, String instruction, String[] prompt, boolean[] echo) { diff --git a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java index 77b68bb03..325d0549a 100644 --- a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschConfigSessionFactory.java @@ -92,7 +92,6 @@ public class JschConfigSessionFactory extends SshSessionFactory { private OpenSshConfig config; - /** {@inheritDoc} */ @Override public synchronized RemoteSession getSession(URIish uri, CredentialsProvider credentialsProvider, FS fs, int tms) @@ -189,14 +188,22 @@ private static boolean isAuthenticationCanceled(JSchException e) { * Use for tests only * * @param credentialsProvider + * credentials provide * @param fs + * FS object to use * @param user + * user * @param pass + * password * @param host + * host name * @param port + * port number * @param hc - * @return session + * host config + * @return session the session * @throws JSchException + * jsch failed */ public Session createSession(CredentialsProvider credentialsProvider, FS fs, String user, final String pass, String host, int port, diff --git a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschSession.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschSession.java index 02cdf7081..5f36dadc0 100644 --- a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschSession.java +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/JschSession.java @@ -68,20 +68,17 @@ public JschSession(Session session, URIish uri) { this.uri = uri; } - /** {@inheritDoc} */ @Override public Process exec(String command, int timeout) throws IOException { return exec(command, Collections.emptyMap(), timeout); } - /** {@inheritDoc} */ @Override public Process exec(String command, Map environment, int timeout) throws IOException { return new JschProcess(command, environment, timeout); } - /** {@inheritDoc} */ @Override public void disconnect() { if (sock.isConnected()) diff --git a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfig.java b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfig.java index 2873307e0..087e546f2 100644 --- a/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfig.java +++ b/org.eclipse.jgit.ssh.jsch/src/org/eclipse/jgit/transport/ssh/jsch/OpenSshConfig.java @@ -353,7 +353,6 @@ public Config getConfig(String hostName) { return host.getConfig(); } - /** {@inheritDoc} */ @Override public String toString() { return "OpenSshConfig [configFile=" + configFile + ']'; //$NON-NLS-1$ diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java index ff5f8b76c..70e990ded 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/PushCommandTest.java @@ -941,7 +941,7 @@ public void testPushDefaultFromConfigDefault() throws Exception { } /** - * Check that branch..pushRemote overrides anything else. + * Check that branch.<name>.pushRemote overrides anything else. * * @throws Exception */ @@ -980,7 +980,7 @@ public void testBranchPushRemote() throws Exception { } /** - * Check that remote.pushDefault overrides branch..remote + * Check that remote.pushDefault overrides branch.<name>.remote * * @throws Exception */ diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/revwalk/ObjectReachabilityTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/revwalk/ObjectReachabilityTestCase.java index 37ff40bdf..0e73588c6 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/revwalk/ObjectReachabilityTestCase.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/revwalk/ObjectReachabilityTestCase.java @@ -51,7 +51,6 @@ protected static class AddressableRevCommit { } } - /** {@inheritDoc} */ @Override @Before public void setUp() throws Exception { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/revwalk/ReachabilityCheckerTestCase.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/revwalk/ReachabilityCheckerTestCase.java index 7679c1109..eeb13cc8b 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/revwalk/ReachabilityCheckerTestCase.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/revwalk/ReachabilityCheckerTestCase.java @@ -32,7 +32,6 @@ protected abstract ReachabilityChecker getChecker( TestRepository repo; - /** {@inheritDoc} */ @Override @Before public void setUp() throws Exception { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderAfterOpenConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderAfterOpenConfigTest.java index 100bd32ad..ed5a6990a 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderAfterOpenConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileRepositoryBuilderAfterOpenConfigTest.java @@ -18,7 +18,6 @@ import org.junit.Before; public class FileRepositoryBuilderAfterOpenConfigTest extends FileRepositoryBuilderTest { - /** {@inheritDoc} */ @Before @Override public void setUp() throws Exception { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryAfterOpenConfigTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryAfterOpenConfigTest.java index 42304e225..3ea4a167c 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryAfterOpenConfigTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/RefDirectoryAfterOpenConfigTest.java @@ -17,7 +17,6 @@ import org.eclipse.jgit.util.SystemReader; public class RefDirectoryAfterOpenConfigTest extends RefDirectoryTest { - /** {@inheritDoc} */ @Override public void refDirectorySetup() throws Exception { StoredConfig userConfig = SystemReader.getInstance().getUserConfig(); diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectoryTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectoryTest.java index c3dafe4aa..90a2aa601 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectoryTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectoryTest.java @@ -23,7 +23,6 @@ public class SnapshottingRefDirectoryTest extends RefDirectoryTest { private RefDirectory originalRefDirectory; - /** {@inheritDoc} */ @Before @Override public void setUp() throws Exception { diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java index 9755ed1b6..f9687f9f8 100644 --- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java +++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java @@ -2168,12 +2168,12 @@ public void testV2FetchWantRef() throws Exception { /** *
 	 * remote:
-	 *    foo <- foofoo <-- branchFoo
-	 *    bar <- barbar <-- branchBar
+	 *    foo <- foofoo <-- branchFoo
+	 *    bar <- barbar <-- branchBar
 	 *
 	 * client:
-	 *    foo <-- branchFoo
-	 *    bar <-- branchBar
+	 *    foo <-- branchFoo
+	 *    bar <-- branchBar
 	 *
 	 * fetch(branchFoo) should send exactly 1 have (i.e. foo) from branchFoo
 	 * 
diff --git a/org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs index 0857bc15f..3a92f0c43 100644 --- a/org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit.ui/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtAuthenticator.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtAuthenticator.java index 56655b3b6..2b078c11f 100644 --- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtAuthenticator.java +++ b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtAuthenticator.java @@ -36,7 +36,6 @@ public static void install() { setDefault(new AwtAuthenticator()); } - /** {@inheritDoc} */ @Override protected PasswordAuthentication promptPasswordAuthentication() { final GridBagConstraints gbc = new GridBagConstraints(0, 0, 1, 1, 1, 1, diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtCredentialsProvider.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtCredentialsProvider.java index 0403957d6..729f4cb26 100644 --- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtCredentialsProvider.java +++ b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/AwtCredentialsProvider.java @@ -43,13 +43,11 @@ public static void install() { CredentialsProvider.setDefault(cp); } - /** {@inheritDoc} */ @Override public boolean isInteractive() { return true; } - /** {@inheritDoc} */ @Override public boolean supports(CredentialItem... items) { for (CredentialItem i : items) { @@ -71,7 +69,6 @@ else if (i instanceof CredentialItem.InformationalMessage) return true; } - /** {@inheritDoc} */ @Override public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem { diff --git a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java index dcf3c1d31..a266a2fc2 100644 --- a/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java +++ b/org.eclipse.jgit.ui/src/org/eclipse/jgit/awtui/CommitGraphPane.java @@ -80,7 +80,6 @@ public PlotCommitList getCommitList() { return allCommits; } - /** {@inheritDoc} */ @Override public void setModel(TableModel dataModel) { if (dataModel != null && !(dataModel instanceof CommitTableModel)) @@ -88,7 +87,6 @@ public void setModel(TableModel dataModel) { super.setModel(dataModel); } - /** {@inheritDoc} */ @Override protected TableModel createDefaultDataModel() { return new CommitTableModel(); diff --git a/org.eclipse.jgit/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit/.settings/org.eclipse.jdt.core.prefs index 2abe9529d..b27b6c3c7 100644 --- a/org.eclipse.jgit/.settings/org.eclipse.jdt.core.prefs +++ b/org.eclipse.jgit/.settings/org.eclipse.jdt.core.prefs @@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected -org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag +org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled 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 ceb17fbe2..8805ea235 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/AddNoteCommand.java @@ -51,7 +51,6 @@ protected AddNoteCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public Note call() throws GitAPIException { checkCallable(); 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 e61292477..df0f61625 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ApplyCommand.java @@ -37,11 +37,12 @@ public class ApplyCommand extends GitCommand { /** * Constructs the command. * - * @param local + * @param repo + * the repository this command will be used on */ - ApplyCommand(Repository local) { - super(local); - if (local == null) { + ApplyCommand(Repository repo) { + super(repo); + if (repo == null) { throw new NullPointerException(JGitText.get().repositoryIsRequired); } } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java index fdf8b80cd..4efc6a7a4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java @@ -389,7 +389,6 @@ private OutputStream writeArchive(Format fmt) { } } - /** {@inheritDoc} */ @Override public OutputStream call() throws GitAPIException { checkCallable(); 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 7319ff4b2..7e06a5688 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java @@ -167,7 +167,6 @@ protected CheckoutCommand(Repository repo) { this.paths = new LinkedList<>(); } - /** {@inheritDoc} */ @Override public Ref call() throws GitAPIException, RefAlreadyExistsException, RefNotFoundException, InvalidRefNameException, @@ -407,7 +406,9 @@ public CheckoutCommand setAllPaths(boolean all) { * * @return this instance * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.api.errors.RefNotFoundException + * if {@code Ref} couldn't be resolved */ protected CheckoutCommand checkoutPaths() throws IOException, RefNotFoundException { 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 5f8c2b728..38e795b0e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickCommand.java @@ -399,7 +399,6 @@ private String calculateOurName(Ref headRef) { return headName; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 36ca97d69..a4a0c49f4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java @@ -113,24 +113,25 @@ public Set call() throws NoWorkTreeException, GitAPIException { } /** - * When dryRun is false, deletes the specified path from disk. If dryRun - * is true, no paths are actually deleted. In both cases, the paths that - * would have been deleted are added to inFiles and returned. + * When dryRun is false, deletes the specified path from disk. If dryRun is + * true, no paths are actually deleted. In both cases, the paths that would + * have been deleted are added to inFiles and returned. * * Paths that are directories are recursively deleted when - * {@link #directories} is true. - * Paths that are git repositories are recursively deleted when - * {@link #directories} and {@link #force} are both true. + * {@link #directories} is true. Paths that are git repositories are + * recursively deleted when {@link #directories} and {@link #force} are both + * true. * * @param path - * The path to be cleaned + * The path to be cleaned * @param inFiles - * A set of strings representing the files that have been cleaned - * already, the path to be cleaned will be added to this set - * before being returned. + * A set of strings representing the files that have been cleaned + * already, the path to be cleaned will be added to this set + * before being returned. * * @return a set of strings with the cleaned path added to it * @throws IOException + * if an IO error occurred */ private Set cleanPath(String path, Set inFiles) throws IOException { 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 9e77dd734..e1efb86cd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CreateBranchCommand.java @@ -82,7 +82,6 @@ protected CreateBranchCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public Ref call() throws GitAPIException, RefAlreadyExistsException, RefNotFoundException, InvalidRefNameException { 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 3d3ee6356..f1b5d6234 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteBranchCommand.java @@ -61,7 +61,6 @@ protected DeleteBranchCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public List call() throws GitAPIException, NotMergedException, CannotDeleteCurrentBranchException { 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 64d0d9417..92d88aad7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/DeleteTagCommand.java @@ -48,7 +48,6 @@ protected DeleteTagCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public List call() throws GitAPIException { checkCallable(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java index 584d2bc39..1196359c0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/GarbageCollectCommand.java @@ -163,7 +163,6 @@ public GarbageCollectCommand setPrunePreserved(boolean prunePreserved) { return this; } - /** {@inheritDoc} */ @Override public Properties call() throws GitAPIException { 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 3b3e10e7b..3dc53ec24 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java @@ -68,6 +68,7 @@ public class Git implements AutoCloseable { * @return a {@link org.eclipse.jgit.api.Git} object for the existing git * repository * @throws java.io.IOException + * if an IO error occurred */ public static Git open(File dir) throws IOException { return open(dir, FS.DETECTED); @@ -84,6 +85,7 @@ public static Git open(File dir) throws IOException { * @return a {@link org.eclipse.jgit.api.Git} object for the existing git * repository. Closing this instance will close the repo. * @throws java.io.IOException + * if an IO error occurred */ public static Git open(File dir, FS fs) throws IOException { RepositoryCache.FileKey key; @@ -792,7 +794,6 @@ public Repository getRepository() { return repo; } - /** {@inheritDoc} */ @Override public String toString() { return "Git[" + repo + "]"; //$NON-NLS-1$//$NON-NLS-2$ 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 4b7445fc9..e3c3c89bc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListBranchCommand.java @@ -73,7 +73,6 @@ protected ListBranchCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public List call() throws GitAPIException { checkCallable(); 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 34955e86f..9eb52866d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListNotesCommand.java @@ -44,7 +44,6 @@ protected ListNotesCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public List call() throws GitAPIException { checkCallable(); 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 27a528842..9a4a822b5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ListTagCommand.java @@ -54,8 +54,11 @@ protected ListTagCommand(Repository repo) { * the specified commit * @return this command * @throws IOException + * if an IO error occurred * @throws IncorrectObjectTypeException + * if commit has an incorrect object type * @throws MissingObjectException + * if the commit is missing * * @since 6.6 */ @@ -67,7 +70,6 @@ public ListTagCommand setContains(AnyObjectId commit) return this; } - /** {@inheritDoc} */ @Override public List call() throws GitAPIException { checkCallable(); 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 fa40d93e5..555e351d3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java @@ -53,13 +53,11 @@ * *

* - *

* Get commits only for a specific file: * *

  * git.log().add(head).addPath("dir/filename.txt").call();
  * 
- *

* * @see Git documentation about Log 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 7347f6388..ecc3b40fb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java @@ -364,7 +364,6 @@ public ObjectId getBase() { return base; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java index e6ab1e658..cd7c4e9b3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java @@ -102,7 +102,6 @@ public NameRevCommit createCommit(AnyObjectId id) { }; } - /** {@inheritDoc} */ @Override public Map call() throws GitAPIException { try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullResult.java index cbb9cc2f7..fdc7f3f33 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/PullResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/PullResult.java @@ -89,7 +89,6 @@ else if (rebaseResult != null) return true; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 19fd3bb2c..859bf9384 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java @@ -86,7 +86,6 @@ * supported options and arguments of this command and a {@link #call()} method * to finally execute the command. Each instance of this class should only be * used for one invocation of the command (means: one call to {@link #call()}) - *

* * @see RebaseResult * * @param status + * the overall rebase status * @param commit * current commit * @return the RebaseResult 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 f4b60aded..c65cbf160 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RemoveNoteCommand.java @@ -47,7 +47,6 @@ protected RemoveNoteCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public Note call() throws GitAPIException { checkCallable(); 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 922cb531d..029f9d02d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RenameBranchCommand.java @@ -55,7 +55,6 @@ protected RenameBranchCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public Ref call() throws GitAPIException, RefNotFoundException, InvalidRefNameException, RefAlreadyExistsException, DetachedHeadException { 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 87b4acb14..225c9996c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java @@ -436,7 +436,6 @@ private void resetRevert() throws IOException { repo.writeMergeCommitMsg(null); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 f64cb6b83..7bb9de0ef 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ShowNoteCommand.java @@ -44,7 +44,6 @@ protected ShowNoteCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public Note 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 8171c4c3a..828a3020f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashListCommand.java @@ -43,7 +43,6 @@ public StashListCommand(Repository repo) { super(repo); } - /** {@inheritDoc} */ @Override public Collection call() throws GitAPIException, InvalidRefNameException { 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 606d56739..8fb5d60b8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java @@ -66,6 +66,7 @@ public SubmoduleAddCommand(Repository repo) { * Set the submodule name * * @param name + * name of the submodule * @return this command * @since 5.1 */ @@ -117,6 +118,7 @@ public SubmoduleAddCommand setProgressMonitor(ProgressMonitor monitor) { * * @return true if submodule exists in index, false otherwise * @throws java.io.IOException + * if an IO error occurred */ protected boolean submoduleExists() throws IOException { TreeFilter filter = PathFilter.create(path); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java index f4b8ac2e0..0aa151533 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitCommand.java @@ -61,6 +61,7 @@ public class SubmoduleDeinitCommand * Constructor of SubmoduleDeinitCommand * * @param repo + * repository this command works on */ public SubmoduleDeinitCommand(Repository repo) { super(repo); @@ -69,7 +70,6 @@ public SubmoduleDeinitCommand(Repository repo) { /** * {@inheritDoc} - *

* * @return the set of repositories successfully deinitialized. * @throws NoSuchSubmoduleException @@ -135,6 +135,7 @@ public Collection call() throws GitAPIException { * @param path * the path to clean * @throws IOException + * if an IO error occurred */ private void deinit(String path) throws IOException { File dir = new File(repo.getWorkTree(), path); @@ -157,10 +158,14 @@ private void deinit(String path) throws IOException { * the parent repo's index or HEAD. * * @param revWalk + * used to walk commit graph * @param path + * path of the submodule * @return status of the command * @throws GitAPIException + * if JGit API failed * @throws IOException + * if an IO error occurred */ private SubmoduleDeinitStatus checkDirty(RevWalk revWalk, String path) throws GitAPIException, IOException { @@ -216,6 +221,7 @@ private SubmoduleDeinitStatus checkDirty(RevWalk revWalk, String path) * @return {@code true} if path exists and is a submodule in index, * {@code false} otherwise * @throws IOException + * if an IO error occurred */ private boolean submoduleExists(String path) throws IOException { TreeFilter filter = PathFilter.create(path); @@ -241,6 +247,7 @@ public SubmoduleDeinitCommand addPath(String path) { * else it will refuse to do so. * * @param force + * execute the command forcefully if there are local modifications * @return {@code this} */ public SubmoduleDeinitCommand setForce(boolean force) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitResult.java index 8129be4a7..b7d7b6633 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleDeinitResult.java @@ -25,6 +25,7 @@ public class SubmoduleDeinitResult { * @param path * path of the submodule * @param status + * effect of a SubmoduleDeinitCommand's execution */ public SubmoduleDeinitResult(String path, SubmoduleDeinitCommand.SubmoduleDeinitStatus status) { 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 bdceabad3..03b4a000a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java @@ -61,7 +61,6 @@ public SubmoduleInitCommand addPath(String path) { return this; } - /** {@inheritDoc} */ @Override public Collection 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 196ef7b2a..d5bc0dda9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java @@ -61,7 +61,6 @@ public SubmoduleStatusCommand addPath(String path) { return this; } - /** {@inheritDoc} */ @Override public Map 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 b319a1b47..4f3e8512c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java @@ -70,6 +70,7 @@ public SubmoduleSyncCommand addPath(String path) { * a {@link org.eclipse.jgit.lib.Repository} object. * @return shortened branch name, null on failures * @throws java.io.IOException + * if an IO error occurred */ protected String getHeadBranch(Repository subRepo) throws IOException { Ref head = subRepo.exactRef(Constants.HEAD); @@ -79,7 +80,6 @@ protected String getHeadBranch(Repository subRepo) throws IOException { return null; } - /** {@inheritDoc} */ @Override public Map call() throws GitAPIException { checkCallable(); 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 58c18b38d..dd4ba1038 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/TagCommand.java @@ -51,13 +51,11 @@ * *

* - *

* Create a new unannotated tag for the current commit: * *

  * git.tag().setName("v1.0").setAnnotated(false).call();
  * 
- *

* * @see Git documentation about Tag diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportCommand.java index 1af880d79..30f1bc9cc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/TransportCommand.java @@ -22,7 +22,9 @@ * {@link org.eclipse.jgit.api.TransportConfigCallback}. * * @param + * concrete type of this {@code GitCommand} * @param + * the return type of the {@code GitCommand}'s {@code call()} method */ public abstract class TransportCommand extends GitCommand { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CheckoutConflictException.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CheckoutConflictException.java index 3b71373b6..0224b3dbb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CheckoutConflictException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/errors/CheckoutConflictException.java @@ -94,6 +94,7 @@ public List getConflictingPaths() { * Adds a new conflicting path * * @param conflictingPath + * the new conflicting path * @return {@code this} */ CheckoutConflictException addConflictingPath(String conflictingPath) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/Attribute.java b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/Attribute.java index 470a92eaf..fe3e22a21 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/Attribute.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/Attribute.java @@ -97,7 +97,6 @@ public Attribute(String key, String value) { this(key, State.CUSTOM, value); } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) @@ -144,7 +143,6 @@ public String getValue() { return value; } - /** {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; @@ -155,7 +153,6 @@ public int hashCode() { return result; } - /** {@inheritDoc} */ @Override public String toString() { switch (state) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/Attributes.java b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/Attributes.java index 125ee5961..08bc1da61 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/Attributes.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/Attributes.java @@ -231,7 +231,6 @@ && getValue(Constants.ATTR_MERGE) return true; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder buf = new StringBuilder(); @@ -246,13 +245,11 @@ public String toString() { return buf.toString(); } - /** {@inheritDoc} */ @Override public int hashCode() { return map.hashCode(); } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesHandler.java b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesHandler.java index 7ec78597f..d8857f519 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesHandler.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesHandler.java @@ -69,6 +69,7 @@ public class AttributesHandler { * @param treeWalk * a {@link org.eclipse.jgit.treewalk.TreeWalk} * @throws java.io.IOException + * if an IO error occurred * @deprecated since 6.1, use {@link #AttributesHandler(TreeWalk, Supplier)} * instead */ @@ -87,6 +88,7 @@ public AttributesHandler(TreeWalk treeWalk) throws IOException { * @param attributesTree * the tree to read .gitattributes from * @throws java.io.IOException + * if an IO error occurred * @since 6.1 */ public AttributesHandler(TreeWalk treeWalk, @@ -128,6 +130,7 @@ public AttributesHandler(TreeWalk treeWalk, * current path represented by the * {@link org.eclipse.jgit.treewalk.TreeWalk} * @throws java.io.IOException + * if an IO error occurred */ public Attributes getAttributes() throws IOException { String entryPath = treeWalk.getPathString(); @@ -206,12 +209,16 @@ private void mergeInfoAttributes(String entryPath, boolean isDirectory, * @param isDirectory * true if the target item is a directory. * @param workingTreeIterator + * the working tree iterator * @param dirCacheIterator + * the dircache iterator * @param otherTree + * another tree * @param result * that will hold the attributes matching this entry path. This * method will NOT override any existing entry in attributes. * @throws IOException + * if an IO error occurred */ private void mergePerDirectoryEntryAttributes(String entryPath, int nameRoot, boolean isDirectory, @@ -357,9 +364,13 @@ protected void expandMacro(Attribute attr, Attributes result) { *

* * @param treeWalk + * used to walk trees * @param workingTreeIterator + * used to walk the working tree * @param dirCacheIterator + * used to walk the dircache * @param otherTree + * another tree * @return a {@link AttributesNode} of the current entry, * {@link NullPointerException} otherwise. * @throws IOException diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesRule.java b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesRule.java index 73fd587a1..2039191b8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesRule.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/AttributesRule.java @@ -187,7 +187,6 @@ public boolean isMatch(String relativeTarget, boolean isDirectory) { return match; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/FilterCommandRegistry.java b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/FilterCommandRegistry.java index 1c9e9d7f7..bbbb437fd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/attributes/FilterCommandRegistry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/attributes/FilterCommandRegistry.java @@ -41,8 +41,8 @@ public class FilterCommandRegistry { * the factory responsible for creating * {@link org.eclipse.jgit.attributes.FilterCommand}s for the * specified name - * @return the previous factory associated with commandName, or - * null if there was no mapping for commandName + * @return the previous factory associated with {@code commandName}, or + * {@code null} if there was no mapping for {@code commandName} */ public static FilterCommandFactory register(String filterCommandName, FilterCommandFactory factory) { @@ -55,8 +55,8 @@ public static FilterCommandFactory register(String filterCommandName, * * @param filterCommandName * the FilterCommandFactory's filter command name - * @return the previous factory associated with filterCommandName, - * or null if there was no mapping for commandName + * @return the previous factory associated with {@code filterCommandName}, + * or {@code null} if there was no mapping for {@code commandName} */ public static FilterCommandFactory unregister(String filterCommandName) { return filterCommandRegistry.remove(filterCommandName); @@ -69,7 +69,7 @@ public static FilterCommandFactory unregister(String filterCommandName) { * * @param filterCommandName * the name for which the registry should be checked - * @return true if any factory was registered for the name + * @return {@code true} if any factory was registered for the name */ public static boolean isRegistered(String filterCommandName) { return filterCommandRegistry.containsKey(filterCommandName); @@ -107,6 +107,7 @@ public static Set getRegisteredFilterCommands() { * @return the command if a command could be created or null if * there was no factory registered for that name * @throws java.io.IOException + * if an IO error occurred */ public static FilterCommand createFilterCommand(String filterCommandName, Repository db, InputStream in, OutputStream out) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java index c854b37b8..5e2746cc7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameResult.java @@ -303,7 +303,6 @@ public void computeRange(int start, int end) throws IOException { } } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder r = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java index ccf99ff5b..8e2aaecf9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Candidate.java @@ -305,7 +305,6 @@ void mergeRegions(Candidate other) { } } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java index 2236eecbf..c481eb192 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/Region.java @@ -83,7 +83,6 @@ Region deepCopy() { return head; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder buf = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java index e8f3f38ad..fafc4fb1e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/ReverseWalk.java @@ -24,7 +24,6 @@ final class ReverseWalk extends RevWalk { super(repo); } - /** {@inheritDoc} */ @Override public ReverseCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -36,7 +35,6 @@ public ReverseCommit next() throws MissingObjectException, return c; } - /** {@inheritDoc} */ @Override protected RevCommit createCommit(AnyObjectId id) { return new ReverseCommit(id); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java index 2526cbfae..7821efd2a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffAlgorithm.java @@ -58,6 +58,8 @@ public static DiffAlgorithm getAlgorithm(SupportedAlgorithm alg) { /** * Compare two sequences and identify a list of edits between them. * + * @param + * type of sequence being compared. * @param cmp * the comparator supplying the element equivalence function. * @param a @@ -217,6 +219,8 @@ private static EditList normalize( * method, which invokes this method using * {@link org.eclipse.jgit.diff.Subsequence}s. * + * @param + * type of sequence being compared. * @param cmp * the comparator supplying the element equivalence function. * @param a diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java index f0ce121f7..717d8989e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java @@ -457,7 +457,6 @@ public AbbreviatedObjectId getNewId() { /** * Whether the mark tree filter with the specified index matched during scan * or not, see {@link #scan(TreeWalk, boolean, TreeFilter...)}. Example: - *

* *

 	 * TreeFilter filterA = ...;
@@ -506,7 +505,6 @@ public AbbreviatedObjectId getId(Side side) {
 		return side == Side.OLD ? getOldId() : getNewId();
 	}
 
-	/** {@inheritDoc} */
 	@SuppressWarnings("nls")
 	@Override
 	public String toString() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
index 1a5f74f98..2f472b5c0 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java
@@ -777,6 +777,7 @@ public void format(FileHeader head, RawText a, RawText b)
 	 * @param b
 	 *            the text B which was compared
 	 * @throws java.io.IOException
+	 *             if an IO error occurred
 	 */
 	public void format(EditList edits, RawText a, RawText b)
 			throws IOException {
@@ -825,6 +826,7 @@ public void format(EditList edits, RawText a, RawText b)
 	 * @param line
 	 *            the line number within text
 	 * @throws java.io.IOException
+	 *             if an IO error occurred
 	 */
 	protected void writeContextLine(RawText text, int line)
 			throws IOException {
@@ -843,6 +845,7 @@ private static boolean isEndOfLineMissing(RawText text, int line) {
 	 * @param line
 	 *            the line number within text
 	 * @throws java.io.IOException
+	 *             if an IO error occurred
 	 */
 	protected void writeAddedLine(RawText text, int line)
 			throws IOException {
@@ -857,6 +860,7 @@ protected void writeAddedLine(RawText text, int line)
 	 * @param line
 	 *            the line number within text
 	 * @throws java.io.IOException
+	 *             if an IO error occurred
 	 */
 	protected void writeRemovedLine(RawText text, int line)
 			throws IOException {
@@ -875,6 +879,7 @@ protected void writeRemovedLine(RawText text, int line)
 	 * @param bEndLine
 	 *            within second source
 	 * @throws java.io.IOException
+	 *             if an IO error occurred
 	 */
 	protected void writeHunkHeader(int aStartLine, int aEndLine,
 			int bStartLine, int bEndLine) throws IOException {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
index 219a187e2..2968dbaa8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Edit.java
@@ -238,13 +238,11 @@ public void swap() {
 		endB = sEnd;
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public int hashCode() {
 		return beginA ^ endA;
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public boolean equals(Object o) {
 		if (o instanceof Edit) {
@@ -255,7 +253,6 @@ public boolean equals(Object o) {
 		return false;
 	}
 
-	/** {@inheritDoc} */
 	@SuppressWarnings("nls")
 	@Override
 	public String toString() {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java
index d40a64099..85e23e9a9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/EditList.java
@@ -49,7 +49,6 @@ public EditList(int capacity) {
 		super(capacity);
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public String toString() {
 		return "EditList" + super.toString(); //$NON-NLS-1$
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequence.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequence.java
index 9cb8e7364..82ab21c11 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequence.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequence.java
@@ -34,7 +34,6 @@ public final class HashedSequence extends Sequence {
 		this.hashes = hashes;
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public int size() {
 		return base.size();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java
index 038020856..c7dfd9a18 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HashedSequenceComparator.java
@@ -33,7 +33,6 @@ public final class HashedSequenceComparator extends
 		this.cmp = cmp;
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public boolean equals(HashedSequence a, int ai, //
 			HashedSequence b, int bi) {
@@ -41,7 +40,6 @@ public boolean equals(HashedSequence a, int ai, //
 				&& cmp.equals(a.base, ai, b.base, bi);
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public int hash(HashedSequence seq, int ptr) {
 		return seq.hashes[ptr];
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 4035a1e48..bb72e1fae 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/HistogramDiff.java
@@ -98,7 +98,6 @@ public void setMaxChainLength(int maxLen) {
 		maxChainLength = maxLen;
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public  void diffNonCommon(EditList edits,
 			HashedSequenceComparator cmp, HashedSequence a,
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java
index 7f3c25186..39be43d12 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/LowLevelDiffAlgorithm.java
@@ -14,7 +14,6 @@
  * Compares two sequences primarily based upon hash codes.
  */
 public abstract class LowLevelDiffAlgorithm extends DiffAlgorithm {
-	/** {@inheritDoc} */
 	@Override
 	public  EditList diffNonCommon(
 			SequenceComparator cmp, S a, S b) {
@@ -40,6 +39,8 @@ public  EditList diffNonCommon(
 	 * method, which invokes this method using
 	 * {@link org.eclipse.jgit.diff.Subsequence}s.
 	 *
+	 * @param 
+	 *            type of Sequence compared
 	 * @param edits
 	 *            result list to append the region's edits onto.
 	 * @param cmp
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java
index 53cd2ea5d..4343642f9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/PatchIdDiffFormatter.java
@@ -43,14 +43,12 @@ public ObjectId getCalulatedPatchId() {
 		return ObjectId.fromRaw(digest.digest());
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	protected void writeHunkHeader(int aStartLine, int aEndLine,
 			int bStartLine, int bEndLine) throws IOException {
 		// The hunk header is not taken into account for patch id calculation
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	protected void formatIndexLine(OutputStream o, DiffEntry ent)
 			throws IOException {
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 b52803513..783558243 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
@@ -114,7 +114,6 @@ public byte[] getRawContent() {
 	}
 
 	/** @return total number of items in the sequence. */
-	/** {@inheritDoc} */
 	@Override
 	public int size() {
 		// The line map is always 2 entries larger than the number of lines in
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
index 0c41b8598..e06e2f829 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawTextComparator.java
@@ -227,7 +227,6 @@ public int hash(RawText seq, int lno) {
 		return hashRegion(seq.content, begin, end);
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public Edit reduceCommonStartEnd(RawText a, RawText b, Edit e) {
 		// This is a faster exact match based form that tries to improve
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 c33f53add..fd84bc6c8 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RenameDetector.java
@@ -713,15 +713,16 @@ private void findExactRenames(ProgressMonitor pm)
 
 	/**
 	 * Find the best match by file path for a given DiffEntry from a list of
-	 * DiffEntrys. The returned DiffEntry will be of the same type as . If
-	 * no DiffEntry can be found that has the same type, this method will return
-	 * null.
+	 * DiffEntrys. The returned DiffEntry will be of the same type as
+	 * <src>. If no DiffEntry can be found that has the same type, this
+	 * method will return null.
 	 *
 	 * @param src
 	 *            the DiffEntry to try to find a match for
 	 * @param list
 	 *            a list of DiffEntrys to search through
-	 * @return the DiffEntry from  who's file path best matches 
+	 * @return the DiffEntry from <list> who's file path best matches
+	 *         <src>
 	 */
 	private static DiffEntry bestPathMatch(DiffEntry src, List list) {
 		DiffEntry best = null;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java
index 61f133ca5..878c66b30 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/Subsequence.java
@@ -25,6 +25,8 @@ public final class Subsequence extends Sequence {
 	/**
 	 * Construct a subsequence around the A region/base sequence.
 	 *
+	 * @param 
+	 *            type of returned Sequence
 	 * @param a
 	 *            the A sequence.
 	 * @param region
@@ -38,6 +40,8 @@ public static  Subsequence a(S a, Edit region) {
 	/**
 	 * Construct a subsequence around the B region/base sequence.
 	 *
+	 * @param 
+	 *            type of returned Sequence
 	 * @param b
 	 *            the B sequence.
 	 * @param region
@@ -51,6 +55,8 @@ public static  Subsequence b(S b, Edit region) {
 	/**
 	 * Adjust the Edit to reflect positions in the base sequence.
 	 *
+	 * @param 
+	 *            type of returned Sequence
 	 * @param e
 	 *            edit to adjust in-place. Prior to invocation the indexes are
 	 *            in terms of the two subsequences; after invocation the indexes
@@ -72,6 +78,8 @@ public static  void toBase(Edit e, Subsequence a,
 	/**
 	 * Adjust the Edits to reflect positions in the base sequence.
 	 *
+	 * @param 
+	 *            type of returned Sequence
 	 * @param edits
 	 *            edits to adjust in-place. Prior to invocation the indexes are
 	 *            in terms of the two subsequences; after invocation the indexes
@@ -116,7 +124,6 @@ public Subsequence(S base, int begin, int end) {
 		this.size = end - begin;
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public int size() {
 		return size;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java
index c60945361..707df5925 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/SubsequenceComparator.java
@@ -36,13 +36,11 @@ public SubsequenceComparator(SequenceComparator cmp) {
 		this.cmp = cmp;
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public boolean equals(Subsequence a, int ai, Subsequence b, int bi) {
 		return cmp.equals(a.base, ai + a.begin, b.base, bi + b.begin);
 	}
 
-	/** {@inheritDoc} */
 	@Override
 	public int hash(Subsequence seq, int ptr) {
 		return cmp.hash(seq.base, ptr + seq.begin);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java
index 86e60e5b7..68296ef33 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/BaseDirCacheEditor.java
@@ -25,9 +25,11 @@
  * services to applications.
  */
 abstract class BaseDirCacheEditor {
+	@SuppressWarnings("doclint:missing")
 	/** The cache instance this editor updates during {@link #finish()}. */
 	protected DirCache cache;
 
+	@SuppressWarnings("doclint:missing")
 	/**
 	 * Entry table this builder will eventually replace into {@link #cache}.
 	 * 

@@ -40,7 +42,7 @@ abstract class BaseDirCacheEditor { */ protected DirCacheEntry[] entries; - /** Total number of valid entries in {@link #entries}. */ + /** Total number of valid entries in {@link BaseDirCacheEditor#entries}. */ protected int entryCnt; /** @@ -137,7 +139,8 @@ protected void fastKeep(int pos, int cnt) { public abstract void finish(); /** - * Update the DirCache with the contents of {@link #entries}. + * Update the DirCache with the contents of + * {@link BaseDirCacheEditor#entries}. *

* This method should be invoked only during an implementation of * {@link #finish()}, and only after {@link #entries} is sorted. 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 e56061223..34dba0b5b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCache.java @@ -429,6 +429,7 @@ else if (snapshot == null || snapshot.isModified(liveFile)) { * * @return {@code true} if the memory state differs from the index file * @throws java.io.IOException + * if an IO error occurred */ public boolean isOutdated() throws IOException { if (liveFile == null || !liveFile.exists()) @@ -1001,6 +1002,7 @@ private void registerIndexChangedListener(IndexChangedListener listener) { * Update any smudged entries with information from the working tree. * * @throws IOException + * if an IO error occurred */ private void updateSmudgedEntries() throws IOException { List paths = new ArrayList<>(128); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java index f6e4d360a..befd8067a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuildIterator.java @@ -74,7 +74,6 @@ public DirCacheBuildIterator(DirCacheBuilder dcb) { builder = p.builder; } - /** {@inheritDoc} */ @Override public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException { @@ -84,7 +83,6 @@ public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) return new DirCacheBuildIterator(this, currentSubtree); } - /** {@inheritDoc} */ @Override public void skip() throws CorruptObjectException { if (currentSubtree != null) @@ -94,7 +92,6 @@ public void skip() throws CorruptObjectException { next(1); } - /** {@inheritDoc} */ @Override public void stopWalk() { final int cur = ptr; @@ -103,7 +100,6 @@ public void stopWalk() { builder.keep(cur, cnt - cur); } - /** {@inheritDoc} */ @Override protected boolean needsStopWalk() { return ptr < cache.getEntryCount(); 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 9fe77f36e..28d250200 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheBuilder.java @@ -186,7 +186,6 @@ private static DirCacheEntry toEntry(int stage, CanonicalTreeParser i) { return e; } - /** {@inheritDoc} */ @Override public void finish() { if (!sorted) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index 1fb81b71e..20b27375b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -100,7 +100,9 @@ public static class CheckoutMetadata { /** * @param eolStreamType + * how to convert EOL characters during stream conversion * @param smudgeFilterCommand + * command used as smudge filter during checkout */ public CheckoutMetadata(EolStreamType eolStreamType, String smudgeFilterCommand) { @@ -206,6 +208,7 @@ public List getRemoved() { * @param workingTree * an iterator over the repositories Working Tree * @throws java.io.IOException + * if an IO error occurred */ public DirCacheCheckout(Repository repo, ObjectId headCommitTree, DirCache dc, ObjectId mergeCommitTree, WorkingTreeIterator workingTree) @@ -233,6 +236,7 @@ public DirCacheCheckout(Repository repo, ObjectId headCommitTree, DirCache dc, * @param mergeCommitTree * the id of the tree we want to fast-forward to * @throws java.io.IOException + * if an IO error occurred */ public DirCacheCheckout(Repository repo, ObjectId headCommitTree, DirCache dc, ObjectId mergeCommitTree) throws IOException { @@ -252,6 +256,7 @@ public DirCacheCheckout(Repository repo, ObjectId headCommitTree, * @param workingTree * an iterator over the repositories Working Tree * @throws java.io.IOException + * if an IO error occurred */ public DirCacheCheckout(Repository repo, DirCache dc, ObjectId mergeCommitTree, WorkingTreeIterator workingTree) @@ -271,6 +276,7 @@ public DirCacheCheckout(Repository repo, DirCache dc, * @param mergeCommitTree * the id of the tree of the * @throws java.io.IOException + * if an IO error occurred */ public DirCacheCheckout(Repository repo, DirCache dc, ObjectId mergeCommitTree) throws IOException { @@ -294,7 +300,9 @@ public void setProgressMonitor(ProgressMonitor monitor) { * operations. * * @throws org.eclipse.jgit.errors.CorruptObjectException + * if a corrupt object was found * @throws java.io.IOException + * if an IO error occurred */ public void preScanTwoTrees() throws CorruptObjectException, IOException { removed.clear(); @@ -324,9 +332,13 @@ public void preScanTwoTrees() throws CorruptObjectException, IOException { * there is no head yet. * * @throws org.eclipse.jgit.errors.MissingObjectException + * if an object was found missing * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException + * if an object didn't have the expected type * @throws org.eclipse.jgit.errors.CorruptObjectException + * if an object is corrupt * @throws java.io.IOException + * if an IO error occurred */ public void prescanOneTree() throws MissingObjectException, IncorrectObjectTypeException, @@ -372,6 +384,7 @@ private int addTree(TreeWalk tw, ObjectId id) throws MissingObjectException, * @param f * the working tree * @throws IOException + * if an IO error occurred */ void processEntry(CanonicalTreeParser m, DirCacheBuildIterator i, WorkingTreeIterator f) throws IOException { @@ -465,6 +478,7 @@ void processEntry(CanonicalTreeParser m, DirCacheBuildIterator i, * successful and the working tree was updated for all other files. * true is returned when no such problem occurred * @throws java.io.IOException + * if an IO error occurred */ public boolean checkout() throws IOException { try { @@ -684,9 +698,13 @@ private void removeEmptyParents(File f) { * Compares whether two pairs of ObjectId and FileMode are equal. * * @param id1 + * id of first object * @param mode1 + * mode of first object * @param id2 + * id of second object * @param mode2 + * mode of second object * @return true if FileModes and ObjectIds are equal. * false otherwise */ @@ -712,6 +730,7 @@ private boolean equalIdAndMode(ObjectId id1, FileMode mode1, ObjectId id2, * @param f * the file in the working tree * @throws IOException + * if an IO error occurred */ void processEntry(CanonicalTreeParser h, CanonicalTreeParser m, @@ -1295,6 +1314,7 @@ public void setForce(boolean force) { * {@link #failOnConflict} is false * * @throws CheckoutConflictException + * if a conflict occurred during merge checkout */ private void cleanUpConflicts() throws CheckoutConflictException { // TODO: couldn't we delete unsaved worktree content here? @@ -1308,13 +1328,16 @@ private void cleanUpConflicts() throws CheckoutConflictException { } /** - * Checks whether the subtree starting at a given path differs between Index and - * workingtree. + * Checks whether the subtree starting at a given path differs between Index + * and workingtree. * * @param path + * given subtree path * @return true if the subtrees differ * @throws CorruptObjectException + * if a corrupt object was found * @throws IOException + * if an IO error occurred */ private boolean isModifiedSubtree_IndexWorkingtree(String path) throws CorruptObjectException, IOException { @@ -1355,15 +1378,18 @@ private boolean isModified_IndexTree(String path, ObjectId iId, } /** - * Checks whether the subtree starting at a given path differs between Index and - * some tree. + * Checks whether the subtree starting at a given path differs between Index + * and some tree. * * @param path + * given path * @param tree * the tree to compare * @return true if the subtrees differ * @throws CorruptObjectException + * if a corrupt object was found * @throws IOException + * if an IO error occurred */ private boolean isModifiedSubtree_IndexTree(String path, ObjectId tree) throws CorruptObjectException, IOException { @@ -1408,6 +1434,7 @@ private boolean isModifiedSubtree_IndexTree(String path, ObjectId tree) * @param or * object reader to use for checkout * @throws java.io.IOException + * if an IO error occurred * @since 3.6 * @deprecated since 5.1, use * {@link #checkoutEntry(Repository, DirCacheEntry, ObjectReader, boolean, CheckoutMetadata, WorkingTreeOptions)} @@ -1449,6 +1476,7 @@ public static void checkoutEntry(Repository repo, DirCacheEntry entry, *

  • eolStreamType used for stream conversion
  • * * @throws java.io.IOException + * if an IO error occurred * @since 4.2 * @deprecated since 6.3, use * {@link #checkoutEntry(Repository, DirCacheEntry, ObjectReader, boolean, CheckoutMetadata, WorkingTreeOptions)} @@ -1493,6 +1521,7 @@ public static void checkoutEntry(Repository repo, DirCacheEntry entry, * {@link WorkingTreeOptions} that are effective; if {@code null} * they are loaded from the repository config * @throws java.io.IOException + * if an IO error occurred * @since 6.3 */ public static void checkoutEntry(Repository repo, DirCacheEntry entry, @@ -1599,6 +1628,7 @@ public static void checkoutEntry(Repository repo, DirCacheEntry entry, * the output stream the filtered content is written to. The * caller is responsible to close the stream. * @throws IOException + * if an IO error occurred * * @since 5.7 */ @@ -1654,6 +1684,7 @@ public interface StreamSupplier { * the output stream the filtered content is written to. The * caller is responsible to close the stream. * @throws IOException + * if an IO error occurred * @since 6.3 */ public static void getContent(Repository repo, String path, 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 8c342e267..b1f4e7db2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEditor.java @@ -37,7 +37,6 @@ * have the editor compute the proper entry indexes necessary to perform an * efficient in-order update of the index records. This can be easier to use * than {@link org.eclipse.jgit.dircache.DirCacheBuilder}. - *

    * * @see DirCacheBuilder */ @@ -80,7 +79,6 @@ public void add(PathEdit edit) { edits.add(edit); } - /** {@inheritDoc} */ @Override public boolean commit() throws IOException { if (edits.isEmpty()) { @@ -92,7 +90,6 @@ public boolean commit() throws IOException { return super.commit(); } - /** {@inheritDoc} */ @Override public void finish() { if (!edits.isEmpty()) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java index aed1c341f..9cc34a0f1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheIterator.java @@ -104,7 +104,6 @@ public DirCacheIterator(DirCache dc) { parseEntry(); } - /** {@inheritDoc} */ @Override public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException { @@ -114,7 +113,6 @@ public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) return new DirCacheIterator(this, currentSubtree); } - /** {@inheritDoc} */ @Override public EmptyTreeIterator createEmptyTreeIterator() { final byte[] n = new byte[Math.max(pathLen + 1, DEFAULT_PATH_SIZE)]; @@ -123,7 +121,6 @@ public EmptyTreeIterator createEmptyTreeIterator() { return new EmptyTreeIterator(this, n, pathLen + 1); } - /** {@inheritDoc} */ @Override public boolean hasId() { if (currentSubtree != null) @@ -131,7 +128,6 @@ public boolean hasId() { return currentEntry != null; } - /** {@inheritDoc} */ @Override public byte[] idBuffer() { if (currentSubtree != null) @@ -141,7 +137,6 @@ public byte[] idBuffer() { return zeroid; } - /** {@inheritDoc} */ @Override public int idOffset() { if (currentSubtree != null) @@ -151,7 +146,6 @@ public int idOffset() { return 0; } - /** {@inheritDoc} */ @Override public void reset() { if (!first()) { @@ -164,19 +158,16 @@ public void reset() { } } - /** {@inheritDoc} */ @Override public boolean first() { return ptr == treeStart; } - /** {@inheritDoc} */ @Override public boolean eof() { return ptr == treeEnd; } - /** {@inheritDoc} */ @Override public void next(int delta) { while (--delta >= 0) { @@ -190,7 +181,6 @@ public void next(int delta) { } } - /** {@inheritDoc} */ @Override public void back(int delta) { while (--delta >= 0) { @@ -271,6 +261,7 @@ public DirCacheEntry getDirCacheEntry() { * @return {@link org.eclipse.jgit.attributes.AttributesNode} for the * current entry. * @throws java.io.IOException + * if an IO error occurred * @since 3.7 */ public AttributesNode getEntryAttributesNode(ObjectReader reader) 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 e0c1e9391..2561ae999 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheTree.java @@ -534,7 +534,6 @@ private static int slash(byte[] a, int aPos) { return -1; } - /** {@inheritDoc} */ @Override public String toString() { return getNameString(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java index 4a535619d..40aa1c3b7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/LargeObjectException.java @@ -84,7 +84,6 @@ public void setObjectId(AnyObjectId id) { objectId = id.copy(); } - /** {@inheritDoc} */ @Override public String getMessage() { return MessageFormat.format(JGitText.get().largeObjectException, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/errors/RevisionSyntaxException.java b/org.eclipse.jgit/src/org/eclipse/jgit/errors/RevisionSyntaxException.java index 084d67c02..83876ef03 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/errors/RevisionSyntaxException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/errors/RevisionSyntaxException.java @@ -44,7 +44,6 @@ public RevisionSyntaxException(String message, String revstr) { this.revstr = revstr; } - /** {@inheritDoc} */ @Override public String toString() { return super.toString() + ":" + revstr; //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java index e6342542d..0c2aa46aa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/ConfigChangedEvent.java @@ -14,13 +14,11 @@ * Describes a change to one or more keys in the configuration. */ public class ConfigChangedEvent extends RepositoryEvent { - /** {@inheritDoc} */ @Override public Class getListenerType() { return ConfigChangedListener.class; } - /** {@inheritDoc} */ @Override public void dispatch(ConfigChangedListener listener) { listener.onConfigChanged(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java index f5a6d64b1..64d285aca 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java @@ -36,13 +36,11 @@ public boolean isInternal() { return internal; } - /** {@inheritDoc} */ @Override public Class getListenerType() { return IndexChangedListener.class; } - /** {@inheritDoc} */ @Override public void dispatch(IndexChangedListener listener) { listener.onIndexChanged(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java index 44897605d..94d49fd93 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerHandle.java @@ -35,7 +35,6 @@ public void remove() { parent.remove(this); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java index 476c37c1c..92a227750 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/ListenerList.java @@ -71,6 +71,8 @@ public ListenerHandle addConfigChangedListener( /** * Add a listener to the list. * + * @param + * type of {@code RepositoryListener} * @param type * type of listener being registered. * @param listener diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java index 6f1e8d5d6..9bd1ef065 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/RefsChangedEvent.java @@ -14,13 +14,11 @@ * Describes a change to one or more references of a repository. */ public class RefsChangedEvent extends RepositoryEvent { - /** {@inheritDoc} */ @Override public Class getListenerType() { return RefsChangedListener.class; } - /** {@inheritDoc} */ @Override public void dispatch(RefsChangedListener listener) { listener.onRefsChanged(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java index 81f2e73de..288074e15 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/RepositoryEvent.java @@ -61,7 +61,6 @@ public Repository getRepository() { */ public abstract void dispatch(T listener); - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java index f9888eae3..c3275153e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/WorkingTreeModifiedEvent.java @@ -87,13 +87,11 @@ public Collection getDeleted() { return result; } - /** {@inheritDoc} */ @Override public Class getListenerType() { return WorkingTreeModifiedListener.class; } - /** {@inheritDoc} */ @Override public void dispatch(WorkingTreeModifiedListener listener) { listener.onWorkingTreeModified(this); 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 d54bf65a2..8668ea9c0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/AbstractHead.java @@ -45,7 +45,6 @@ public final void setNewHeads(List newHeads) { this.newHeads = newHeads; } - /** {@inheritDoc} */ @Override public List getNextHeads(char c) { if (matches(c)) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java index faf4ee66c..92fee6218 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/CharacterHead.java @@ -24,13 +24,11 @@ final class CharacterHead extends AbstractHead { this.expectedCharacter = expectedCharacter; } - /** {@inheritDoc} */ @Override protected final boolean matches(char c) { return c == expectedCharacter; } - /** {@inheritDoc} */ @Override public String toString() { return String.valueOf(expectedCharacter); 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 5ffcafc41..3b240c3b7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/GroupHead.java @@ -96,7 +96,6 @@ final class GroupHead extends AbstractHead { } } - /** {@inheritDoc} */ @Override protected final boolean matches(char c) { for (CharacterPattern pattern : characterClasses) { 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 6aac3faab..d4cc850a1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/LastHead.java @@ -22,7 +22,6 @@ private LastHead() { // defined because of javadoc and visibility modifier. } - /** {@inheritDoc} */ @Override public List getNextHeads(char c) { return FileNameMatcher.EMPTY_HEAD_LIST; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java index 14b6038c4..6b4526f82 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/RestrictedWildCardHead.java @@ -18,13 +18,11 @@ final class RestrictedWildCardHead extends AbstractHead { this.excludedCharacter = excludedCharacter; } - /** {@inheritDoc} */ @Override protected final boolean matches(char c) { return c != excludedCharacter; } - /** {@inheritDoc} */ @Override public String toString() { return isStar() ? "*" : "?"; //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java index 3665a7047..62b6f42c5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/WildCardHead.java @@ -15,7 +15,6 @@ final class WildCardHead extends AbstractHead { super(star); } - /** {@inheritDoc} */ @Override protected final boolean matches(char c) { return true; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java index aa69a0511..957b3869f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java @@ -75,7 +75,9 @@ public interface IncludedFileReader { * The relative path to the file to read * @return the {@code InputStream} of the file. * @throws GitAPIException + * a JGit API exception * @throws IOException + * if an IO error occurred */ public InputStream readIncludeFile(String path) throws GitAPIException, IOException; @@ -134,6 +136,7 @@ public ManifestParser(IncludedFileReader includedReader, String filename, * @param inputStream * a {@link java.io.InputStream} object. * @throws java.io.IOException + * if an IO error occurred */ public void read(InputStream inputStream) throws IOException { xmlInRead++; @@ -151,7 +154,6 @@ public void read(InputStream inputStream) throws IOException { } } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public void startElement( @@ -239,7 +241,6 @@ public void startElement( } } - /** {@inheritDoc} */ @Override public void endElement( String uri, @@ -251,7 +252,6 @@ public void endElement( } } - /** {@inheritDoc} */ @Override public void endDocument() throws SAXException { xmlInRead--; 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 6e943e5d3..1ca3ce450 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java @@ -105,6 +105,7 @@ public interface RemoteReader { * @return the sha1 of the remote repository, or null if the ref does * not exist. * @throws GitAPIException + * a JGit API exception */ @Nullable public ObjectId sha1(String uri, String ref) throws GitAPIException; @@ -120,7 +121,10 @@ public interface RemoteReader { * The relative path (inside the repo) to the file to read * @return the file content. * @throws GitAPIException + * If the ref have an invalid or ambiguous name, or it does + * not exist in the repository, * @throws IOException + * If the object does not exist or is too large * @since 3.5 * * @deprecated Use {@link #readFileWithMode(String, String, String)} @@ -528,7 +532,6 @@ public RepoCommand addToDestination(String path, String contents) { return this; } - /** {@inheritDoc} */ @Override public RevCommit call() throws GitAPIException { checkCallable(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java index c5ead0952..ad9538a90 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java @@ -93,6 +93,7 @@ public CopyFile(Repository repo, String path, String src, String dest) { * Do the copy file action. * * @throws IOException + * if an IO error occurred */ public void copy() throws IOException { File srcFile = new File(repo.getWorkTree(), @@ -418,7 +419,6 @@ public boolean isAncestorOf(String thatPath) { return thatPath.startsWith(getPathWithSlash()); } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof RepoProject) { @@ -428,13 +428,11 @@ public boolean equals(Object o) { return false; } - /** {@inheritDoc} */ @Override public int hashCode() { return this.getPathWithSlash().hashCode(); } - /** {@inheritDoc} */ @Override public int compareTo(RepoProject that) { return this.getPathWithSlash().compareTo(that.getPathWithSlash()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java index 023aef1c1..17fdd7e7c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/CommitMsgHook.java @@ -71,7 +71,6 @@ protected CommitMsgHook(Repository repo, PrintStream outputStream, super(repo, outputStream, errorStream); } - /** {@inheritDoc} */ @Override public String call() throws IOException, AbortedByHookException { if (commitMessage == null) { @@ -94,7 +93,6 @@ private boolean canRun() { return getCommitEditMessageFilePath() != null && commitMessage != null; } - /** {@inheritDoc} */ @Override public String getHookName() { return NAME; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java index b9dafcca3..3988ee06c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PostCommitHook.java @@ -61,14 +61,12 @@ protected PostCommitHook(Repository repo, PrintStream outputStream, super(repo, outputStream, errorStream); } - /** {@inheritDoc} */ @Override public Void call() throws IOException, AbortedByHookException { doRun(); return null; } - /** {@inheritDoc} */ @Override public String getHookName() { return NAME; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java index 321f47662..b12ea83b9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PreCommitHook.java @@ -60,14 +60,12 @@ protected PreCommitHook(Repository repo, PrintStream outputStream, super(repo, outputStream, errorStream); } - /** {@inheritDoc} */ @Override public Void call() throws IOException, AbortedByHookException { doRun(); return null; } - /** {@inheritDoc} */ @Override public String getHookName() { return NAME; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java index 43dbc37f4..e36312b3d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/hooks/PrePushHook.java @@ -74,13 +74,11 @@ protected PrePushHook(Repository repo, PrintStream outputStream, super(repo, outputStream, errorStream); } - /** {@inheritDoc} */ @Override protected String getStdinArgs() { return refs; } - /** {@inheritDoc} */ @Override public String call() throws IOException, AbortedByHookException { if (canRun()) { @@ -96,7 +94,6 @@ private boolean canRun() { return true; } - /** {@inheritDoc} */ @Override public String getHookName() { return NAME; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java index 9dd565ff0..b041729e2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/FastIgnoreRule.java @@ -208,7 +208,6 @@ public boolean isEmpty() { return matcher == NO_MATCH; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -221,7 +220,6 @@ public String toString() { } - /** {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; @@ -232,7 +230,6 @@ public int hashCode() { return result; } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java index 4e7f126a6..33dceb071 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/IgnoreNode.java @@ -190,7 +190,6 @@ public MatchResult isIgnored(String entryPath, boolean isDirectory) { return null; } - /** {@inheritDoc} */ @Override public String toString() { return rules.toString(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java index 0737ed887..a3f365ea0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/AbstractMatcher.java @@ -33,19 +33,16 @@ public abstract class AbstractMatcher implements IMatcher { this.dirOnly = dirOnly; } - /** {@inheritDoc} */ @Override public String toString() { return pattern; } - /** {@inheritDoc} */ @Override public int hashCode() { return pattern.hashCode(); } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) 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 73e2ad397..84376be53 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 @@ -22,7 +22,6 @@ public class LeadingAsteriskMatcher extends NameMatcher { "Pattern must have leading asterisk: " + pattern); //$NON-NLS-1$ } - /** {@inheritDoc} */ @Override public boolean matches(String segment, int startIncl, int endExcl) { // 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 39fa74f6e..4f8e149b4 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 @@ -38,7 +38,6 @@ public class NameMatcher extends AbstractMatcher { } } - /** {@inheritDoc} */ @Override public boolean matches(String path, boolean assumeDirectory, boolean pathMatch) { @@ -88,7 +87,6 @@ public boolean matches(String path, boolean assumeDirectory, return false; } - /** {@inheritDoc} */ @Override public boolean matches(String segment, int startIncl, int endExcl) { // 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 ba77b3dd8..a40568de0 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 @@ -91,6 +91,7 @@ private static List createMatchers(List segments, * a boolean. * @return never null * @throws org.eclipse.jgit.errors.InvalidPatternException + * if pattern is invalid */ public static IMatcher createPathMatcher(String pattern, Character pathSeparator, boolean dirOnly) @@ -149,7 +150,6 @@ private static IMatcher createNameMatcher0(String segment, } } - /** {@inheritDoc} */ @Override public boolean matches(String path, boolean assumeDirectory, boolean pathMatch) { @@ -192,7 +192,6 @@ private boolean simpleMatch(String path, boolean assumeDirectory, return false; } - /** {@inheritDoc} */ @Override public boolean matches(String segment, int startIncl, int endExcl) { throw new UnsupportedOperationException( diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java index fbce08adf..3305a74af 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/Strings.java @@ -232,16 +232,19 @@ enum PatternState { .compile("\\[\\[[.=]\\w+[.=]\\]\\]"); //$NON-NLS-1$ /** - * Conversion from glob to Java regex following two sources:

  • - * http://man7.org/linux/man-pages/man7/glob.7.html
  • - * org.eclipse.jgit.fnmatch.FileNameMatcher.java Seems that there are + * Conversion from glob to Java regex following two sources: + *
      + *
    • http://man7.org/linux/man-pages/man7/glob.7.html + *
    • org.eclipse.jgit.fnmatch.FileNameMatcher.java Seems that there are * various ways to define what "glob" can be. + *
    * * @param pattern * non null pattern * * @return Java regex pattern corresponding to given glob pattern * @throws InvalidPatternException + * if pattern is invalid */ static Pattern convertGlob(String pattern) throws InvalidPatternException { if (UNSUPPORTED.matcher(pattern).find()) @@ -419,6 +422,7 @@ && isLetter(lookAhead(pattern, i))) /** * @param buffer + * buffer * @return zero of the buffer is empty, otherwise the last character from * buffer */ @@ -427,10 +431,13 @@ private static char lookBehind(StringBuilder buffer) { } /** + * Lookahead next character after given index in pattern + * * @param pattern + * the pattern * @param i * current pointer in the pattern - * @return zero of the index is out of range, otherwise the next character + * @return zero if the index is out of range, otherwise the next character * from given position */ private static char lookAhead(String pattern, int i) { 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 7fa076b85..1f1c22327 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 @@ -22,7 +22,6 @@ public class TrailingAsteriskMatcher extends NameMatcher { "Pattern must have trailing asterisk: " + pattern); //$NON-NLS-1$ } - /** {@inheritDoc} */ @Override public boolean matches(String segment, int startIncl, int endExcl) { // faster local access, same as in string.indexOf() diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java index 76a88641c..d976f6ea5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/ignore/internal/WildCardMatcher.java @@ -31,7 +31,6 @@ public class WildCardMatcher extends NameMatcher { p = convertGlob(subPattern); } - /** {@inheritDoc} */ @Override public boolean matches(String segment, int startIncl, int endExcl) { return p.matcher(segment.substring(startIncl, endExcl)).matches(); 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 1baa9abf1..606b585cd 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 @@ -26,7 +26,6 @@ public final class WildMatcher extends AbstractMatcher { super(WILDMATCH, dirOnly); } - /** {@inheritDoc} */ @Override public final boolean matches(String path, boolean assumeDirectory, boolean pathMatch) { @@ -34,7 +33,6 @@ public final boolean matches(String path, boolean assumeDirectory, || (!pathMatch && isSubdirectory(path)); } - /** {@inheritDoc} */ @Override public final boolean matches(String segment, int startIncl, int endExcl) { return true; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diff/FilteredRenameDetector.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diff/FilteredRenameDetector.java index d65624fc6..ec4049a63 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diff/FilteredRenameDetector.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diff/FilteredRenameDetector.java @@ -54,6 +54,7 @@ public FilteredRenameDetector(RenameDetector renameDetector) { * Filter out changes that didn't affect this path. * @return The subset of changes that affect only the filtered path. * @throws IOException + * if an IO error occurred */ public List compute(List diffs, PathFilter pathFilter) throws IOException { @@ -73,6 +74,7 @@ public List compute(List diffs, * Filter out changes that didn't affect these paths. * @return The subset of changes that affect only the filtered paths. * @throws IOException + * if an IO error occurred * @see RenameDetector#compute() */ public List compute(List changes, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java index ebef5247e..3a729fb95 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandExecutor.java @@ -62,8 +62,11 @@ public CommandExecutor(FS fs, boolean checkExitCode) { * the environment * @return the execution result * @throws ToolException + * if a tool raised an error * @throws InterruptedException + * if thread was interrupted * @throws IOException + * if an IO error occurred */ public ExecutionResult run(String command, File workingDir, Map env) @@ -109,8 +112,11 @@ public ExecutionResult run(String command, File workingDir, * the environment * @return the execution result * @throws ToolException + * if a tool raised an error * @throws InterruptedException + * if thread was interrupted * @throws IOException + * if an IO error occurred */ public boolean checkExecutable(String path, File workingDir, Map env) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java index d0034df3b..6a67bf3a1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffTools.java @@ -172,6 +172,7 @@ public Optional compare(FileElement localFile, * the "trust exit code" option * @return the execution result from tool * @throws ToolException + * when the tool fails */ public ExecutionResult compare(FileElement localFile, FileElement remoteFile, ExternalDiffTool tool, @@ -244,6 +245,7 @@ public Set getAllToolNames() { * path to the node in repository to parse git attributes for * @return name of the difftool if set * @throws ToolException + * when the tool failed */ public Optional getExternalToolFromAttributes(final String path) throws ToolException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalToolUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalToolUtils.java index b2dd846d7..367107d0e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalToolUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalToolUtils.java @@ -57,6 +57,7 @@ public class ExternalToolUtils { * the base file (can be null) * @return the prepared (with replaced variables) command string * @throws IOException + * if an IO error occurred */ public static String prepareCommand(String command, FileElement localFile, FileElement remoteFile, FileElement mergedFile, @@ -91,6 +92,7 @@ public static String prepareCommand(String command, FileElement localFile, * the base file (can be null) * @return the environment map with variables and values (file paths) * @throws IOException + * if an IO error occurred */ public static Map prepareEnvironment(File gitDir, FileElement localFile, FileElement remoteFile, @@ -209,6 +211,7 @@ public static Set createSortedToolSet(String defaultName, * config key name for the tool * @return attribute value for the given tool key if set * @throws ToolException + * if the tool failed */ public static Optional getExternalToolFromAttributes( final Repository repository, final String path, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/FileElement.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/FileElement.java index ba8ca54c5..0061e3f87 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/FileElement.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/FileElement.java @@ -138,6 +138,7 @@ public Type getType() { * * @return the object stream * @throws IOException + * if an IO error occurred */ public File getFile() throws IOException { // if we have already temp file and no stream @@ -179,6 +180,7 @@ public boolean isNullPath() { * temporary directory is used * @return temporary file in directory or in the system temporary directory * @throws IOException + * if an IO error occurred */ public File createTempFile(File directory) throws IOException { if (tempFile == null) { @@ -204,6 +206,7 @@ public void cleanTemporaries() { * the input string * @return the replaced input string * @throws IOException + * if an IO error occurred */ public String replaceVariable(String input) throws IOException { return input.replace("$" + type.name(), getFile().getPath()); //$NON-NLS-1$ @@ -215,6 +218,7 @@ public String replaceVariable(String input) throws IOException { * @param env * the environment where this element should be added * @throws IOException + * if an IO error occurred */ public void addToEnv(Map env) throws IOException { env.put(type.name(), getFile().getPath()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeTools.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeTools.java index b90320126..0da58e4a4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeTools.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeTools.java @@ -184,6 +184,7 @@ public Optional merge(FileElement localFile, * the selected tool * @return the execution result from tool * @throws ToolException + * if the tool failed */ public ExecutionResult merge(FileElement localFile, FileElement remoteFile, FileElement mergedFile, FileElement baseFile, File tempDir, @@ -254,6 +255,7 @@ private FileElement createBackupFile(FileElement from, File toParentDir) * @return the created temporary directory if (mergetol.writeToTemp == true) * or null if not configured or false. * @throws IOException + * if an IO error occurred */ public File createTempDirectory() throws IOException { return config.isWriteToTemp() @@ -305,6 +307,7 @@ public Set getAllToolNames() { * path to the node in repository to parse git attributes for * @return name of the difftool if set * @throws ToolException + * if the tool failed */ public Optional getExternalToolFromAttributes(final String path) throws ToolException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/PreDefinedDiffTool.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/PreDefinedDiffTool.java index e1169a2d6..c1d69b4f1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/PreDefinedDiffTool.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/PreDefinedDiffTool.java @@ -43,6 +43,7 @@ public PreDefinedDiffTool(CommandLineDiffTool tool) { /** * @param path + * path string */ @Override public void setPath(String path) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/UserDefinedMergeTool.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/UserDefinedMergeTool.java index 1dd2f0d79..17d5b0b67 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/UserDefinedMergeTool.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/UserDefinedMergeTool.java @@ -59,7 +59,7 @@ protected void setTrustExitCode(BooleanTriState trustExitCode) { /** * @param withBase * not used, because user-defined merge tool can only define one - * cmd -> it must handle with and without base present (empty) + * cmd -> it must handle with and without base present (empty) * @return the tool command */ @Override diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java index 3b9498456..795f4404e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java @@ -66,7 +66,6 @@ public FsckPackParser(ObjectDatabase db, ReadableChannel channel) { this.blockSize = channel.blockSize() > 0 ? channel.blockSize() : 65536; } - /** {@inheritDoc} */ @Override protected void onPackHeader(long objCnt) throws IOException { if (expectedObjectCount >= 0) { @@ -78,48 +77,41 @@ protected void onPackHeader(long objCnt) throws IOException { } } - /** {@inheritDoc} */ @Override protected void onBeginWholeObject(long streamPosition, int type, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected void onObjectHeader(Source src, byte[] raw, int pos, int len) throws IOException { crc.update(raw, pos, len); } - /** {@inheritDoc} */ @Override protected void onObjectData(Source src, byte[] raw, int pos, int len) throws IOException { crc.update(raw, pos, len); } - /** {@inheritDoc} */ @Override protected void onEndWholeObject(PackedObjectInfo info) throws IOException { info.setCRC((int) crc.getValue()); } - /** {@inheritDoc} */ @Override protected void onBeginOfsDelta(long deltaStreamPosition, long baseStreamPosition, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected void onBeginRefDelta(long deltaStreamPosition, AnyObjectId baseId, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected UnresolvedDelta onEndDelta() throws IOException { UnresolvedDelta delta = new UnresolvedDelta(); @@ -127,14 +119,12 @@ protected UnresolvedDelta onEndDelta() throws IOException { return delta; } - /** {@inheritDoc} */ @Override protected void onInflatedObjectData(PackedObjectInfo obj, int typeCode, byte[] data) throws IOException { // FsckPackParser ignores this event. } - /** {@inheritDoc} */ @Override protected void verifySafeObject(final AnyObjectId id, final int type, final byte[] data) { @@ -146,13 +136,11 @@ protected void verifySafeObject(final AnyObjectId id, final int type, } } - /** {@inheritDoc} */ @Override protected void onPackFooter(byte[] hash) throws IOException { // Do nothing. } - /** {@inheritDoc} */ @Override protected boolean onAppendBase(int typeCode, byte[] data, PackedObjectInfo info) throws IOException { @@ -160,13 +148,11 @@ protected boolean onAppendBase(int typeCode, byte[] data, return false; } - /** {@inheritDoc} */ @Override protected void onEndThinPack() throws IOException { // Do nothing. } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj, ObjectTypeAndSize info) throws IOException { @@ -175,7 +161,6 @@ protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj, return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, ObjectTypeAndSize info) throws IOException { @@ -184,7 +169,6 @@ protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected int readDatabase(byte[] dst, int pos, int cnt) throws IOException { @@ -229,13 +213,11 @@ private byte[] readFromChannel(long block) throws IOException { return buf.array(); } - /** {@inheritDoc} */ @Override protected boolean checkCRC(int oldCRC) { return oldCRC == (int) crc.getValue(); } - /** {@inheritDoc} */ @Override protected void onStoreStream(byte[] raw, int pos, int len) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapFilter.java index 86d472200..84f1cb968 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapFilter.java @@ -40,7 +40,6 @@ public AddToBitmapFilter(BitmapBuilder bitmap) { this.bitmap = bitmap; } - /** {@inheritDoc} */ @Override public final boolean include(RevWalk walker, RevCommit cmit) { Bitmap visitedBitmap; @@ -61,13 +60,11 @@ public final boolean include(RevWalk walker, RevCommit cmit) { return false; } - /** {@inheritDoc} */ @Override public final RevFilter clone() { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public final boolean requiresCommitBody() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java index d7ccadfbe..a95432ce7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddToBitmapWithCacheFilter.java @@ -53,7 +53,6 @@ public AddToBitmapWithCacheFilter(AnyObjectId cachedCommit, this.bitmap = bitmap; } - /** {@inheritDoc} */ @Override public final boolean include(RevWalk rw, RevCommit c) { Bitmap visitedBitmap; @@ -76,13 +75,11 @@ public final boolean include(RevWalk rw, RevCommit c) { return false; } - /** {@inheritDoc} */ @Override public final RevFilter clone() { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public final boolean requiresCommitBody() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddUnseenToBitmapFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddUnseenToBitmapFilter.java index da9f9d031..5ac267e78 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddUnseenToBitmapFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/AddUnseenToBitmapFilter.java @@ -48,7 +48,6 @@ public AddUnseenToBitmapFilter(BitmapBuilder seen, BitmapBuilder bitmap) { this.bitmap = bitmap; } - /** {@inheritDoc} */ @Override public final boolean include(RevWalk walker, RevCommit cmit) { Bitmap visitedBitmap; @@ -69,13 +68,11 @@ public final boolean include(RevWalk walker, RevCommit cmit) { return false; } - /** {@inheritDoc} */ @Override public final RevFilter clone() { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public final boolean requiresCommitBody() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/BitmappedReachabilityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/BitmappedReachabilityChecker.java index 37721ad1e..f5f51e483 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/BitmappedReachabilityChecker.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/revwalk/BitmappedReachabilityChecker.java @@ -119,7 +119,6 @@ public ReachedFilter(BitmapIndex repoBitmaps) { this.reached = repoBitmaps.newBitmapBuilder(); } - /** {@inheritDoc} */ @Override public final boolean include(RevWalk walker, RevCommit cmit) { Bitmap commitBitmap; @@ -149,13 +148,11 @@ private static final void dontFollow(RevCommit cmit) { } } - /** {@inheritDoc} */ @Override public final RevFilter clone() { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public final boolean requiresCommitBody() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraph.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraph.java index 0796293f5..7fb5956f9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraph.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraph.java @@ -32,25 +32,21 @@ public interface CommitGraph { /** Empty {@link CommitGraph} with no results. */ CommitGraph EMPTY = new CommitGraph() { - /** {@inheritDoc} */ @Override public int findGraphPosition(AnyObjectId commit) { return -1; } - /** {@inheritDoc} */ @Override public CommitData getCommitData(int graphPos) { return null; } - /** {@inheritDoc} */ @Override public ObjectId getObjectId(int graphPos) { return null; } - /** {@inheritDoc} */ @Override public long getCommitCnt() { return 0; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphConstants.java index a074833fa..422d3be72 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphConstants.java @@ -41,15 +41,15 @@ class CommitGraphConstants { /** Mask to make the last edgeValue into position */ static final int GRAPH_EDGE_LAST_MASK = 0x7fffffff; - /** EdgeValue & GRAPH_LAST_EDGE != 0 means it is the last edgeValue */ + /** EdgeValue & GRAPH_LAST_EDGE != 0 means it is the last edgeValue */ static final int GRAPH_LAST_EDGE = 0x80000000; /** EdgeValue == GRAPH_NO_PARENT means it has no parents */ static final int GRAPH_NO_PARENT = 0x70000000; /** - * EdgeValue & GRAPH_EXTRA_EDGES_NEEDED != 0 means its other parents are in - * Chunk Extra Edge List + * EdgeValue & GRAPH_EXTRA_EDGES_NEEDED != 0 means its other parents are + * in Chunk Extra Edge List */ static final int GRAPH_EXTRA_EDGES_NEEDED = 0x80000000; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphV1.java index da172192e..d520139bc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphV1.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphV1.java @@ -29,13 +29,11 @@ class CommitGraphV1 implements CommitGraph { this.commitData = commitData; } - /** {@inheritDoc} */ @Override public int findGraphPosition(AnyObjectId commit) { return idx.findGraphPosition(commit); } - /** {@inheritDoc} */ @Override public CommitData getCommitData(int graphPos) { if (graphPos < 0 || graphPos >= getCommitCnt()) { @@ -44,13 +42,11 @@ public CommitData getCommitData(int graphPos) { return commitData.getCommitData(graphPos); } - /** {@inheritDoc} */ @Override public ObjectId getObjectId(int graphPos) { return idx.getObjectId(graphPos); } - /** {@inheritDoc} */ @Override public long getCommitCnt() { return idx.getCommitCnt(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java index a58a9eb63..9a57f38a7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphWriter.java @@ -81,6 +81,7 @@ public CommitGraphWriter(@NonNull GraphCommits graphCommits) { * buffered by the caller. The caller is responsible for closing * the stream. * @throws IOException + * if an error occurred */ public void write(@NonNull ProgressMonitor monitor, @NonNull OutputStream commitGraphStream) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphCommits.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphCommits.java index ccf6d0e66..a9a603ff5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphCommits.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/GraphCommits.java @@ -56,6 +56,7 @@ public class GraphCommits implements Iterable { * @return the commits' collection which are used by the commit-graph * writer. Never null. * @throws IOException + * if an error occurred */ public static GraphCommits fromWalk(ProgressMonitor pm, @NonNull Set wants, @NonNull RevWalk walk) @@ -124,7 +125,6 @@ int size() { return sortedCommits.size(); } - /** {@inheritDoc} */ @Override public Iterator iterator() { return sortedCommits.iterator(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedEvent.java index cdfd3e959..68fc296d3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/BeforeDfsPackIndexLoadedEvent.java @@ -41,13 +41,11 @@ public DfsPackFile getPackFile() { return pack; } - /** {@inheritDoc} */ @Override public Class getListenerType() { return BeforeDfsPackIndexLoadedListener.class; } - /** {@inheritDoc} */ @Override public void dispatch(BeforeDfsPackIndexLoadedListener listener) { listener.onBeforeDfsPackIndexLoaded(this); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java index 0a02180d7..99b9d556a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCache.java @@ -847,6 +847,7 @@ interface ReadableChannelSupplier { /** * @return ReadableChannel * @throws IOException + * if an IO error occurred */ ReadableChannel get() throws IOException; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java index 22959e9f6..d6d3fbfd3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsCachedPack.java @@ -43,19 +43,16 @@ public DfsPackDescription getPackDescription() { return pack.getPackDescription(); } - /** {@inheritDoc} */ @Override public long getObjectCount() throws IOException { return getPackDescription().getObjectCount(); } - /** {@inheritDoc} */ @Override public long getDeltaCount() throws IOException { return getPackDescription().getDeltaCount(); } - /** {@inheritDoc} */ @Override public boolean hasObject(ObjectToPack obj, StoredObjectRepresentation rep) { return ((DfsObjectRepresentation) rep).pack == pack; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsConfig.java index 2ee23f862..4f0e4a55d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsConfig.java @@ -22,13 +22,11 @@ * simply clears the config, and saving does nothing. */ public final class DfsConfig extends StoredConfig { - /** {@inheritDoc} */ @Override public void load() throws IOException, ConfigInvalidException { clear(); } - /** {@inheritDoc} */ @Override public void save() throws IOException { // TODO actually store this configuration. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java index a2fb67ff0..ceb1769de 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsInserter.java @@ -106,19 +106,16 @@ void setCompressionLevel(int compression) { this.compression = compression; } - /** {@inheritDoc} */ @Override public DfsPackParser newPackParser(InputStream in) throws IOException { return new DfsPackParser(db, this, in); } - /** {@inheritDoc} */ @Override public ObjectReader newReader() { return new Reader(); } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, byte[] data, int off, int len) throws IOException { @@ -135,7 +132,6 @@ public ObjectId insert(int type, byte[] data, int off, int len) return endObject(id, offset); } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, long len, InputStream in) throws IOException { @@ -178,7 +174,6 @@ private byte[] insertBuffer(long len) { return buf; } - /** {@inheritDoc} */ @Override public void flush() throws IOException { if (packDsc == null) @@ -206,7 +201,6 @@ public void flush() throws IOException { clear(); } - /** {@inheritDoc} */ @Override public void close() { if (packOut != null) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java index 46ec87df5..faeafceec 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjDatabase.java @@ -241,13 +241,11 @@ public void setPackComparator(Comparator packComparator) { this.packComparator = packComparator; } - /** {@inheritDoc} */ @Override public DfsReader newReader() { return new DfsReader(this); } - /** {@inheritDoc} */ @Override public ObjectInserter newInserter() { return new DfsInserter(this); @@ -657,7 +655,6 @@ protected void clearCache() { packList.set(NO_PACKS); } - /** {@inheritDoc} */ @Override public void close() { packList.set(NO_PACKS); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java index 8e124e3c2..885582fae 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectRepresentation.java @@ -24,25 +24,21 @@ class DfsObjectRepresentation extends StoredObjectRepresentation { this.pack = pack; } - /** {@inheritDoc} */ @Override public int getFormat() { return format; } - /** {@inheritDoc} */ @Override public int getWeight() { return (int) Math.min(length, Integer.MAX_VALUE); } - /** {@inheritDoc} */ @Override public ObjectId getDeltaBase() { return baseId; } - /** {@inheritDoc} */ @Override public boolean wasDeltaAttempted() { switch (pack.getPackDescription().getPackSource()) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java index 10fa2365b..c2feab8cd 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsObjectToPack.java @@ -39,14 +39,12 @@ final void setFound() { setExtendedFlag(FLAG_FOUND); } - /** {@inheritDoc} */ @Override protected void clearReuseAsIs() { super.clearReuseAsIs(); pack = null; } - /** {@inheritDoc} */ @Override public void select(StoredObjectRepresentation ref) { DfsObjectRepresentation ptr = (DfsObjectRepresentation) ref; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsOutputStream.java index 7cf91a488..c74a1e1d7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsOutputStream.java @@ -39,13 +39,11 @@ public int blockSize() { return 0; } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { write(new byte[] { (byte) b }); } - /** {@inheritDoc} */ @Override public abstract void write(byte[] buf, int off, int len) throws IOException; 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 4f418ab4d..f012b8bca 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 @@ -512,13 +512,11 @@ public DfsPackDescription setIndexVersion(int version) { return this; } - /** {@inheritDoc} */ @Override public int hashCode() { return packName.hashCode(); } - /** {@inheritDoc} */ @Override public boolean equals(Object b) { if (b instanceof DfsPackDescription) { @@ -539,7 +537,6 @@ static boolean isGC(PackSource s) { } } - /** {@inheritDoc} */ @Override public String toString() { return getFileName(PackExt.PACK); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java index d8e191c4e..1a438e415 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPackParser.java @@ -101,7 +101,6 @@ protected DfsPackParser(DfsObjDatabase db, DfsInserter ins, InputStream in) { this.packDigest = Constants.newMessageDigest(); } - /** {@inheritDoc} */ @Override public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving) throws IOException { @@ -172,7 +171,6 @@ public DfsPackDescription getPackDescription() { return packDsc; } - /** {@inheritDoc} */ @Override protected void onPackHeader(long objectCount) throws IOException { if (objectCount == 0) { @@ -194,34 +192,29 @@ else if (size < blockCache.getBlockSize()) currBuf = new byte[blockSize]; } - /** {@inheritDoc} */ @Override protected void onBeginWholeObject(long streamPosition, int type, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected void onEndWholeObject(PackedObjectInfo info) throws IOException { info.setCRC((int) crc.getValue()); } - /** {@inheritDoc} */ @Override protected void onBeginOfsDelta(long streamPosition, long baseStreamPosition, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected void onBeginRefDelta(long streamPosition, AnyObjectId baseId, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected UnresolvedDelta onEndDelta() throws IOException { UnresolvedDelta delta = new UnresolvedDelta(); @@ -229,28 +222,24 @@ protected UnresolvedDelta onEndDelta() throws IOException { return delta; } - /** {@inheritDoc} */ @Override protected void onInflatedObjectData(PackedObjectInfo obj, int typeCode, byte[] data) throws IOException { // DfsPackParser ignores this event. } - /** {@inheritDoc} */ @Override protected void onObjectHeader(Source src, byte[] raw, int pos, int len) throws IOException { crc.update(raw, pos, len); } - /** {@inheritDoc} */ @Override protected void onObjectData(Source src, byte[] raw, int pos, int len) throws IOException { crc.update(raw, pos, len); } - /** {@inheritDoc} */ @Override protected void onStoreStream(byte[] raw, int pos, int len) throws IOException { @@ -297,7 +286,6 @@ private DfsBlock flushBlock() throws IOException { return v; } - /** {@inheritDoc} */ @Override protected void onPackFooter(byte[] hash) throws IOException { // The base class will validate the original hash matches @@ -307,7 +295,6 @@ protected void onPackFooter(byte[] hash) throws IOException { packHash = hash; } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj, ObjectTypeAndSize info) throws IOException { @@ -316,7 +303,6 @@ protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj, return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, ObjectTypeAndSize info) throws IOException { @@ -325,7 +311,6 @@ protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected int readDatabase(byte[] dst, int pos, int cnt) throws IOException { if (cnt == 0) @@ -381,13 +366,11 @@ private long toBlockStart(long pos) { return (pos / blockSize) * blockSize; } - /** {@inheritDoc} */ @Override protected boolean checkCRC(int oldCRC) { return oldCRC == (int) crc.getValue(); } - /** {@inheritDoc} */ @Override protected boolean onAppendBase(final int typeCode, final byte[] data, final PackedObjectInfo info) throws IOException { @@ -427,7 +410,6 @@ protected boolean onAppendBase(final int typeCode, final byte[] data, return true; } - /** {@inheritDoc} */ @Override protected void onEndThinPack() throws IOException { // Normally when a thin pack is closed the pack header gets diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedEvent.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedEvent.java index 750c11826..f4e863d02 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsPacksChangedEvent.java @@ -18,13 +18,11 @@ */ public class DfsPacksChangedEvent extends RepositoryEvent { - /** {@inheritDoc} */ @Override public Class getListenerType() { return DfsPacksChangedListener.class; } - /** {@inheritDoc} */ @Override public void dispatch(DfsPacksChangedListener listener) { listener.onPacksChanged(this); 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 8d8a766b0..56fe5d508 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 @@ -100,19 +100,16 @@ DeltaBaseCache getDeltaBaseCache() { return baseCache; } - /** {@inheritDoc} */ @Override public ObjectReader newReader() { return db.newReader(); } - /** {@inheritDoc} */ @Override public void setAvoidUnreachableObjects(boolean avoid) { avoidUnreachable = avoid; } - /** {@inheritDoc} */ @Override public BitmapIndex getBitmapIndex() throws IOException { for (DfsPackFile pack : db.getPacks()) { @@ -123,7 +120,6 @@ public BitmapIndex getBitmapIndex() throws IOException { return null; } - /** {@inheritDoc} */ @Override public Optional getCommitGraph() throws IOException { for (DfsPackFile pack : db.getPacks()) { @@ -135,7 +131,6 @@ public Optional getCommitGraph() throws IOException { return Optional.empty(); } - /** {@inheritDoc} */ @Override public Collection getCachedPacksAndUpdate( BitmapBuilder needBitmap) throws IOException { @@ -148,7 +143,6 @@ public Collection getCachedPacksAndUpdate( return Collections.emptyList(); } - /** {@inheritDoc} */ @Override public Collection resolve(AbbreviatedObjectId id) throws IOException { @@ -177,7 +171,6 @@ private void resolveImpl(PackList packList, AbbreviatedObjectId id, } } - /** {@inheritDoc} */ @Override public boolean has(AnyObjectId objectId) throws IOException { if (last != null @@ -207,7 +200,6 @@ private boolean hasImpl(PackList packList, AnyObjectId objectId) return false; } - /** {@inheritDoc} */ @Override public ObjectLoader open(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, @@ -262,7 +254,6 @@ private ObjectLoader openImpl(PackList packList, AnyObjectId objectId) return null; } - /** {@inheritDoc} */ @Override public Set getShallowCommits() { return Collections.emptySet(); @@ -370,7 +361,6 @@ private boolean skipGarbagePack(DfsPackFile pack) { return avoidUnreachable && pack.isGarbage(); } - /** {@inheritDoc} */ @Override public AsyncObjectLoaderQueue open( Iterable objectIds, final boolean reportMissing) { @@ -430,7 +420,6 @@ public void release() { }; } - /** {@inheritDoc} */ @Override public AsyncObjectSizeQueue getObjectSize( Iterable objectIds, final boolean reportMissing) { @@ -492,7 +481,6 @@ public void release() { }; } - /** {@inheritDoc} */ @Override public long getObjectSize(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, @@ -538,7 +526,6 @@ private long getObjectSizeImpl(PackList packList, AnyObjectId objectId) return -1; } - /** {@inheritDoc} */ @Override public DfsObjectToPack newObjectToPack(AnyObjectId objectId, int type) { return new DfsObjectToPack(objectId, type); @@ -642,7 +629,6 @@ private List findAllFromPack(DfsPackFile pack, return tmp; } - /** {@inheritDoc} */ @Override public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp, boolean validate) throws IOException, @@ -651,7 +637,6 @@ public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp, src.pack.copyAsIs(out, src, validate, this); } - /** {@inheritDoc} */ @Override public void writeObjects(PackOutputStream out, List list) throws IOException { @@ -659,7 +644,6 @@ public void writeObjects(PackOutputStream out, List list) out.writeObject(otp); } - /** {@inheritDoc} */ @Override public void copyPackAsIs(PackOutputStream out, CachedPack pack) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java index ae656707a..b52456225 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefDatabase.java @@ -65,7 +65,6 @@ boolean exists() throws IOException { return 0 < read().size(); } - /** {@inheritDoc} */ @Override public Ref exactRef(String name) throws IOException { RefCache curr = read(); @@ -73,13 +72,11 @@ public Ref exactRef(String name) throws IOException { return ref != null ? resolve(ref, 0, curr.ids) : null; } - /** {@inheritDoc} */ @Override public List getAdditionalRefs() { return Collections.emptyList(); } - /** {@inheritDoc} */ @Override public Map getRefs(String prefix) throws IOException { RefCache curr = read(); @@ -126,7 +123,6 @@ private Ref resolve(Ref ref, int depth, RefList loose) return new SymbolicRef(ref.getName(), dst); } - /** {@inheritDoc} */ @Override public Ref peel(Ref ref) throws IOException { final Ref oldLeaf = ref.getLeaf(); @@ -176,7 +172,6 @@ static Ref recreate(Ref old, Ref leaf, boolean hasVersioning) { return leaf; } - /** {@inheritDoc} */ @Override public RefUpdate newUpdate(String refName, boolean detach) throws IOException { @@ -193,7 +188,6 @@ public RefUpdate newUpdate(String refName, boolean detach) return update; } - /** {@inheritDoc} */ @Override public RefRename newRename(String fromName, String toName) throws IOException { @@ -202,7 +196,6 @@ public RefRename newRename(String fromName, String toName) return new DfsRefRename(src, dst); } - /** {@inheritDoc} */ @Override public boolean isNameConflicting(String refName) throws IOException { RefList all = read().ids; @@ -224,19 +217,16 @@ public boolean isNameConflicting(String refName) throws IOException { return false; } - /** {@inheritDoc} */ @Override public void create() { // Nothing to do. } - /** {@inheritDoc} */ @Override public void refresh() { clearCache(); } - /** {@inheritDoc} */ @Override public void close() { clearCache(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefRename.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefRename.java index 569803575..e76b0bc14 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefRename.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefRename.java @@ -22,7 +22,6 @@ final class DfsRefRename extends RefRename { super(src, dst); } - /** {@inheritDoc} */ @Override protected Result doRename() throws IOException { // TODO Correctly handle renaming foo/bar to foo. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefUpdate.java index 28331a08e..f32703412 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRefUpdate.java @@ -33,19 +33,16 @@ final class DfsRefUpdate extends RefUpdate { this.refdb = refdb; } - /** {@inheritDoc} */ @Override protected DfsRefDatabase getRefDatabase() { return refdb; } - /** {@inheritDoc} */ @Override protected DfsRepository getRepository() { return refdb.getRepository(); } - /** {@inheritDoc} */ @Override protected boolean tryLock(boolean deref) throws IOException { dstRef = getRef(); @@ -60,13 +57,11 @@ protected boolean tryLock(boolean deref) throws IOException { return true; } - /** {@inheritDoc} */ @Override protected void unlock() { // No state is held while "locked". } - /** {@inheritDoc} */ @Override public Result update(RevWalk walk) throws IOException { try { @@ -77,7 +72,6 @@ public Result update(RevWalk walk) throws IOException { } } - /** {@inheritDoc} */ @Override protected Result doUpdate(Result desiredResult) throws IOException { ObjectIdRef newRef; @@ -102,7 +96,6 @@ protected Result doUpdate(Result desiredResult) throws IOException { return Result.LOCK_FAILURE; } - /** {@inheritDoc} */ @Override protected Result doDelete(Result desiredResult) throws IOException { if (getRefDatabase().compareAndRemove(dstRef)) { @@ -112,7 +105,6 @@ protected Result doDelete(Result desiredResult) throws IOException { return Result.LOCK_FAILURE; } - /** {@inheritDoc} */ @Override protected Result doLink(String target) throws IOException { final SymbolicRef newRef = new SymbolicRef( diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java index 6c3b056ef..3ba74b26f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableDatabase.java @@ -75,19 +75,16 @@ public MergedReftable openMergedReftable() throws IOException { stack = null; } - /** {@inheritDoc} */ @Override public boolean hasVersioning() { return true; } - /** {@inheritDoc} */ @Override public boolean performsAtomicTransactions() { return true; } - /** {@inheritDoc} */ @Override public BatchRefUpdate newBatchUpdate() { DfsObjDatabase odb = getRepository().getObjectDatabase(); @@ -151,13 +148,11 @@ public boolean isNameConflicting(String refName) throws IOException { return reftableDatabase.isNameConflicting(refName, new TreeSet<>(), new HashSet<>()); } - /** {@inheritDoc} */ @Override public Ref exactRef(String name) throws IOException { return reftableDatabase.exactRef(name); } - /** {@inheritDoc} */ @Override public Map getRefs(String prefix) throws IOException { List refs = reftableDatabase.getRefsByPrefix(prefix); @@ -169,21 +164,18 @@ public Map getRefs(String prefix) throws IOException { RefList.emptyList()); } - /** {@inheritDoc} */ @Override public List getRefsByPrefix(String prefix) throws IOException { return reftableDatabase.getRefsByPrefix(prefix); } - /** {@inheritDoc} */ @Override public List getRefsByPrefixWithExclusions(String include, Set excludes) throws IOException { return reftableDatabase.getRefsByPrefixWithExclusions(include, excludes); } - /** {@inheritDoc} */ @Override public Set getTipsWithSha1(ObjectId id) throws IOException { if (!getReftableConfig().isIndexObjects()) { @@ -192,13 +184,11 @@ public Set getTipsWithSha1(ObjectId id) throws IOException { return reftableDatabase.getTipsWithSha1(id); } - /** {@inheritDoc} */ @Override public boolean hasFastTipsWithSha1() throws IOException { return reftableDatabase.hasFastTipsWithSha1(); } - /** {@inheritDoc} */ @Override public Ref peel(Ref ref) throws IOException { Ref oldLeaf = ref.getLeaf(); @@ -233,7 +223,6 @@ void clearCache() { } } - /** {@inheritDoc} */ @Override protected boolean compareAndPut(Ref oldRef, @Nullable Ref newRef) throws IOException { @@ -254,13 +243,11 @@ protected boolean compareAndPut(Ref oldRef, @Nullable Ref newRef) } } - /** {@inheritDoc} */ @Override protected boolean compareAndRemove(Ref oldRef) throws IOException { return compareAndPut(oldRef, null); } - /** {@inheritDoc} */ @Override protected RefCache scanAllRefs() throws IOException { throw new UnsupportedOperationException(); @@ -276,7 +263,6 @@ void removed(String refName) { // Unnecessary; DfsReftableBatchRefUpdate calls clearCache(). } - /** {@inheritDoc} */ @Override protected void cachePeeledState(Ref oldLeaf, Ref newLeaf) { // Do not cache peeled state in reftable. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableStack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableStack.java index 27b03299e..97ba4d52e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableStack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsReftableStack.java @@ -80,7 +80,6 @@ public List readers() { return Collections.unmodifiableList(tables); } - /** {@inheritDoc} */ @Override public void close() { for (ReftableReader t : tables) { 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 32c0ccdf4..218f1e955 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 @@ -45,7 +45,6 @@ protected DfsRepository(DfsRepositoryBuilder builder) { this.description = builder.getRepositoryDescription(); } - /** {@inheritDoc} */ @Override public abstract DfsObjDatabase getObjectDatabase(); @@ -72,7 +71,6 @@ public boolean exists() throws IOException { return true; } - /** {@inheritDoc} */ @Override public void create(boolean bare) throws IOException { if (exists()) @@ -85,39 +83,33 @@ public void create(boolean bare) throws IOException { throw new IOException(result.name()); } - /** {@inheritDoc} */ @Override public StoredConfig getConfig() { return config; } - /** {@inheritDoc} */ @Override public String getIdentifier() { return getDescription().getRepositoryName(); } - /** {@inheritDoc} */ @Override public void scanForRepoChanges() throws IOException { getRefDatabase().refresh(); getObjectDatabase().clearCache(); } - /** {@inheritDoc} */ @Override public void notifyIndexChanged(boolean internal) { // Do not send notifications. // There is no index, as there is no working tree. } - /** {@inheritDoc} */ @Override public ReflogReader getReflogReader(String refName) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public AttributesNodeProvider createAttributesNodeProvider() { // TODO Check if the implementation used in FileRepository can be used diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryBuilder.java index 943d92684..ab5f7fe75 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryBuilder.java @@ -72,7 +72,6 @@ public B setRepositoryDescription(DfsRepositoryDescription desc) { return self(); } - /** {@inheritDoc} */ @Override public B setup() throws IllegalArgumentException, IOException { super.setup(); @@ -97,7 +96,6 @@ public B setup() throws IllegalArgumentException, IOException { // We don't support local file IO and thus shouldn't permit these to set. - /** {@inheritDoc} */ @Override public B setGitDir(File gitDir) { if (gitDir != null) @@ -105,7 +103,6 @@ public B setGitDir(File gitDir) { return self(); } - /** {@inheritDoc} */ @Override public B setObjectDirectory(File objectDirectory) { if (objectDirectory != null) @@ -113,14 +110,12 @@ public B setObjectDirectory(File objectDirectory) { return self(); } - /** {@inheritDoc} */ @Override public B addAlternateObjectDirectory(File other) { throw new UnsupportedOperationException( JGitText.get().unsupportedAlternates); } - /** {@inheritDoc} */ @Override public B setWorkTree(File workTree) { if (workTree != null) @@ -128,7 +123,6 @@ public B setWorkTree(File workTree) { return self(); } - /** {@inheritDoc} */ @Override public B setIndexFile(File indexFile) { if (indexFile != null) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryDescription.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryDescription.java index 069956b58..e94908581 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryDescription.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsRepositoryDescription.java @@ -42,7 +42,6 @@ public String getRepositoryName() { return repositoryName; } - /** {@inheritDoc} */ @Override public int hashCode() { if (getRepositoryName() != null) @@ -50,7 +49,6 @@ public int hashCode() { return System.identityHashCode(this); } - /** {@inheritDoc} */ @Override public boolean equals(Object b) { if (b instanceof DfsRepositoryDescription){ @@ -61,7 +59,6 @@ public boolean equals(Object b) { return false; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsStreamKey.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsStreamKey.java index f3f30914f..8983c2d2e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsStreamKey.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsStreamKey.java @@ -56,17 +56,14 @@ protected DfsStreamKey(int hash, @Nullable PackExt ext) { this.packExtPos = ext == null ? 0 : ext.getPosition(); } - /** {@inheritDoc} */ @Override public int hashCode() { return hash; } - /** {@inheritDoc} */ @Override public abstract boolean equals(Object o); - /** {@inheritDoc} */ @SuppressWarnings("boxing") @Override public String toString() { 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 583b8b3f6..734a5fca3 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 @@ -78,13 +78,11 @@ protected MemRefDatabase createRefDatabase() { return new MemRefDatabase(); } - /** {@inheritDoc} */ @Override public MemObjDatabase getObjectDatabase() { return objdb; } - /** {@inheritDoc} */ @Override public RefDatabase getRefDatabase() { return refdb; @@ -102,14 +100,12 @@ public void setPerformsAtomicTransactions(boolean atomic) { refdb.performsAtomicTransactions = atomic; } - /** {@inheritDoc} */ @Override @Nullable public String getGitwebDescription() { return gitwebDescription; } - /** {@inheritDoc} */ @Override public void setGitwebDescription(@Nullable String d) { gitwebDescription = d; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java index cd4f168d8..89a3afbd9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/LargePackedWholeObject.java @@ -44,31 +44,26 @@ final class LargePackedWholeObject extends ObjectLoader { this.db = db; } - /** {@inheritDoc} */ @Override public int getType() { return type; } - /** {@inheritDoc} */ @Override public long getSize() { return size; } - /** {@inheritDoc} */ @Override public boolean isLarge() { return true; } - /** {@inheritDoc} */ @Override public byte[] getCachedBytes() throws LargeObjectException { throw new LargeObjectException(); } - /** {@inheritDoc} */ @Override public ObjectStream openStream() throws MissingObjectException, IOException { PackInputStream packIn; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackInputStream.java index 6ff81646c..3d07660a6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/PackInputStream.java @@ -31,7 +31,6 @@ final class PackInputStream extends InputStream { ctx.pin(pack, pos); } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { int n = ctx.copy(pack, pos, b, off, len); @@ -39,7 +38,6 @@ public int read(byte[] b, int off, int len) throws IOException { return n; } - /** {@inheritDoc} */ @Override public int read() throws IOException { byte[] buf = new byte[1]; @@ -47,7 +45,6 @@ public int read() throws IOException { return n == 1 ? buf[0] & 0xff : -1; } - /** {@inheritDoc} */ @Override public void close() { ctx.close(); 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 ec53818b4..53e36956c 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 @@ -25,7 +25,6 @@ abstract class BasePackBitmapIndex extends PackBitmapIndex { this.bitmaps = bitmaps; } - /** {@inheritDoc} */ @Override public EWAHCompressedBitmap getBitmap(AnyObjectId objectId) { StoredBitmap sb = bitmaps.get(objectId); 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 9aa14171c..55c05ef78 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 @@ -54,7 +54,6 @@ PackBitmapIndex getPackBitmapIndex() { return packIndex; } - /** {@inheritDoc} */ @Override public CompressedBitmap getBitmap(AnyObjectId objectId) { EWAHCompressedBitmap compressed = packIndex.getBitmap(objectId); @@ -63,7 +62,6 @@ public CompressedBitmap getBitmap(AnyObjectId objectId) { return new CompressedBitmap(compressed, this); } - /** {@inheritDoc} */ @Override public CompressedBitmapBuilder newBitmapBuilder() { return new CompressedBitmapBuilder(this); @@ -291,7 +289,9 @@ public static final class CompressedBitmap implements Bitmap { * Construct compressed bitmap for given bitmap and bitmap index * * @param bitmap + * the bitmap * @param bitmapIndex + * the bitmap index */ public CompressedBitmap(EWAHCompressedBitmap bitmap, BitmapIndexImpl bitmapIndex) { this.bitmap = bitmap; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java index 103653542..ef1392e6e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteArrayWindow.java @@ -30,7 +30,6 @@ final class ByteArrayWindow extends ByteWindow { array = b; } - /** {@inheritDoc} */ @Override protected int copy(int p, byte[] b, int o, int n) { n = Math.min(array.length - p, n); @@ -38,7 +37,6 @@ protected int copy(int p, byte[] b, int o, int n) { return n; } - /** {@inheritDoc} */ @Override protected int setInput(int pos, Inflater inf) throws DataFormatException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java index b6877578c..4094f130f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ByteBufferWindow.java @@ -32,7 +32,6 @@ final class ByteBufferWindow extends ByteWindow { buffer = b; } - /** {@inheritDoc} */ @Override protected int copy(int p, byte[] b, int o, int n) { final ByteBuffer s = buffer.slice(); @@ -57,7 +56,6 @@ void write(PackOutputStream out, long pos, int cnt) } } - /** {@inheritDoc} */ @Override protected int setInput(int pos, Inflater inf) throws DataFormatException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java index 2e19580f5..129d2e089 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/CachedObjectDirectory.java @@ -86,13 +86,11 @@ private ObjectIdOwnerMap scanLoose() { return m; } - /** {@inheritDoc} */ @Override public void close() { // Don't close anything. } - /** {@inheritDoc} */ @Override public ObjectDatabase newCachedDatabase() { return this; @@ -153,7 +151,6 @@ void resolve(Set matches, AbbreviatedObjectId id) wrapped.resolve(matches, id); } - /** {@inheritDoc} */ @Override public boolean has(AnyObjectId objectId) throws IOException { return has(objectId, null); @@ -261,7 +258,6 @@ Collection getPacks() { return wrapped.getPacks(); } - /** {@inheritDoc} */ @Override public Optional getCommitGraph() { return wrapped.getCommitGraph(); 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 2b8779f6d..d641da59e 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 @@ -32,13 +32,11 @@ public class CheckoutEntryImpl implements CheckoutEntry { to = comment.substring(p2 + " to ".length(), p3); //$NON-NLS-1$ } - /** {@inheritDoc} */ @Override public String getFromBranch() { return from; } - /** {@inheritDoc} */ @Override public String getToBranch() { return to; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileObjectDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileObjectDatabase.java index aa578d31b..e8f532fe2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileObjectDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileObjectDatabase.java @@ -33,13 +33,11 @@ enum InsertLooseObjectResult { INSERTED, EXISTS_PACKED, EXISTS_LOOSE, FAILURE; } - /** {@inheritDoc} */ @Override public ObjectReader newReader() { return new WindowCursor(this); } - /** {@inheritDoc} */ @Override public ObjectDirectoryInserter newInserter() { return new ObjectDirectoryInserter(this, getConfig()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java index e9e17c0ec..3abd71aee 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableDatabase.java @@ -93,13 +93,13 @@ ReflogReader getReflogReader(String refname) throws IOException { /** * @param repoDir + * the repository's metadata directory * @return whether the given repo uses reftable for refdb storage. */ public static boolean isReftable(File repoDir) { return new File(repoDir, Constants.REFTABLE).isDirectory(); } - /** {@inheritDoc} */ @Override public boolean hasFastTipsWithSha1() throws IOException { return reftableDatabase.hasFastTipsWithSha1(); @@ -124,20 +124,17 @@ private ReentrantLock getLock() { return reftableDatabase.getLock(); } - /** {@inheritDoc} */ @Override public boolean performsAtomicTransactions() { return true; } - /** {@inheritDoc} */ @NonNull @Override public BatchRefUpdate newBatchUpdate() { return new FileReftableBatchRefUpdate(this, fileRepository); } - /** {@inheritDoc} */ @Override public RefUpdate newUpdate(String refName, boolean detach) throws IOException { @@ -157,19 +154,16 @@ public RefUpdate newUpdate(String refName, boolean detach) return update; } - /** {@inheritDoc} */ @Override public Ref exactRef(String name) throws IOException { return reftableDatabase.exactRef(name); } - /** {@inheritDoc} */ @Override public List getRefs() throws IOException { return super.getRefs(); } - /** {@inheritDoc} */ @Override public Map getRefs(String prefix) throws IOException { List refs = reftableDatabase.getRefsByPrefix(prefix); @@ -181,20 +175,17 @@ public Map getRefs(String prefix) throws IOException { RefList.emptyList()); } - /** {@inheritDoc} */ @Override public List getRefsByPrefixWithExclusions(String include, Set excludes) throws IOException { return reftableDatabase.getRefsByPrefixWithExclusions(include, excludes); } - /** {@inheritDoc} */ @Override public List getAdditionalRefs() throws IOException { return Collections.emptyList(); } - /** {@inheritDoc} */ @Override public Ref peel(Ref ref) throws IOException { Ref oldLeaf = ref.getLeaf(); @@ -303,7 +294,6 @@ protected RefUpdate.Result doRename() throws IOException { } } - /** {@inheritDoc} */ @Override public RefRename newRename(String fromName, String toName) throws IOException { @@ -312,20 +302,17 @@ public RefRename newRename(String fromName, String toName) return new FileRefRename(src, dst); } - /** {@inheritDoc} */ @Override public boolean isNameConflicting(String name) throws IOException { return reftableDatabase.isNameConflicting(name, new TreeSet<>(), new HashSet<>()); } - /** {@inheritDoc} */ @Override public void close() { reftableStack.close(); } - /** {@inheritDoc} */ @Override public void create() throws IOException { FileUtils.mkdir( diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java index 5152367d2..c74a29842 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java @@ -264,6 +264,7 @@ public interface Writer { * @param w * writer to use * @throws IOException + * if an IO error occurred */ void call(ReftableWriter w) throws IOException; } @@ -559,6 +560,7 @@ boolean compactRange(int first, int last) throws IOException { * Calculate an approximate log2. * * @param sz + * the number to compute an approximate log2 for * @return log2 */ static int log(long sz) { @@ -688,6 +690,7 @@ private static Optional autoCompactCandidate(long[] sizes) { * shape. * * @throws IOException + * if an IO error occurred */ private void autoCompact() throws IOException { Optional cand = autoCompactCandidate(tableSizes()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java index 3e92cddac..e5a00d392 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileRepository.java @@ -321,19 +321,16 @@ public File getObjectsDirectory() { return objectDatabase.getDirectory(); } - /** {@inheritDoc} */ @Override public ObjectDirectory getObjectDatabase() { return objectDatabase; } - /** {@inheritDoc} */ @Override public RefDatabase getRefDatabase() { return refs; } - /** {@inheritDoc} */ @Override public String getIdentifier() { File directory = getDirectory(); @@ -343,7 +340,6 @@ public String getIdentifier() { throw new IllegalStateException(); } - /** {@inheritDoc} */ @Override public FileBasedConfig getConfig() { try { @@ -357,7 +353,6 @@ public FileBasedConfig getConfig() { return repoConfig; } - /** {@inheritDoc} */ @Override @Nullable public String getGitwebDescription() throws IOException { @@ -376,7 +371,6 @@ public String getGitwebDescription() throws IOException { return d; } - /** {@inheritDoc} */ @Override public void setGitwebDescription(@Nullable String description) throws IOException { @@ -423,6 +417,7 @@ private File descriptionFile() { * client trying to push changes avoid pushing more than it needs to. * * @throws IOException + * if an IO error occurred */ @Override public Set getAdditionalHaves() throws IOException { @@ -478,7 +473,6 @@ public void openPack(File pack) throws IOException { objectDatabase.openPack(pack); } - /** {@inheritDoc} */ @Override public void scanForRepoChanges() throws IOException { getRefDatabase().getRefs(); // This will look for changes to refs @@ -504,7 +498,6 @@ private void detectIndexChanges() { notifyIndexChanged(false); } - /** {@inheritDoc} */ @Override public void notifyIndexChanged(boolean internal) { synchronized (snapshotLock) { @@ -513,7 +506,6 @@ public void notifyIndexChanged(boolean internal) { fireEvent(new IndexChangedEvent(internal)); } - /** {@inheritDoc} */ @Override public ReflogReader getReflogReader(String refName) throws IOException { if (refs instanceof FileReftableDatabase) { @@ -537,7 +529,6 @@ public ReflogReader getReflogReader(String refName) throws IOException { return new ReflogReaderImpl(this, ref.getName()); } - /** {@inheritDoc} */ @Override public AttributesNodeProvider createAttributesNodeProvider() { return new AttributesNodeProviderImpl(this); @@ -600,7 +591,6 @@ private boolean shouldAutoDetach() { ConfigConstants.CONFIG_KEY_AUTODETACH, true); } - /** {@inheritDoc} */ @SuppressWarnings("FutureReturnValueIgnored") @Override public void autoGC(ProgressMonitor monitor) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java index 6088c152a..9a8575206 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java @@ -404,7 +404,6 @@ public boolean equals(FileSnapshot other) { && Objects.equals(fileKey, other.fileKey); } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { @@ -420,7 +419,6 @@ public boolean equals(Object obj) { return equals(other); } - /** {@inheritDoc} */ @Override public int hashCode() { return Objects.hash(lastModified, Long.valueOf(size), fileKey); @@ -474,7 +472,6 @@ public long lastRacyThreshold() { return racyThreshold; } - /** {@inheritDoc} */ @SuppressWarnings({ "nls", "ReferenceEquality" }) @Override public String toString() { 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 10b53b666..46f265f50 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 @@ -222,9 +222,10 @@ public GC(FileRepository repo) { * gc.log. * * @return the collection of - * {@link org.eclipse.jgit.internal.storage.file.Pack}'s which - * are newly created + * {@link org.eclipse.jgit.internal.storage.file.Pack}'s which are + * newly created * @throws java.io.IOException + * if an IO error occurred * @throws java.text.ParseException * If the configuration parameter "gc.pruneexpire" couldn't be * parsed @@ -298,10 +299,15 @@ private Collection doGc() throws IOException, ParseException { * pack files. * * @param inserter + * used to insert objects * @param reader + * used to read objects * @param pack + * the pack file to loosen objects for * @param existing + * existing objects * @throws IOException + * if an IO error occurred */ private void loosen(ObjectDirectoryInserter inserter, ObjectReader reader, Pack pack, HashSet existing) throws IOException { @@ -327,13 +333,17 @@ private void loosen(ObjectDirectoryInserter inserter, ObjectReader reader, Pack * directory. If an expirationDate is set then pack files which are younger * than the expirationDate will not be deleted nor preserved. *

    - * If we're not immediately expiring loose objects, loosen any objects - * in the old pack files which aren't in the new pack files. + * If we're not immediately expiring loose objects, loosen any objects in + * the old pack files which aren't in the new pack files. * * @param oldPacks + * old pack files * @param newPacks + * new pack files * @throws ParseException + * if an error occurred during parsing * @throws IOException + * if an IO error occurred */ private void deleteOldPacks(Collection oldPacks, Collection newPacks) throws ParseException, IOException { @@ -378,12 +388,15 @@ private void deleteOldPacks(Collection oldPacks, } /** - * Deletes old pack file, unless 'preserve-oldpacks' is set, in which case it - * moves the pack file to the preserved directory + * Deletes old pack file, unless 'preserve-oldpacks' is set, in which case + * it moves the pack file to the preserved directory * * @param packFile + * the packfile to delete * @param deleteOptions + * delete option flags * @throws IOException + * if an IO error occurred */ private void removeOldPack(PackFile packFile, int deleteOptions) throws IOException { @@ -422,6 +435,7 @@ private void prunePreserved() { * with a ".pack" file without a ".index" file. * * @param packFile + * the pack file to prune files for */ private void prunePack(PackFile packFile) { try { @@ -449,6 +463,7 @@ private void prunePack(PackFile packFile) { * because the filesystem delete operation fails) this is silently ignored. * * @throws java.io.IOException + * if an IO error occurred */ public void prunePacked() throws IOException { ObjectDirectory objdb = repo.getObjectDatabase(); @@ -507,6 +522,7 @@ public void prunePacked() throws IOException { * @param objectsToKeep * a set of objects which should explicitly not be pruned * @throws java.io.IOException + * if an IO error occurred * @throws java.text.ParseException * If the configuration parameter "gc.pruneexpire" couldn't be * parsed @@ -714,10 +730,15 @@ private long getPackExpireDate() throws ParseException { * by the given ObjectWalk * * @param id2File + * mapping objectIds to files * @param w + * used to walk objects * @throws MissingObjectException + * if an object is missing * @throws IncorrectObjectTypeException + * if an object has an unexpected tyoe * @throws IOException + * if an IO error occurred */ private void removeReferenced(Map id2File, ObjectWalk w) throws MissingObjectException, @@ -758,6 +779,7 @@ private static boolean equals(Ref r1, Ref r2) { * is compacted into a single table. * * @throws java.io.IOException + * if an IO error occurred */ public void packRefs() throws IOException { RefDatabase refDb = repo.getRefDatabase(); @@ -927,6 +949,7 @@ private Set refsToObjectIds(Collection refs) * the list of wanted objects, writer walks commits starting at * these. Must not be {@code null}. * @throws IOException + * if an IO error occurred */ void writeCommitGraph(@NonNull Set wants) throws IOException { @@ -1143,9 +1166,11 @@ private void deleteTempPacksIdx() { /** * @param ref * the ref which log should be inspected - * @param minTime only reflog entries not older then this time are processed + * @param minTime + * only reflog entries not older then this time are processed * @return the {@link ObjectId}s contained in the reflog * @throws IOException + * if an IO error occurred */ private Set listRefLogObjects(Ref ref, long minTime) throws IOException { ReflogReader reflogReader = repo.getReflogReader(ref); @@ -1177,6 +1202,7 @@ private Set listRefLogObjects(Ref ref, long minTime) throws IOExceptio * * @return a collection of refs pointing to live objects. * @throws IOException + * if an IO error occurred */ private Collection getAllRefs() throws IOException { RefDatabase refdb = repo.getRefDatabase(); @@ -1203,8 +1229,11 @@ private Collection getAllRefs() throws IOException { * * @return a set of ObjectIds of changed objects in the index * @throws IOException + * if an IO error occurred * @throws CorruptObjectException + * if an object is corrupt * @throws NoWorkTreeException + * if the repository has no working directory */ private Set listNonHEADIndexObjects() throws CorruptObjectException, IOException { @@ -1501,6 +1530,7 @@ public String toString() { * * @return information about objects and pack files for a FileRepository * @throws java.io.IOException + * if an IO error occurred */ public RepoStatistics getStatistics() throws IOException { RepoStatistics ret = new RepoStatistics(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java index 86994a9ee..628bf5db0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GcLog.java @@ -132,6 +132,7 @@ boolean commit() { * @param content * The content to write * @throws IOException + * if an IO error occurred */ void write(String content) throws IOException { if (content.length() > 0) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GlobalAttributesNode.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GlobalAttributesNode.java index 254557c08..bbb7476d6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GlobalAttributesNode.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/GlobalAttributesNode.java @@ -39,6 +39,7 @@ public GlobalAttributesNode(Repository repository) { * * @return the attributes node * @throws java.io.IOException + * if an IO error occurred */ public AttributesNode load() throws IOException { AttributesNode r = new AttributesNode(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/InfoAttributesNode.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/InfoAttributesNode.java index a22cd3ffe..11d842b24 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/InfoAttributesNode.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/InfoAttributesNode.java @@ -39,6 +39,7 @@ public InfoAttributesNode(Repository repository) { * * @return the attributes node * @throws java.io.IOException + * if an IO error occurred */ public AttributesNode load() throws IOException { AttributesNode r = new AttributesNode(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java index e2fbd7a0b..15223ad43 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LargePackedWholeObject.java @@ -44,25 +44,21 @@ class LargePackedWholeObject extends ObjectLoader { this.db = db; } - /** {@inheritDoc} */ @Override public int getType() { return type; } - /** {@inheritDoc} */ @Override public long getSize() { return size; } - /** {@inheritDoc} */ @Override public boolean isLarge() { return true; } - /** {@inheritDoc} */ @Override public byte[] getCachedBytes() throws LargeObjectException { try { @@ -72,7 +68,6 @@ public byte[] getCachedBytes() throws LargeObjectException { } } - /** {@inheritDoc} */ @Override public ObjectStream openStream() throws MissingObjectException, IOException { WindowCursor wc = new WindowCursor(db); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LazyObjectIdSetFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LazyObjectIdSetFile.java index 2d73f9bd1..d0d320bf0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LazyObjectIdSetFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LazyObjectIdSetFile.java @@ -41,7 +41,6 @@ public LazyObjectIdSetFile(File src) { this.src = src; } - /** {@inheritDoc} */ @Override public boolean contains(AnyObjectId objectId) { if (set == null) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalCachedPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalCachedPack.java index f112947ba..22eef9468 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalCachedPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalCachedPack.java @@ -39,7 +39,6 @@ class LocalCachedPack extends CachedPack { this.packs = packs.toArray(new Pack[0]); } - /** {@inheritDoc} */ @Override public long getObjectCount() throws IOException { long cnt = 0; @@ -54,7 +53,6 @@ void copyAsIs(PackOutputStream out, WindowCursor wc) pack.copyPackAsIs(out, wc); } - /** {@inheritDoc} */ @Override public boolean hasObject(ObjectToPack obj, StoredObjectRepresentation rep) { try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectRepresentation.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectRepresentation.java index 559718af3..3f3d78c73 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectRepresentation.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectRepresentation.java @@ -59,13 +59,11 @@ static LocalObjectRepresentation newDelta(Pack pack, long offset, long length, private ObjectId baseId; - /** {@inheritDoc} */ @Override public int getWeight() { return (int) Math.min(length, Integer.MAX_VALUE); } - /** {@inheritDoc} */ @Override public ObjectId getDeltaBase() { if (baseId == null && getFormat() == PACK_DELTA) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java index ac6cd212d..ca25212e0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LocalObjectToPack.java @@ -29,14 +29,12 @@ class LocalObjectToPack extends ObjectToPack { super(src, type); } - /** {@inheritDoc} */ @Override protected void clearReuseAsIs() { super.clearReuseAsIs(); pack = null; } - /** {@inheritDoc} */ @Override public void select(StoredObjectRepresentation ref) { LocalObjectRepresentation ptr = (LocalObjectRepresentation) ref; 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 d06b5a72d..8ada0a90e 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 @@ -79,6 +79,7 @@ public static boolean unlock(File file) { * Get the lock file corresponding to the given file. * * @param file + * given file * @return lock file */ static File getLockFile(File file) { @@ -575,7 +576,6 @@ public void unlock() { written = false; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java index 326c5f645..278c846ba 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/LooseObjects.java @@ -90,7 +90,6 @@ void close() { unpackedObjectCache().clear(); } - /** {@inheritDoc} */ @Override public String toString() { return "LooseObjects[" + directory + "]"; //$NON-NLS-1$ //$NON-NLS-2$ 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 f27daad89..0ef38db31 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 @@ -145,7 +145,6 @@ public ObjectDirectory(final Config cfg, final File dir, } } - /** {@inheritDoc} */ @Override public final File getDirectory() { return loose.getDirectory(); @@ -169,13 +168,11 @@ public final File getPreservedDirectory() { return preserved.getDirectory(); } - /** {@inheritDoc} */ @Override public boolean exists() { return fs.exists(objects); } - /** {@inheritDoc} */ @Override public void create() throws IOException { loose.create(); @@ -183,7 +180,6 @@ public void create() throws IOException { packed.create(); } - /** {@inheritDoc} */ @Override public ObjectDirectoryInserter newInserter() { return new ObjectDirectoryInserter(this, config); @@ -199,7 +195,6 @@ public PackInserter newPackInserter() { return new PackInserter(this); } - /** {@inheritDoc} */ @Override public void close() { loose.close(); @@ -214,13 +209,11 @@ public void close() { } } - /** {@inheritDoc} */ @Override public Collection getPacks() { return packed.getPacks(); } - /** {@inheritDoc} */ @Override public long getApproximateObjectCount() { long count = 0; @@ -234,7 +227,6 @@ public long getApproximateObjectCount() { return count; } - /** {@inheritDoc} */ @Override public Optional getCommitGraph() { if (config.get(CoreConfig.KEY).enableCommitGraph()) { @@ -244,7 +236,6 @@ public Optional getCommitGraph() { } /** - * {@inheritDoc} *

    * Add a single existing pack to the list of available pack files. */ @@ -273,13 +264,11 @@ public Pack openPack(File pack) throws IOException { return res; } - /** {@inheritDoc} */ @Override public String toString() { return "ObjectDirectory[" + getDirectory() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ } - /** {@inheritDoc} */ @Override public boolean has(AnyObjectId objectId) { return loose.hasCached(objectId) @@ -811,7 +800,6 @@ void close() { } } - /** {@inheritDoc} */ @Override public ObjectDatabase newCachedDatabase() { return newCachedFileObjectDatabase(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java index e6b2cc12f..2f30a9797 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryInserter.java @@ -49,7 +49,6 @@ class ObjectDirectoryInserter extends ObjectInserter { config = cfg.get(WriteConfig.KEY); } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, byte[] data, int off, int len) throws IOException { @@ -62,12 +61,19 @@ public ObjectId insert(int type, byte[] data, int off, int len) * ODB. * * @param type + * object type * @param data + * object data * @param off + * first position within @{code data} * @param len + * length number of bytes to copy * @param createDuplicate - * @return ObjectId + * whether to insert a duplicate if an object with this id + * already exists + * @return ObjectId the name of the object * @throws IOException + * if an IO error occurred */ private ObjectId insert( int type, byte[] data, int off, int len, boolean createDuplicate) @@ -80,7 +86,6 @@ private ObjectId insert( return insertOneObject(tmp, id, createDuplicate); } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, long len, InputStream is) throws IOException { @@ -93,11 +98,17 @@ public ObjectId insert(int type, long len, InputStream is) * ODB. * * @param type + * object type * @param len + * number of bytes to copy * @param is + * input stream * @param createDuplicate - * @return ObjectId + * whether to insert a duplicate if an object with this id + * already exists + * @return ObjectId the name of the object * @throws IOException + * if an IO error occurred */ ObjectId insert(int type, long len, InputStream is, boolean createDuplicate) throws IOException { @@ -132,25 +143,21 @@ private ObjectId insertOneObject( .format(JGitText.get().unableToCreateNewObject, dst)); } - /** {@inheritDoc} */ @Override public PackParser newPackParser(InputStream in) throws IOException { return new ObjectDirectoryPackParser(db, in); } - /** {@inheritDoc} */ @Override public ObjectReader newReader() { return new WindowCursor(db, this); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { // Do nothing. Loose objects are immediately visible. } - /** {@inheritDoc} */ @Override public void close() { if (deflate != null) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java index 55b2646c4..9f27f4bd6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectoryPackParser.java @@ -142,7 +142,6 @@ public Pack getPack() { return newPack; } - /** {@inheritDoc} */ @Override public long getPackSize() { if (newPack == null) @@ -158,7 +157,6 @@ public long getPackSize() { return size; } - /** {@inheritDoc} */ @Override public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving) throws IOException { @@ -193,40 +191,34 @@ public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving) } } - /** {@inheritDoc} */ @Override protected void onPackHeader(long objectCount) throws IOException { // Ignored, the count is not required. } - /** {@inheritDoc} */ @Override protected void onBeginWholeObject(long streamPosition, int type, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected void onEndWholeObject(PackedObjectInfo info) throws IOException { info.setCRC((int) crc.getValue()); } - /** {@inheritDoc} */ @Override protected void onBeginOfsDelta(long streamPosition, long baseStreamPosition, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected void onBeginRefDelta(long streamPosition, AnyObjectId baseId, long inflatedSize) throws IOException { crc.reset(); } - /** {@inheritDoc} */ @Override protected UnresolvedDelta onEndDelta() throws IOException { UnresolvedDelta delta = new UnresolvedDelta(); @@ -234,35 +226,30 @@ protected UnresolvedDelta onEndDelta() throws IOException { return delta; } - /** {@inheritDoc} */ @Override protected void onInflatedObjectData(PackedObjectInfo obj, int typeCode, byte[] data) throws IOException { // ObjectDirectory ignores this event. } - /** {@inheritDoc} */ @Override protected void onObjectHeader(Source src, byte[] raw, int pos, int len) throws IOException { crc.update(raw, pos, len); } - /** {@inheritDoc} */ @Override protected void onObjectData(Source src, byte[] raw, int pos, int len) throws IOException { crc.update(raw, pos, len); } - /** {@inheritDoc} */ @Override protected void onStoreStream(byte[] raw, int pos, int len) throws IOException { out.write(raw, pos, len); } - /** {@inheritDoc} */ @Override protected void onPackFooter(byte[] hash) throws IOException { packEnd = out.getFilePointer(); @@ -271,7 +258,6 @@ protected void onPackFooter(byte[] hash) throws IOException { packHash = hash; } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, ObjectTypeAndSize info) throws IOException { @@ -280,7 +266,6 @@ protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj, ObjectTypeAndSize info) throws IOException { @@ -289,13 +274,11 @@ protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj, return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected int readDatabase(byte[] dst, int pos, int cnt) throws IOException { return out.read(dst, pos, cnt); } - /** {@inheritDoc} */ @Override protected boolean checkCRC(int oldCRC) { return oldCRC == (int) crc.getValue(); @@ -313,7 +296,6 @@ private void cleanupTemporaryFiles() { tmpPack.deleteOnExit(); } - /** {@inheritDoc} */ @Override protected boolean onAppendBase(final int typeCode, final byte[] data, final PackedObjectInfo info) throws IOException { @@ -356,7 +338,6 @@ protected boolean onAppendBase(final int typeCode, final byte[] data, return true; } - /** {@inheritDoc} */ @Override protected void onEndThinPack() throws IOException { final byte[] buf = buffer(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java index 5d401f451..90eb35729 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/Pack.java @@ -211,6 +211,7 @@ public PackFile getPackFile() { * * @return the index for this pack file. * @throws java.io.IOException + * if an IO error occurred */ public PackIndex getIndex() throws IOException { return idx(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java index 8fb17fcf2..0c3e724ed 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndex.java @@ -205,6 +205,7 @@ public interface SupplierWithIOException { /** * @return result * @throws IOException + * if an IO error occurred */ T get() throws IOException; } 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 5666b5760..755bfc49c 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 @@ -214,7 +214,6 @@ public void addBitmap( getBitmaps().add(result); } - /** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { @@ -231,7 +230,6 @@ public EWAHCompressedBitmap ofObjectType( throw new IllegalArgumentException(); } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objectId) { PositionEntry entry = positionEntries.get(objectId); @@ -240,7 +238,6 @@ public int findPosition(AnyObjectId objectId) { return entry.offsetPosition; } - /** {@inheritDoc} */ @Override public ObjectId getObject(int position) throws IllegalArgumentException { ObjectId objectId = byOffset.get(position); @@ -294,7 +291,6 @@ public int getOptions() { return PackBitmapIndexV1.OPT_FULL; } - /** {@inheritDoc} */ @Override public int getBitmapCount() { return bitmapsToWriteXorBuffer.size() + bitmapsToWrite.size(); @@ -311,7 +307,6 @@ public void resetBitmaps(int size) { bitmapsToWrite = new ArrayList<>(size); } - /** {@inheritDoc} */ @Override public int getObjectCount() { return byOffset.size(); 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 e1b6f780c..c97d9f07e 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 @@ -79,32 +79,27 @@ private PackBitmapIndexRemapper( oldPackIndex.getObject(pos)); } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objectId) { return newPackIndex.findPosition(objectId); } - /** {@inheritDoc} */ @Override public ObjectId getObject(int position) throws IllegalArgumentException { return newPackIndex.getObject(position); } - /** {@inheritDoc} */ @Override public int getObjectCount() { return newPackIndex.getObjectCount(); } - /** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { return newPackIndex.ofObjectType(bitmap, type); } - /** {@inheritDoc} */ @Override public Iterator iterator() { if (oldPackIndex == null) @@ -141,7 +136,6 @@ public void remove() { }; } - /** {@inheritDoc} */ @Override public EWAHCompressedBitmap getBitmap(AnyObjectId objectId) { EWAHCompressedBitmap bitmap = newPackIndex.getBitmap(objectId); @@ -179,7 +173,6 @@ public int getFlags() { } } - /** {@inheritDoc} */ @Override public int getBitmapCount() { // The count is only useful for the end index, not the remapper. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java index 988dc6c4f..70d72330a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackBitmapIndexV1.java @@ -214,7 +214,6 @@ public Thread newThread(Runnable runnable) { this.reverseIndex = computedReverseIndex; } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objectId) { long offset = packIndex.findOffset(objectId); @@ -223,7 +222,6 @@ public int findPosition(AnyObjectId objectId) { return reverseIndex.findPosition(offset); } - /** {@inheritDoc} */ @Override public ObjectId getObject(int position) throws IllegalArgumentException { ObjectId objectId = reverseIndex.findObjectByPosition(position); @@ -232,13 +230,11 @@ public ObjectId getObject(int position) throws IllegalArgumentException { return objectId; } - /** {@inheritDoc} */ @Override public int getObjectCount() { return (int) packIndex.getObjectCount(); } - /** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { @@ -255,13 +251,11 @@ public EWAHCompressedBitmap ofObjectType( throw new IllegalArgumentException(); } - /** {@inheritDoc} */ @Override public int getBitmapCount() { return bitmaps.size(); } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { // TODO(cranger): compare the pack checksum? @@ -270,7 +264,6 @@ public boolean equals(Object o) { return false; } - /** {@inheritDoc} */ @Override public int hashCode() { return getPackIndex().hashCode(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java index 6a99cb3d8..85b2d34a9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackDirectory.java @@ -123,7 +123,6 @@ Collection getPacks() { return Collections.unmodifiableCollection(Arrays.asList(packs)); } - /** {@inheritDoc} */ @Override public String toString() { return "PackDirectory[" + getDirectory() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ @@ -350,7 +349,7 @@ private void handlePackError(IOException e, Pack p) { /** * @param n * count of consecutive failures - * @return @{code true} if i is a power of 2 + * @return {@code true} if i is a power of 2 */ private boolean doLogExponentialBackoff(int n) { return (n & (n - 1)) == 0; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java index a784af8c3..dbf7d8ae5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFileSnapshot.java @@ -48,7 +48,6 @@ void setChecksum(AnyObjectId checksum) { this.checksum = checksum; } - /** {@inheritDoc} */ @Override public boolean isModified(File packFile) { if (!super.isModified(packFile)) { 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 f4f62d420..7778cb513 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 @@ -128,7 +128,6 @@ public boolean hasObject(AnyObjectId id) { return findOffset(id) != -1; } - /** {@inheritDoc} */ @Override public boolean contains(AnyObjectId id) { return findOffset(id) != -1; 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 fff410b4c..860ebaefc 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 @@ -72,13 +72,11 @@ class PackIndexV1 extends PackIndex { IO.readFully(fd, packChecksum, 0, packChecksum.length); } - /** {@inheritDoc} */ @Override public long getObjectCount() { return objectCnt; } - /** {@inheritDoc} */ @Override public long getOffset64Count() { long n64 = 0; @@ -111,7 +109,6 @@ private int getLevelTwo(long nthPosition, int levelOne) { return (int) (nthPosition - base); } - /** {@inheritDoc} */ @Override public ObjectId getObjectId(long nthPosition) { final int levelOne = findLevelOne(nthPosition); @@ -128,7 +125,6 @@ long getOffset(long nthPosition) { return NB.decodeUInt32(idxdata[levelOne], p); } - /** {@inheritDoc} */ @Override public long findOffset(AnyObjectId objId) { final int levelOne = objId.getFirstByte(); @@ -145,7 +141,6 @@ public long findOffset(AnyObjectId objId) { return (((long) b0) << 24) | (b1 << 16) | (b2 << 8) | (b3); } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objId) { int levelOne = objId.getFirstByte(); @@ -193,25 +188,21 @@ else if (cmp == 0) { return -1; } - /** {@inheritDoc} */ @Override public long findCRC32(AnyObjectId objId) { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public boolean hasCRC32Support() { return false; } - /** {@inheritDoc} */ @Override public Iterator iterator() { return new IndexV1Iterator(); } - /** {@inheritDoc} */ @Override public void resolve(Set matches, AbbreviatedObjectId id, int matchLimit) throws IOException { 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 7a390060c..751b62dc4 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 @@ -131,13 +131,11 @@ class PackIndexV2 extends PackIndex { IO.readFully(fd, packChecksum, 0, packChecksum.length); } - /** {@inheritDoc} */ @Override public long getObjectCount() { return objectCnt; } - /** {@inheritDoc} */ @Override public long getOffset64Count() { return offset64.length / 8; @@ -165,7 +163,6 @@ private int getLevelTwo(long nthPosition, int levelOne) { return (int) (nthPosition - base); } - /** {@inheritDoc} */ @Override public ObjectId getObjectId(long nthPosition) { final int levelOne = findLevelOne(nthPosition); @@ -174,7 +171,6 @@ public ObjectId getObjectId(long nthPosition) { return ObjectId.fromRaw(names[levelOne], p4 + p); // p * 5 } - /** {@inheritDoc} */ @Override public long getOffset(long nthPosition) { final int levelOne = findLevelOne(nthPosition); @@ -182,7 +178,6 @@ public long getOffset(long nthPosition) { return getOffset(levelOne, levelTwo); } - /** {@inheritDoc} */ @Override public long findOffset(AnyObjectId objId) { final int levelOne = objId.getFirstByte(); @@ -192,7 +187,6 @@ public long findOffset(AnyObjectId objId) { return getOffset(levelOne, levelTwo); } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objId) { int levelOne = objId.getFirstByte(); @@ -211,7 +205,6 @@ private long getOffset(int levelOne, int levelTwo) { return p; } - /** {@inheritDoc} */ @Override public long findCRC32(AnyObjectId objId) throws MissingObjectException { final int levelOne = objId.getFirstByte(); @@ -221,19 +214,16 @@ public long findCRC32(AnyObjectId objId) throws MissingObjectException { return NB.decodeUInt32(crc32[levelOne], levelTwo << 2); } - /** {@inheritDoc} */ @Override public boolean hasCRC32Support() { return true; } - /** {@inheritDoc} */ @Override public Iterator iterator() { return new EntriesIteratorV2(); } - /** {@inheritDoc} */ @Override public void resolve(Set matches, AbbreviatedObjectId id, int matchLimit) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java index e1612bb57..7e28b5eb2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV1.java @@ -35,7 +35,6 @@ static boolean canStore(PackedObjectInfo oe) { super(dst); } - /** {@inheritDoc} */ @Override protected void writeImpl() throws IOException { writeFanOutTable(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java index 7adabad70..fc5ef6191 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackIndexWriterV2.java @@ -30,7 +30,6 @@ class PackIndexWriterV2 extends PackIndexWriter { super(dst); } - /** {@inheritDoc} */ @Override protected void writeImpl() throws IOException { writeTOC(2); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java index 0bceca72e..fdc2f8007 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInputStream.java @@ -31,7 +31,6 @@ class PackInputStream extends InputStream { wc.pin(pack, pos); } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { int n = wc.copy(pack, pos, b, off, len); @@ -39,7 +38,6 @@ public int read(byte[] b, int off, int len) throws IOException { return n; } - /** {@inheritDoc} */ @Override public int read() throws IOException { byte[] buf = new byte[1]; @@ -47,7 +45,6 @@ public int read() throws IOException { return n == 1 ? buf[0] & 0xff : -1; } - /** {@inheritDoc} */ @Override public void close() { wc.close(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInserter.java index d6209c4a7..1b092a333 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackInserter.java @@ -150,7 +150,6 @@ int getBufferSize() { return buffer().length; } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, byte[] data, int off, int len) throws IOException { @@ -169,7 +168,6 @@ public ObjectId insert(int type, byte[] data, int off, int len) return endObject(id, offset); } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, long len, InputStream in) throws IOException { @@ -243,19 +241,16 @@ private static int writePackHeader(byte[] buf, int objectCount) { return 12; } - /** {@inheritDoc} */ @Override public PackParser newPackParser(InputStream in) { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public ObjectReader newReader() { return new Reader(); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { if (tmpPack == null) { @@ -340,7 +335,6 @@ private ObjectId computeName(List list) { return ObjectId.fromRaw(md.digest()); } - /** {@inheritDoc} */ @Override public void close() { try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexWriter.java index 65a065dd5..328643688 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackObjectSizeIndexWriter.java @@ -72,11 +72,13 @@ public abstract void write(List objs) * * Store position (in the main index) to size as parallel arrays. * - *

    Positions in the main index fit well in unsigned 24 bits (16M) for most + *

    + * Positions in the main index fit well in unsigned 24 bits (16M) for most * repositories, but some outliers have even more objects, so we need to * store also 32 bits positions. * - *

    Sizes are stored as a first array parallel to positions. If a size + *

    + * Sizes are stored as a first array parallel to positions. If a size * doesn't fit in an element of that array, then we encode there a position * on the next-size array. This "overflow" array doesn't have entries for * all positions. @@ -85,30 +87,36 @@ public abstract void write(List objs) * * positions [10, 500, 1000, 1001] * sizes (32bits) [15MB, -1, 6MB, -2] - * ___/ ______/ + * ___/ ______/ * / / * sizes (64 bits) [3GB, 6GB] *

  • * - *

    For sizes we use 32 bits as the first level and 64 for the rare objects + *

    + * For sizes we use 32 bits as the first level and 64 for the rare objects * over 2GB. * - *

    A 24/32/64 bits hierarchy of arrays saves space if we have a lot of small - * objects, but wastes space if we have only big ones. The min size to index is - * controlled by conf and in principle we want to index only rather - * big objects (e.g. > 10MB). We could support more dynamics read/write of sizes + *

    + * A 24/32/64 bits hierarchy of arrays saves space if we have a lot of small + * objects, but wastes space if we have only big ones. The min size to index + * is controlled by conf and in principle we want to index only rather big + * objects (e.g. > 10MB). We could support more dynamics read/write of sizes * (e.g. 24 only if the threshold will include many of those objects) but it - * complicates a lot code and spec. If needed it could go for a v2 of the protocol. - * - *

    Format: + * complicates a lot code and spec. If needed it could go for a v2 of the + * protocol. * + *

    + * Format: + *

      *
    • A header with the magic number (4 bytes) *
    • The index version (1 byte) *
    • The minimum object size (4 bytes) *
    • Total count of objects indexed (C, 4 bytes) + *
    * (if count == 0, stop here) - * + *

    * Blocks of + *

      *
    • Size per entry in bits (1 byte, either 24 (0x18) or 32 (0x20)) *
    • Count of entries (4 bytes) (c, as a signed int) *
    • positions encoded in s bytes each (i.e s*c bytes) @@ -120,6 +128,7 @@ public abstract void write(List objs) *
    • Count of 64 bit sizes (s64) (or 0 if no more indirections) *
    • 64 bit sizes (s64 * 8 bytes) *
    • 0 (end) + *
    */ static class PackObjectSizeWriterV1 extends PackObjectSizeIndexWriter { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java index 106313db6..5584f13db 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackedBatchRefUpdate.java @@ -98,7 +98,6 @@ class PackedBatchRefUpdate extends BatchRefUpdate { this.shouldLockLooseRefs = shouldLockLooseRefs; } - /** {@inheritDoc} */ @Override public void execute(RevWalk walk, ProgressMonitor monitor, List options) throws IOException { 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 f0676d9be..912c89bc8 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 @@ -247,7 +247,6 @@ public SnapshottingRefDirectory createSnapshottingRefDirectory() { return new SnapshottingRefDirectory(this); } - /** {@inheritDoc} */ @Override public void create() throws IOException { FileUtils.mkdir(refsDir); @@ -256,7 +255,6 @@ public void create() throws IOException { newLogWriter(false).create(); } - /** {@inheritDoc} */ @Override public void close() { clearReferences(); @@ -267,14 +265,12 @@ private void clearReferences() { packedRefs.set(NO_PACKED_REFS); } - /** {@inheritDoc} */ @Override public void refresh() { super.refresh(); clearReferences(); } - /** {@inheritDoc} */ @Override public boolean isNameConflicting(String name) throws IOException { // Cannot be nested within an existing reference. @@ -312,7 +308,6 @@ private Ref readAndResolve(String name, RefList packed) throws IOException } } - /** {@inheritDoc} */ @Override public Ref exactRef(String name) throws IOException { try { @@ -322,7 +317,6 @@ public Ref exactRef(String name) throws IOException { } } - /** {@inheritDoc} */ @Override @NonNull public Map exactRef(String... refs) throws IOException { @@ -341,7 +335,6 @@ public Map exactRef(String... refs) throws IOException { } } - /** {@inheritDoc} */ @Override @Nullable public Ref firstExactRef(String... refs) throws IOException { @@ -359,7 +352,6 @@ public Ref firstExactRef(String... refs) throws IOException { } } - /** {@inheritDoc} */ @Override public Map getRefs(String prefix) throws IOException { final RefList oldLoose = looseRefs.get(); @@ -399,7 +391,6 @@ public Map getRefs(String prefix) throws IOException { return new RefMap(prefix, packed, upcast(loose), symbolic.toRefList()); } - /** {@inheritDoc} */ @Override public List getAdditionalRefs() throws IOException { List ret = new LinkedList<>(); @@ -534,7 +525,6 @@ private void scanOne(String name) { } } - /** {@inheritDoc} */ @Override public Ref peel(Ref ref) throws IOException { final Ref leaf = ref.getLeaf(); @@ -585,7 +575,6 @@ void storedSymbolicRef(RefDirectoryUpdate u, FileSnapshot snapshot, fireRefsChanged(); } - /** {@inheritDoc} */ @Override public RefDirectoryUpdate newUpdate(String name, boolean detach) throws IOException { @@ -609,7 +598,6 @@ RefDirectoryUpdate createRefDirectoryUpdate(Ref ref) { return new RefDirectoryUpdate(this, ref); } - /** {@inheritDoc} */ @Override public RefDirectoryRename newRename(String fromName, String toName) throws IOException { @@ -622,7 +610,6 @@ RefDirectoryRename createRefDirectoryRename(RefDirectoryUpdate from, RefDirector return new RefDirectoryRename(from, to); } - /** {@inheritDoc} */ @Override public PackedBatchRefUpdate newBatchUpdate() { return new PackedBatchRefUpdate(this); @@ -643,7 +630,6 @@ public PackedBatchRefUpdate newBatchUpdate(boolean shouldLockLooseRefs) { return new PackedBatchRefUpdate(this, shouldLockLooseRefs); } - /** {@inheritDoc} */ @Override public boolean performsAtomicTransactions() { return true; @@ -724,6 +710,7 @@ void delete(RefDirectoryUpdate update) throws IOException { * @param refs * the refs to be added. Must be fully qualified. * @throws java.io.IOException + * if an IO error occurred */ public void pack(List refs) throws IOException { pack(refs, Collections.emptyMap()); @@ -868,26 +855,29 @@ LockFile lockPackedRefsOrThrow() throws IOException { * has this attributes simply return it. Otherwise create a new peeled * {@link ObjectIdRef} where Storage is set to PACKED. * - * @param f + * @param ref + * given ref * @return a ref for Storage PACKED having the same name, id, peeledId as f * @throws MissingObjectException + * if an object is missing * @throws IOException + * if an IO error occurred */ - private Ref peeledPackedRef(Ref f) + private Ref peeledPackedRef(Ref ref) throws MissingObjectException, IOException { - if (f.getStorage().isPacked() && f.isPeeled()) { - return f; + if (ref.getStorage().isPacked() && ref.isPeeled()) { + return ref; } - if (!f.isPeeled()) { - f = peel(f); + if (!ref.isPeeled()) { + ref = peel(ref); } - ObjectId peeledObjectId = f.getPeeledObjectId(); + ObjectId peeledObjectId = ref.getPeeledObjectId(); if (peeledObjectId != null) { - return new ObjectIdRef.PeeledTag(PACKED, f.getName(), - f.getObjectId(), peeledObjectId); + return new ObjectIdRef.PeeledTag(PACKED, ref.getName(), + ref.getObjectId(), peeledObjectId); } - return new ObjectIdRef.PeeledNonTag(PACKED, f.getName(), - f.getObjectId()); + return new ObjectIdRef.PeeledNonTag(PACKED, ref.getName(), + ref.getObjectId()); } void log(boolean force, RefUpdate update, String msg, boolean deref) @@ -1236,6 +1226,7 @@ private static boolean isSymRef(byte[] buf, int n) { * * @return {@code true} if we are currently cloning a repository * @throws IOException + * if an IO error occurred */ boolean isInClone() throws IOException { return hasDanglingHead() && !packedRefsFile.exists() && !hasLooseRef(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java index d07299e45..1c5c48a29 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryRename.java @@ -68,7 +68,6 @@ protected RefDirectory getRefDirectory() { return refdb; } - /** {@inheritDoc} */ @Override protected Result doRename() throws IOException { if (source.getRef().isSymbolic()) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java index 0dcb3196c..1dc4e3011 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectoryUpdate.java @@ -32,19 +32,16 @@ class RefDirectoryUpdate extends RefUpdate { database = r; } - /** {@inheritDoc} */ @Override protected RefDirectory getRefDatabase() { return database; } - /** {@inheritDoc} */ @Override protected Repository getRepository() { return database.getRepository(); } - /** {@inheritDoc} */ @Override protected boolean tryLock(boolean deref) throws IOException { shouldDeref = deref; @@ -61,7 +58,6 @@ protected boolean tryLock(boolean deref) throws IOException { return false; } - /** {@inheritDoc} */ @Override protected void unlock() { if (lock != null) { @@ -70,7 +66,6 @@ protected void unlock() { } } - /** {@inheritDoc} */ @Override protected Result doUpdate(Result status) throws IOException { WriteConfig wc = database.getRepository().getConfig() @@ -112,7 +107,6 @@ private String toResultString(Result status) { } } - /** {@inheritDoc} */ @Override protected Result doDelete(Result status) throws IOException { if (getRef().getStorage() != Ref.Storage.NEW) @@ -120,7 +114,6 @@ protected Result doDelete(Result status) throws IOException { return status; } - /** {@inheritDoc} */ @Override protected Result doLink(String target) throws IOException { WriteConfig wc = database.getRepository().getConfig() 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 cb80043b7..6870d7686 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 @@ -60,7 +60,6 @@ public class ReflogEntryImpl implements Serializable, ReflogEntry { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getOldId() */ - /** {@inheritDoc} */ @Override public ObjectId getOldId() { return oldId; @@ -69,7 +68,6 @@ public ObjectId getOldId() { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getNewId() */ - /** {@inheritDoc} */ @Override public ObjectId getNewId() { return newId; @@ -78,7 +76,6 @@ public ObjectId getNewId() { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getWho() */ - /** {@inheritDoc} */ @Override public PersonIdent getWho() { return who; @@ -87,13 +84,11 @@ public PersonIdent getWho() { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getComment() */ - /** {@inheritDoc} */ @Override public String getComment() { return comment; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { @@ -104,7 +99,6 @@ public String toString() { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogEntry#parseCheckout() */ - /** {@inheritDoc} */ @Override public CheckoutEntry parseCheckout() { if (getComment().startsWith(CheckoutEntryImpl.CHECKOUT_MOVING_FROM)) { 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 99a9e0938..21b5a54eb 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 @@ -32,7 +32,9 @@ class ReflogReaderImpl implements ReflogReader { /** * @param db + * repository to read reflogs from * @param refname + * {@code Ref} name */ ReflogReaderImpl(Repository db, String refname) { logName = new File(db.getDirectory(), Constants.LOGS + '/' + refname); @@ -41,7 +43,6 @@ class ReflogReaderImpl implements ReflogReader { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogReaader#getLastEntry() */ - /** {@inheritDoc} */ @Override public ReflogEntry getLastEntry() throws IOException { return getReverseEntry(0); @@ -50,7 +51,6 @@ public ReflogEntry getLastEntry() throws IOException { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogReaader#getReverseEntries() */ - /** {@inheritDoc} */ @Override public List getReverseEntries() throws IOException { return getReverseEntries(Integer.MAX_VALUE); @@ -59,7 +59,6 @@ public List getReverseEntries() throws IOException { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogReaader#getReverseEntry(int) */ - /** {@inheritDoc} */ @Override public ReflogEntry getReverseEntry(int number) throws IOException { if (number < 0) @@ -89,7 +88,6 @@ public ReflogEntry getReverseEntry(int number) throws IOException { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogReaader#getReverseEntries(int) */ - /** {@inheritDoc} */ @Override public List getReverseEntries(int max) throws IOException { final byte[] log; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogWriter.java index 7032083a4..b1ceb1480 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ReflogWriter.java @@ -91,6 +91,7 @@ public ReflogWriter(RefDirectory refdb, boolean forceWrite) { * Create the log directories. * * @throws java.io.IOException + * if an IO error occurred * @return this writer. */ public ReflogWriter create() throws IOException { @@ -110,6 +111,7 @@ public ReflogWriter create() throws IOException { * a {@link org.eclipse.jgit.lib.ReflogEntry} object. * @return this writer * @throws java.io.IOException + * if an IO error occurred */ public ReflogWriter log(String refName, ReflogEntry entry) throws IOException { @@ -132,6 +134,7 @@ public ReflogWriter log(String refName, ReflogEntry entry) * reflog message * @return this writer * @throws java.io.IOException + * if an IO error occurred */ public ReflogWriter log(String refName, ObjectId oldId, ObjectId newId, PersonIdent ident, String message) throws IOException { @@ -150,6 +153,7 @@ public ReflogWriter log(String refName, ObjectId oldId, * whether to dereference symbolic refs * @return this writer * @throws java.io.IOException + * if an IO error occurred */ public ReflogWriter log(RefUpdate update, String msg, boolean deref) throws IOException { 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 6a80519d0..7a564cc6a 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 @@ -31,14 +31,12 @@ class SimpleDataInput implements DataInput { this.fd = fd; } - /** {@inheritDoc} */ @Override public int readInt() throws IOException { readFully(buf, 0, 4); return NB.decodeInt32(buf, 0); } - /** {@inheritDoc} */ @Override public long readLong() throws IOException { readFully(buf, 0, 8); @@ -57,79 +55,66 @@ public long readUnsignedInt() throws IOException { return NB.decodeUInt32(buf, 0); } - /** {@inheritDoc} */ @Override public void readFully(byte[] b) throws IOException { readFully(b, 0, b.length); } - /** {@inheritDoc} */ @Override public void readFully(byte[] b, int off, int len) throws IOException { IO.readFully(fd, b, off, len); } - /** {@inheritDoc} */ @Override public int skipBytes(int n) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public boolean readBoolean() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public byte readByte() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public int readUnsignedByte() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public short readShort() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public int readUnsignedShort() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public char readChar() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public float readFloat() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public double readDouble() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public String readLine() throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @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 d01f6b4bd..74840889c 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 @@ -31,88 +31,74 @@ class SimpleDataOutput implements DataOutput { this.fd = fd; } - /** {@inheritDoc} */ @Override public void writeShort(int v) throws IOException { NB.encodeInt16(buf, 0, v); fd.write(buf, 0, 2); } - /** {@inheritDoc} */ @Override public void writeInt(int v) throws IOException { NB.encodeInt32(buf, 0, v); fd.write(buf, 0, 4); } - /** {@inheritDoc} */ @Override public void writeLong(long v) throws IOException { NB.encodeInt64(buf, 0, v); fd.write(buf, 0, 8); } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void write(byte[] b) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void write(byte[] b, int off, int len) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void writeBoolean(boolean v) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void writeByte(int v) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void writeChar(int v) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void writeFloat(float v) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void writeDouble(double v) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void writeBytes(String s) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void writeChars(String s) throws IOException { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public void writeUTF(String s) throws IOException { throw new UnsupportedOperationException(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java index 0b9748096..767084afa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/SnapshottingRefDirectory.java @@ -67,14 +67,12 @@ PackedRefList getPackedRefs() throws IOException { return packedRefs.get(); } - /** {@inheritDoc} */ @Override void delete(RefDirectoryUpdate update) throws IOException { refreshSnapshot(); super.delete(update); } - /** {@inheritDoc} */ @Override public RefDirectoryUpdate newUpdate(String name, boolean detach) throws IOException { @@ -82,19 +80,16 @@ public RefDirectoryUpdate newUpdate(String name, boolean detach) return super.newUpdate(name, detach); } - /** {@inheritDoc} */ @Override public PackedBatchRefUpdate newBatchUpdate() { return new SnapshotPackedBatchRefUpdate(this); } - /** {@inheritDoc} */ @Override public PackedBatchRefUpdate newBatchUpdate(boolean shouldLockLooseRefs) { return new SnapshotPackedBatchRefUpdate(this, shouldLockLooseRefs); } - /** {@inheritDoc} */ @Override RefDirectoryUpdate newTemporaryUpdate() throws IOException { refreshSnapshot(); @@ -126,6 +121,7 @@ synchronized void invalidateSnapshot() { * threads use this snapshot. * * @throws IOException + * if an IO error occurred */ private synchronized void refreshSnapshot() throws IOException { compareAndSetPackedRefs(packedRefs.get(), refDb.getPackedRefs()); 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 fa743babe..01f514b93 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 @@ -79,13 +79,11 @@ DeltaBaseCache getDeltaBaseCache() { return baseCache; } - /** {@inheritDoc} */ @Override public ObjectReader newReader() { return new WindowCursor(db); } - /** {@inheritDoc} */ @Override public BitmapIndex getBitmapIndex() throws IOException { for (Pack pack : db.getPacks()) { @@ -96,13 +94,11 @@ public BitmapIndex getBitmapIndex() throws IOException { return null; } - /** {@inheritDoc} */ @Override public Optional getCommitGraph() { return db.getCommitGraph(); } - /** {@inheritDoc} */ @Override public Collection getCachedPacksAndUpdate( BitmapBuilder needBitmap) throws IOException { @@ -115,7 +111,6 @@ public Collection getCachedPacksAndUpdate( return Collections.emptyList(); } - /** {@inheritDoc} */ @Override public Collection resolve(AbbreviatedObjectId id) throws IOException { @@ -126,13 +121,11 @@ public Collection resolve(AbbreviatedObjectId id) return matches; } - /** {@inheritDoc} */ @Override public boolean has(AnyObjectId objectId) throws IOException { return db.has(objectId); } - /** {@inheritDoc} */ @Override public ObjectLoader open(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, @@ -149,13 +142,11 @@ public ObjectLoader open(AnyObjectId objectId, int typeHint) return ldr; } - /** {@inheritDoc} */ @Override public Set getShallowCommits() throws IOException { return db.getShallowCommits(); } - /** {@inheritDoc} */ @Override public long getObjectSize(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, @@ -170,13 +161,11 @@ public long getObjectSize(AnyObjectId objectId, int typeHint) return sz; } - /** {@inheritDoc} */ @Override public LocalObjectToPack newObjectToPack(AnyObjectId objectId, int type) { return new LocalObjectToPack(objectId, type); } - /** {@inheritDoc} */ @Override public void selectObjectRepresentation(PackWriter packer, ProgressMonitor monitor, Iterable objects) @@ -187,7 +176,6 @@ public void selectObjectRepresentation(PackWriter packer, } } - /** {@inheritDoc} */ @Override public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp, boolean validate) throws IOException, @@ -196,7 +184,6 @@ public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp, src.pack.copyAsIs(out, src, validate, this); } - /** {@inheritDoc} */ @Override public void writeObjects(PackOutputStream out, List list) throws IOException { @@ -240,7 +227,6 @@ int copy(final Pack pack, long position, final byte[] dstbuf, return cnt - need; } - /** {@inheritDoc} */ @Override public void copyPackAsIs(PackOutputStream out, CachedPack pack) throws IOException { @@ -336,7 +322,6 @@ void pin(Pack pack, long position) } } - /** {@inheritDoc} */ @Override @Nullable public ObjectInserter getCreatedFromInserter() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/BlockSource.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/BlockSource.java index 82d07e6bd..58695fc9a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/BlockSource.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/BlockSource.java @@ -147,7 +147,6 @@ public void adviseSequentialRead(long startPos, long endPos) { // Do nothing by default. } - /** {@inheritDoc} */ @Override public abstract void close(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/CancellableDigestOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/CancellableDigestOutputStream.java index ca2095fee..ce86eabe9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/CancellableDigestOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/io/CancellableDigestOutputStream.java @@ -80,7 +80,6 @@ public final long length() { return count; } - /** {@inheritDoc} */ @Override public final void write(int b) throws IOException { if (checkCancelAt <= count) { @@ -95,7 +94,6 @@ public final void write(int b) throws IOException { count++; } - /** {@inheritDoc} */ @Override public final void write(byte[] b, int off, int len) throws IOException { while (0 < len) { @@ -116,7 +114,6 @@ public final void write(byte[] b, int off, int len) throws IOException { } } - /** {@inheritDoc} */ @Override public void flush() throws IOException { out.flush(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/memory/TernarySearchTree.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/memory/TernarySearchTree.java index 1ac662736..acc1c830d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/memory/TernarySearchTree.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/memory/TernarySearchTree.java @@ -300,6 +300,7 @@ public void clear() { * Find the key which is the longest prefix of the given query string. * * @param query + * the query string * @return the key which is the longest prefix of the given query string or * {@code null} if none exists. */ 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 7ed5defbe..b86ff7f17 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 @@ -393,7 +393,6 @@ private static int negmatch(byte[] res, int resPtr, byte[] src, int srcPtr, return start - resPtr; } - /** {@inheritDoc} */ @Override @SuppressWarnings("nls") public String toString() { 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 132eb5095..9a3f4b07e 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 @@ -254,7 +254,6 @@ void add(Slice s) { slices.add(s); } - /** {@inheritDoc} */ @Override public Object call() throws Exception { or = block.templateReader.newReader(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java index d9013bff2..ea5b9461c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/ObjectToPack.java @@ -156,7 +156,6 @@ public final boolean isWritten() { return 1 < getOffset(); // markWantWrite sets 1. } - /** {@inheritDoc} */ @Override public final int getType() { return (flags >> TYPE_SHIFT) & 0x7; @@ -357,7 +356,6 @@ public void select(StoredObjectRepresentation ref) { // Empty by default. } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java index d58008379..e6daaeaca 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackExt.java @@ -80,7 +80,6 @@ public String getTmpExtension() { return String.format(".%s_tmp", ext); //$NON-NLS-1$ } - /** {@inheritDoc} */ @Override public String toString() { return String.format("PackExt[%s, bit=0x%s]", getExtension(), //$NON-NLS-1$ 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 9508f3fe3..1b4c5e21a 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 @@ -2286,7 +2286,7 @@ private void addObject( /** * Determines if the object should be omitted from the pack as a result of - * its depth (probably because of the tree: filter). + * its depth (probably because of the tree:<depth> filter). *

    * Causes {@code walker} to skip traversing the current tree, which ought to * have just started traversal, assuming this method is called as soon as a diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/EmptyLogCursor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/EmptyLogCursor.java index 7c06be876..8700556d4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/EmptyLogCursor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/EmptyLogCursor.java @@ -16,31 +16,26 @@ /** Empty {@link LogCursor} with no results. */ class EmptyLogCursor extends LogCursor { - /** {@inheritDoc} */ @Override public boolean next() throws IOException { return false; } - /** {@inheritDoc} */ @Override public String getRefName() { return null; } - /** {@inheritDoc} */ @Override public long getUpdateIndex() { return 0; } - /** {@inheritDoc} */ @Override public ReflogEntry getReflogEntry() { return null; } - /** {@inheritDoc} */ @Override public void close() { // Do nothing. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/LogCursor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/LogCursor.java index f78975af3..f9c701ebe 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/LogCursor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/LogCursor.java @@ -51,7 +51,6 @@ public abstract class LogCursor implements AutoCloseable { @Nullable public abstract ReflogEntry getReflogEntry(); - /** {@inheritDoc} */ @Override public abstract void close(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java index e210acf05..aeaf24171 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/MergedReftable.java @@ -39,7 +39,6 @@ public class MergedReftable extends Reftable { /** * Initialize a merged table reader. - *

    * * @param tableStack * stack of tables to read from. The base of the stack is at @@ -91,7 +90,6 @@ public long minUpdateIndex() throws IOException { return minUpdateIndex; } - /** {@inheritDoc} */ @Override public boolean hasObjectMap() throws IOException { boolean has = true; @@ -101,7 +99,6 @@ public boolean hasObjectMap() throws IOException { return has; } - /** {@inheritDoc} */ @Override public RefCursor allRefs() throws IOException { MergedRefCursor m = new MergedRefCursor(); @@ -111,7 +108,6 @@ public RefCursor allRefs() throws IOException { return m; } - /** {@inheritDoc} */ @Override public RefCursor seekRef(String name) throws IOException { MergedRefCursor m = new MergedRefCursor(); @@ -121,7 +117,6 @@ public RefCursor seekRef(String name) throws IOException { return m; } - /** {@inheritDoc} */ @Override public RefCursor seekRefsWithPrefix(String prefix) throws IOException { MergedRefCursor m = new MergedRefCursor(); @@ -131,7 +126,6 @@ public RefCursor seekRefsWithPrefix(String prefix) throws IOException { return m; } - /** {@inheritDoc} */ @Override public RefCursor byObjectId(AnyObjectId name) throws IOException { MergedRefCursor m = new FilteringMergedRefCursor(name); @@ -141,7 +135,6 @@ public RefCursor byObjectId(AnyObjectId name) throws IOException { return m; } - /** {@inheritDoc} */ @Override public LogCursor allLogs() throws IOException { MergedLogCursor m = new MergedLogCursor(); @@ -151,7 +144,6 @@ public LogCursor allLogs() throws IOException { return m; } - /** {@inheritDoc} */ @Override public LogCursor seekLog(String refName, long updateIdx) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/RefCursor.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/RefCursor.java index 5e2c35088..6cd4f6c81 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/RefCursor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/RefCursor.java @@ -58,7 +58,6 @@ public boolean wasDeleted() { return r.getStorage() == Ref.Storage.NEW && r.getObjectId() == null; } - /** {@inheritDoc} */ @Override public abstract void close(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java index 63786dc17..6e83778c7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/Reftable.java @@ -138,7 +138,7 @@ public void setIncludeDeletes(boolean deletes) { public abstract RefCursor byObjectId(AnyObjectId id) throws IOException; /** - * @return whether this reftable can do a fast SHA1 => ref lookup. + * @return whether this reftable can do a fast SHA1 => ref lookup. * @throws IOException on I/O problems. */ public abstract boolean hasObjectMap() throws IOException; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableBatchRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableBatchRefUpdate.java index dbc2ec7dc..38c17e346 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableBatchRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableBatchRefUpdate.java @@ -81,7 +81,6 @@ protected ReftableBatchRefUpdate(RefDatabase refdb, ReftableDatabase reftableDb, this.repository = repository; } - /** {@inheritDoc} */ @Override public void execute(RevWalk rw, ProgressMonitor pm, List options) { List pending = getPending(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableOutputStream.java index aa3aba516..86e16ec86 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableOutputStream.java @@ -59,14 +59,12 @@ void setBlockSize(int bs) { blockSize = bs; } - /** {@inheritDoc} */ @Override public void write(int b) { ensureBytesAvailableInBlockBuf(1); blockBuf[cur++] = (byte) b; } - /** {@inheritDoc} */ @Override public void write(byte[] b, int off, int cnt) { ensureBytesAvailableInBlockBuf(cnt); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java index cabb2e184..2a73efd96 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReader.java @@ -127,7 +127,6 @@ public long maxUpdateIndex() throws IOException { return maxUpdateIndex; } - /** {@inheritDoc} */ @Override public RefCursor allRefs() throws IOException { if (blockSize == -1) { @@ -144,7 +143,6 @@ public RefCursor allRefs() throws IOException { return i; } - /** {@inheritDoc} */ @Override public RefCursor seekRef(String refName) throws IOException { initRefIndex(); @@ -155,7 +153,6 @@ public RefCursor seekRef(String refName) throws IOException { return i; } - /** {@inheritDoc} */ @Override public RefCursor seekRefsWithPrefix(String prefix) throws IOException { initRefIndex(); @@ -166,7 +163,6 @@ public RefCursor seekRefsWithPrefix(String prefix) throws IOException { return i; } - /** {@inheritDoc} */ @Override public RefCursor byObjectId(AnyObjectId id) throws IOException { initObjIndex(); @@ -179,7 +175,6 @@ public RefCursor byObjectId(AnyObjectId id) throws IOException { return i; } - /** {@inheritDoc} */ @Override public LogCursor allLogs() throws IOException { initLogIndex(); @@ -192,7 +187,6 @@ public LogCursor allLogs() throws IOException { return new EmptyLogCursor(); } - /** {@inheritDoc} */ @Override public LogCursor seekLog(String refName, long updateIndex) throws IOException { @@ -460,7 +454,6 @@ public long size() throws IOException { return src.size(); } - /** {@inheritDoc} */ @Override public void close() throws IOException { src.close(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReflogReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReflogReader.java index f9f1def95..597303301 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReflogReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableReflogReader.java @@ -34,7 +34,6 @@ public class ReftableReflogReader implements ReflogReader { this.refname = refname; } - /** {@inheritDoc} */ @Override public ReflogEntry getLastEntry() throws IOException { lock.lock(); @@ -46,13 +45,11 @@ public ReflogEntry getLastEntry() throws IOException { } } - /** {@inheritDoc} */ @Override public List getReverseEntries() throws IOException { return getReverseEntries(Integer.MAX_VALUE); } - /** {@inheritDoc} */ @Override public ReflogEntry getReverseEntry(int number) throws IOException { lock.lock(); @@ -72,7 +69,6 @@ public ReflogEntry getReverseEntry(int number) throws IOException { } } - /** {@inheritDoc} */ @Override public List getReverseEntries(int max) throws IOException { lock.lock(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/submodule/SubmoduleValidator.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/submodule/SubmoduleValidator.java index d0e24413b..ff8308df4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/submodule/SubmoduleValidator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/submodule/SubmoduleValidator.java @@ -45,8 +45,8 @@ public static class SubmoduleValidationException extends Exception { * @param message * Description of the problem * @param fsckMessageId - * Error identifier, following the git fsck fsck. - * format + * Error identifier, following the git fsck + * fsck.<msg-id> format */ SubmoduleValidationException(String message, ObjectChecker.ErrorType fsckMessageId) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java index 659ccb8c5..29a292213 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/ssh/OpenSshConfigFile.java @@ -1154,7 +1154,6 @@ public String substitute(String input, String allowed, } } - /** {@inheritDoc} */ @Override @SuppressWarnings("nls") public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbrevConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbrevConfig.java index 9109cfd76..c3dffdfe7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbrevConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbrevConfig.java @@ -19,7 +19,7 @@ /** * Git configuration option + * href="https://git-scm.com/docs/git-config#Documentation/git-config.txt-coreabbrev"> * core.abbrev * * @since 6.1 @@ -100,6 +100,7 @@ public static AbbrevConfig parseFromConfig(Repository repo) * object names to stay unique for some time. * * @param repo + * the repository the AbbrevConfig shall be computed for * @return appropriate value computed based on the approximate number of * packed objects in a repository */ @@ -128,7 +129,10 @@ private static AbbrevConfig auto(Repository repo) { private int abbrev; /** + * Create an {@code AbbrevConfig} + * * @param abbrev + * abbreviation length */ private AbbrevConfig(int abbrev) { this.abbrev = capAbbrev(abbrev); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java index dc5e5cc20..a13136b9f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java @@ -321,13 +321,11 @@ private int mask(int word, int v) { return mask(nibbles, word, v); } - /** {@inheritDoc} */ @Override public int hashCode() { return w1; } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof AbbreviatedObjectId) { @@ -366,7 +364,6 @@ public final String name() { return new String(b, 0, nibbles); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 7685b30f8..c58133ada 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/AnyObjectId.java @@ -248,7 +248,6 @@ public boolean startsWith(AbbreviatedObjectId abbr) { return abbr.prefixCompare(this) == 0; } - /** {@inheritDoc} */ @Override public final int hashCode() { return w2; @@ -266,7 +265,6 @@ public final boolean equals(AnyObjectId other) { return other != null ? isEqual(this, other) : false; } - /** {@inheritDoc} */ @Override public final boolean equals(Object o) { if (o instanceof AnyObjectId) { @@ -477,7 +475,6 @@ static void formatHexChar(char[] dst, int p, int w) { dst[o--] = '0'; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java index d2367cc3d..f9952501c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchRefUpdate.java @@ -716,7 +716,6 @@ protected boolean isForceRefLog(ReceiveCommand cmd) { : isForceRefLog(); } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder r = new StringBuilder(); 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 f82605737..8e92f20cb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BatchingProgressMonitor.java @@ -47,13 +47,11 @@ public void setDelayStart(long time, TimeUnit unit) { delayStartUnit = unit; } - /** {@inheritDoc} */ @Override public void start(int totalTasks) { // Ignore the number of tasks. } - /** {@inheritDoc} */ @Override public void beginTask(String title, int work) { endTask(); @@ -62,14 +60,12 @@ public void beginTask(String title, int work) { task.delay(delayStartTime, delayStartUnit); } - /** {@inheritDoc} */ @Override public void update(int completed) { if (task != null) task.update(this, completed); } - /** {@inheritDoc} */ @Override public void endTask() { if (task != null) { @@ -78,7 +74,6 @@ public void endTask() { } } - /** {@inheritDoc} */ @Override public boolean isCancelled() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BranchTrackingStatus.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BranchTrackingStatus.java index 6c625bb73..39fc56603 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BranchTrackingStatus.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BranchTrackingStatus.java @@ -33,6 +33,7 @@ public class BranchTrackingStatus { * the local branch * @return the tracking status, or null if it is not known * @throws java.io.IOException + * if an IO error occurred */ public static BranchTrackingStatus of(Repository repository, String branchName) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java index 1665f051e..ea3308222 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/CommitBuilder.java @@ -275,7 +275,6 @@ public byte[] toByteArray() throws UnsupportedEncodingException { return build(); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java index d1d66d280..0cccaec49 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Config.java @@ -399,6 +399,8 @@ public boolean getBoolean(final String section, String subsection, /** * Parse an enumeration from the configuration. * + * @param + * type of the returned enum * @param section * section the key is grouped within. * @param subsection @@ -431,6 +433,8 @@ private static T[] allValuesOf(T value) { /** * Parse an enumeration from the configuration. * + * @param + * type of the returned enum * @param all * all possible values in the enumeration which should be * recognized. Typically {@code EnumType.values()}. @@ -722,7 +726,7 @@ public ListenerHandle addChangeListener(ConfigChangedListener listener) { * responsible for issuing {@link #fireConfigChangedEvent()} calls * themselves. * - * @return + * @return whether to issue change events for transient changes */ protected boolean notifyUponTransientChanges() { return true; @@ -847,6 +851,8 @@ public void setBoolean(final String section, final String subsection, * name = value * * + * @param + * type of the enum to set * @param section * section name, e.g "branch" * @param subsection diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java index 4c080f476..621db89f6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigConstants.java @@ -60,7 +60,8 @@ public final class ConfigConstants { public static final String CONFIG_KEY_PROMPT = "prompt"; /** - * The "trustExitCode" key within "difftool" or "mergetool.." section + * The "trustExitCode" key within "difftool" or "mergetool.<name>." + * section * * @since 6.1 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java index a9235ebcd..e9a8b4427 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ConfigLine.java @@ -83,7 +83,6 @@ private static boolean eqSameCase(String a, String b) { return a.equals(b); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java index 3b2ef42bb..60a23dde0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java @@ -337,9 +337,9 @@ public final class Constants { public static final String GIT_CONFIG_NOSYSTEM_KEY = "GIT_CONFIG_NOSYSTEM"; /** - * The key of the XDG_CONFIG_HOME directory defined in the XDG base - * directory specification, see - * {@link "https://wiki.archlinux.org/index.php/XDG_Base_Directory"} + * The key of the XDG_CONFIG_HOME directory defined in the + * + * XDG Base Directory specification. * * @since 5.5.2 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java index 86409403b..80aceb4e7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/DefaultTypedConfigGetter.java @@ -31,7 +31,6 @@ */ public class DefaultTypedConfigGetter implements TypedConfigGetter { - /** {@inheritDoc} */ @Override public boolean getBoolean(Config config, String section, String subsection, String name, boolean defaultValue) { @@ -50,7 +49,6 @@ public boolean getBoolean(Config config, String section, String subsection, } } - /** {@inheritDoc} */ @Override public > T getEnum(Config config, T[] all, String section, String subsection, String name, T defaultValue) { @@ -106,7 +104,6 @@ public > T getEnum(Config config, T[] all, String section, JGitText.get().enumValueNotSupported2, section, name, value)); } - /** {@inheritDoc} */ @Override public int getInt(Config config, String section, String subsection, String name, int defaultValue) { @@ -118,7 +115,6 @@ public int getInt(Config config, String section, String subsection, .format(JGitText.get().integerValueOutOfRange, section, name)); } - /** {@inheritDoc} */ @Override public int getIntInRange(Config config, String section, String subsection, String name, int minValue, int maxValue, int defaultValue) { @@ -138,7 +134,6 @@ public int getIntInRange(Config config, String section, String subsection, Integer.valueOf(minValue), Integer.valueOf(maxValue))); } - /** {@inheritDoc} */ @Override public long getLong(Config config, String section, String subsection, String name, long defaultValue) { @@ -158,7 +153,6 @@ public long getLong(Config config, String section, String subsection, } } - /** {@inheritDoc} */ @Override public long getTimeUnit(Config config, String section, String subsection, String name, long defaultValue, TimeUnit wantUnit) { @@ -269,7 +263,6 @@ private static IllegalArgumentException notTimeUnit(String section, section, name, valueString)); } - /** {@inheritDoc} */ @Override @NonNull public List getRefSpecs(Config config, String section, 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 94d28eb34..a5410b778 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/EmptyProgressMonitor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/EmptyProgressMonitor.java @@ -18,31 +18,26 @@ */ public abstract class EmptyProgressMonitor implements ProgressMonitor { - /** {@inheritDoc} */ @Override public void start(int totalTasks) { // empty } - /** {@inheritDoc} */ @Override public void beginTask(String title, int totalWork) { // empty } - /** {@inheritDoc} */ @Override public void update(int completed) { // empty } - /** {@inheritDoc} */ @Override public void endTask() { // empty } - /** {@inheritDoc} */ @Override public boolean isCancelled() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSignature.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSignature.java index e78cf16ea..4018dabeb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSignature.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GpgSignature.java @@ -49,7 +49,6 @@ public String toExternalString() { return new String(signature, US_ASCII); } - /** {@inheritDoc} */ @Override @SuppressWarnings("nls") public String toString() { 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 df9fd47ef..b009ea1af 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java @@ -265,6 +265,7 @@ public TreeFilter clone() { * @param workingTreeIterator * iterator for working directory * @throws java.io.IOException + * if an IO error occurred */ public IndexDiff(Repository repository, String revstr, WorkingTreeIterator workingTreeIterator) throws IOException { @@ -281,6 +282,7 @@ public IndexDiff(Repository repository, String revstr, * @param workingTreeIterator * iterator for working directory * @throws java.io.IOException + * if an IO error occurred */ public IndexDiff(Repository repository, ObjectId objectId, WorkingTreeIterator workingTreeIterator) throws IOException { @@ -325,6 +327,7 @@ public interface WorkingTreeIteratorFactory { * Allows higher layers to set the factory for WorkingTreeIterators. * * @param wTreeIt + * working tree iterator factory * @since 3.6 */ public void setWorkingTreeItFactory(WorkingTreeIteratorFactory wTreeIt) { @@ -349,6 +352,7 @@ public void setFilter(TreeFilter filter) { * * @return if anything is different between index, tree, and workdir * @throws java.io.IOException + * if an IO error occurred */ public boolean diff() throws IOException { return diff(null); @@ -372,6 +376,7 @@ public boolean diff() throws IOException { * {@link RepositoryBuilder}. * @return if anything is different between index, tree, and workdir * @throws java.io.IOException + * if an IO error occurred * @since 5.6 */ public boolean diff(RepositoryBuilderFactory factory) @@ -395,9 +400,11 @@ public boolean diff(RepositoryBuilderFactory factory) * number or estimated files in the working tree * @param estIndexSize * number of estimated entries in the cache - * @param title a {@link java.lang.String} object. + * @param title + * a {@link java.lang.String} object. * @return if anything is different between index, tree, and workdir * @throws java.io.IOException + * if an IO error occurred */ public boolean diff(final ProgressMonitor monitor, int estWorkTreeSize, int estIndexSize, final String title) @@ -436,6 +443,7 @@ public boolean diff(final ProgressMonitor monitor, int estWorkTreeSize, * {@link RepositoryBuilder}. * @return if anything is different between index, tree, and workdir * @throws java.io.IOException + * if an IO error occurred * @since 5.6 */ public boolean diff(ProgressMonitor monitor, int estWorkTreeSize, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/MutableObjectId.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/MutableObjectId.java index 4a712ba36..6a35dedcf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/MutableObjectId.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/MutableObjectId.java @@ -242,7 +242,6 @@ private void fromHexString(byte[] bs, int p) { } } - /** {@inheritDoc} */ @Override public ObjectId toObjectId() { return new ObjectId(this); 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 127cca9d1..0a4db2a5f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/NullProgressMonitor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/NullProgressMonitor.java @@ -23,31 +23,26 @@ private NullProgressMonitor() { // Do not let others instantiate } - /** {@inheritDoc} */ @Override public void start(int totalTasks) { // Do not report. } - /** {@inheritDoc} */ @Override public void beginTask(String title, int totalWork) { // Do not report. } - /** {@inheritDoc} */ @Override public void update(int completed) { // Do not report. } - /** {@inheritDoc} */ @Override public boolean isCancelled() { return false; } - /** {@inheritDoc} */ @Override public void endTask() { // Do not report. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectBuilder.java index 4b7054f72..064d89e08 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectBuilder.java @@ -72,7 +72,6 @@ protected void setAuthor(PersonIdent newAuthor) { *

  • create {@link GpgSignature} from payload
  • *
  • set {@link GpgSignature}
  • * - *

    * * @param gpgSignature * the signature to set or {@code null} to unset diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectChecker.java index 9e9ef882a..a1d6d92ec 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectChecker.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectChecker.java @@ -1065,6 +1065,7 @@ && toLower(buf[p + 1]) == 'i' * * @return true if the filename in buf could be a ".gitmodules" file * @throws CorruptObjectException + * if an object is corrupt */ private boolean isGitmodules(byte[] buf, int start, int end, @Nullable AnyObjectId id) throws CorruptObjectException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectId.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectId.java index 269049f4a..1c31263e3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectId.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectId.java @@ -262,7 +262,6 @@ protected ObjectId(AnyObjectId src) { w5 = src.w5; } - /** {@inheritDoc} */ @Override public ObjectId toObjectId() { return this; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java index 29039097f..a74fddff4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java @@ -128,8 +128,11 @@ public boolean contains(AnyObjectId toFind) { *

    * An existing mapping for must not be in this map. Callers must * first call {@link #get(AnyObjectId)} to verify there is no current - * mapping prior to adding a new mapping, or use {@link #addIfAbsent(Entry)}. + * mapping prior to adding a new mapping, or use + * {@link #addIfAbsent(Entry)}. * + * @param + * type of values * @param newValue * the object to store. */ @@ -157,6 +160,8 @@ public void add(Q newValue) { * boolean wasNew = map.addIfAbsent(obj) == obj; * * + * @param + * type of values * @param newValue * the object to store. * @return {@code newValue} if stored, or the prior value already stored and @@ -199,7 +204,6 @@ public boolean isEmpty() { return size == 0; } - /** {@inheritDoc} */ @Override public Iterator iterator() { return new Iterator<>() { 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 a04ca6890..c3c58372b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdRef.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdRef.java @@ -204,41 +204,35 @@ protected ObjectIdRef(@NonNull Storage st, @NonNull String name, this.updateIndex = updateIndex; } - /** {@inheritDoc} */ @Override @NonNull public String getName() { return name; } - /** {@inheritDoc} */ @Override public boolean isSymbolic() { return false; } - /** {@inheritDoc} */ @Override @NonNull public Ref getLeaf() { return this; } - /** {@inheritDoc} */ @Override @NonNull public Ref getTarget() { return this; } - /** {@inheritDoc} */ @Override @Nullable public ObjectId getObjectId() { return objectId; } - /** {@inheritDoc} */ @Override @NonNull public Storage getStorage() { @@ -257,7 +251,6 @@ public long getUpdateIndex() { return updateIndex; } - /** {@inheritDoc} */ @NonNull @Override public String toString() { 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 0e015b658..d4acfd471 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdSubclassMap.java @@ -96,6 +96,8 @@ public boolean contains(AnyObjectId toFind) { * mapping prior to adding a new mapping, or use * {@link #addIfAbsent(ObjectId)}. * + * @param + * type of values * @param newValue * the object to store. */ @@ -117,6 +119,8 @@ public void add(Q newValue) { * boolean wasNew = map.addIfAbsent(obj) == obj; * * + * @param + * type of values * @param newValue * the object to store. * @return {@code newValue} if stored, or the prior value already stored and @@ -162,7 +166,6 @@ public boolean isEmpty() { return size == 0; } - /** {@inheritDoc} */ @Override public Iterator iterator() { return new Iterator<>() { 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 69b2b5104..3e2998530 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java @@ -245,12 +245,15 @@ public abstract ObjectLoader open(AnyObjectId objectId, int typeHint) * * @return IDs of shallow commits * @throws java.io.IOException + * if an error occurred */ public abstract Set getShallowCommits() throws IOException; /** * Asynchronous object opening. * + * @param + * type of {@code ObjectId} * @param objectIds * objects to open from the object store. The supplied collection * must not be modified until the queue has finished. @@ -370,6 +373,8 @@ public boolean isNotLargerThan(AnyObjectId objectId, int typeHint, long size) /** * Asynchronous object size lookup. * + * @param + * type of {@code ObjectId} * @param objectIds * objects to get the size of from the object store. The supplied * collection must not be modified until the queue has finished. 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 93710299b..3ba055aae 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/PersonIdent.java @@ -392,7 +392,6 @@ public int hashCode() { return hc; } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof PersonIdent) { @@ -421,7 +420,6 @@ public String toExternalString() { return r.toString(); } - /** {@inheritDoc} */ @Override @SuppressWarnings("nls") public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoFile.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoFile.java index a4cd1d689..c716f464d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoFile.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoFile.java @@ -55,6 +55,7 @@ public RebaseTodoFile(Repository repo) { * true if also comments should be reported * @return the list of steps * @throws java.io.IOException + * if an IO error occurred */ public List readRebaseTodo(String path, boolean includeComments) throws IOException { @@ -126,8 +127,11 @@ private static void parseComments(byte[] buf, int tokenBegin, * Skip leading space, tab, CR and LF characters * * @param buf + * byte buffer * @param tokenBegin + * index of token begin * @param lineEnd + * index of line end * @return the token within the range of the given {@code buf} that doesn't * need to be skipped, {@code -1} if no such token found within the * range (i.e. empty line) @@ -193,6 +197,7 @@ private static RebaseTodoLine parseLine(byte[] buf, int tokenBegin, * @param append * whether to append to an existing file or to write a new file * @throws java.io.IOException + * if an IO error occurred */ public void writeRebaseTodoFile(String path, List steps, boolean append) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java index 8b778497f..878cfc8f9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java @@ -70,6 +70,7 @@ public String toString() { /** * @param token + * token to parse * @return the Action */ public static Action parse(String token) { @@ -245,7 +246,6 @@ public String getComment() { return comment; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 3ab649341..c4c0001d3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefComparator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefComparator.java @@ -27,7 +27,6 @@ public class RefComparator implements Comparator { /** Singleton instance of RefComparator */ public static final RefComparator INSTANCE = new RefComparator(); - /** {@inheritDoc} */ @Override public int compare(Ref o1, Ref o2) { return compareTo(o1, o2); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java index 98089fb8f..82dcc6b64 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefDatabase.java @@ -136,6 +136,7 @@ public boolean hasVersioning() { * with the passed ref name; empty collection when there are no * conflicts * @throws java.io.IOException + * if an error occurred * @since 2.3 * @see #isNameConflicting(String) */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefRename.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefRename.java index cdd4e4ba7..e8821d0cb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefRename.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefRename.java @@ -122,6 +122,7 @@ public Result getResult() { * * @return the result of the new ref update * @throws java.io.IOException + * if an IO error occurred */ public Result rename() throws IOException { try { @@ -138,6 +139,7 @@ public Result rename() throws IOException { * * @return the result of the rename operation. * @throws java.io.IOException + * if an IO error occurred */ protected abstract Result doRename() throws IOException; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java index d1be63b96..d113243be 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefUpdate.java @@ -115,7 +115,6 @@ public enum Result { /** * The ref was renamed from another name - *

    */ RENAMED, @@ -245,6 +244,7 @@ protected RefUpdate(Ref ref) { * a {@link org.eclipse.jgit.lib.RefUpdate.Result} object. * @return {@code result} * @throws java.io.IOException + * if an IO error occurred */ protected abstract Result doUpdate(Result desiredResult) throws IOException; @@ -255,6 +255,7 @@ protected RefUpdate(Ref ref) { * a {@link org.eclipse.jgit.lib.RefUpdate.Result} object. * @return {@code result} * @throws java.io.IOException + * if an IO error occurred */ protected abstract Result doDelete(Result desiredResult) throws IOException; @@ -265,6 +266,7 @@ protected RefUpdate(Ref ref) { * a {@link java.lang.String} object. * @return {@link org.eclipse.jgit.lib.RefUpdate.Result#NEW} on success. * @throws java.io.IOException + * if an IO error occurred */ protected abstract Result doLink(String target) throws IOException; @@ -612,6 +614,7 @@ Result execute(Result status) throws IOException { * * @return the result status of the delete. * @throws java.io.IOException + * if an IO error occurred */ public Result delete() throws IOException { try (RevWalk rw = new RevWalk(getRepository())) { @@ -628,6 +631,7 @@ public Result delete() throws IOException { * the merge test. The walk will be reset to perform the test. * @return the result status of the delete. * @throws java.io.IOException + * if an IO error occurred */ public Result delete(RevWalk walk) throws IOException { final String myName = detachingSymbolicRef @@ -668,6 +672,7 @@ Result execute(Result status) throws IOException { * @return {@link org.eclipse.jgit.lib.RefUpdate.Result#NEW} or * {@link org.eclipse.jgit.lib.RefUpdate.Result#FORCED} on success. * @throws java.io.IOException + * if an IO error occurred */ public Result link(String target) throws IOException { if (!target.startsWith(Constants.R_REFS)) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java index d2c3f9de6..41917f8b5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RefWriter.java @@ -177,6 +177,7 @@ public void writePackedRefs() throws IOException { * @param content * byte content of file to be written. * @throws java.io.IOException + * if an IO error occurred */ protected abstract void writeFile(String file, byte[] content) throws IOException; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogReader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogReader.java index 1e6a66157..5233bfc10 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ReflogReader.java @@ -25,6 +25,7 @@ public interface ReflogReader { * * @return the latest reflog entry, or null if no log * @throws java.io.IOException + * if an IO error occurred */ ReflogEntry getLastEntry() throws IOException; @@ -33,6 +34,7 @@ public interface ReflogReader { * * @return all reflog entries in reverse order * @throws java.io.IOException + * if an IO error occurred */ List getReverseEntries() throws IOException; @@ -40,9 +42,11 @@ public interface ReflogReader { * Get specific entry in the reflog relative to the last entry which is * considered entry zero. * - * @param number a int. + * @param number + * a int. * @return reflog entry or null if not found * @throws java.io.IOException + * if an IO error occurred */ ReflogEntry getReverseEntry(int number) throws IOException; @@ -53,6 +57,7 @@ public interface ReflogReader { * max number of entries to read * @return all reflog entries in reverse order * @throws java.io.IOException + * if an IO error occurred */ List getReverseEntries(int max) throws IOException; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java index db2571c67..d446a1c9c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java @@ -175,6 +175,7 @@ public void fireEvent(RepositoryEvent event) { * the same as {@code create(false)}. * * @throws java.io.IOException + * if an IO error occurred * @see #create(boolean) */ public void create() throws IOException { @@ -484,11 +485,14 @@ public ObjectId resolve(String revstr) * Thus this method can be used to process an expression to a method that * expects a branch or revision id. * - * @param revstr a {@link java.lang.String} object. + * @param revstr + * a {@link java.lang.String} object. * @return object id or ref name from resolved expression or {@code null} if * given expression cannot be resolved * @throws org.eclipse.jgit.errors.AmbiguousObjectException + * if a shortened ObjectId was ambiguous * @throws java.io.IOException + * if an IO error occurred */ @Nullable public String simplify(String revstr) @@ -968,7 +972,6 @@ protected void doClose() { getRefDatabase().close(); } - /** {@inheritDoc} */ @Override @NonNull public String toString() { @@ -999,6 +1002,7 @@ public String toString() { * {@code null} if the repository is corrupt and has no HEAD * reference. * @throws java.io.IOException + * if an IO error occurred */ @Nullable public String getFullBranch() throws IOException { @@ -1027,6 +1031,7 @@ public String getFullBranch() throws IOException { * in hex format if the current branch is detached, or {@code null} * if the repository is corrupt and has no HEAD reference. * @throws java.io.IOException + * if an IO error occurred */ @Nullable public String getBranch() throws IOException { @@ -1056,6 +1061,7 @@ public String getBranch() throws IOException { * * @return unmodifiable collection of other known objects. * @throws IOException + * if an IO error occurred */ @NonNull public Set getAdditionalHaves() throws IOException { @@ -1066,11 +1072,12 @@ public Set getAdditionalHaves() throws IOException { * Get a ref by name. * * @param name - * the name of the ref to lookup. Must not be a short-hand - * form; e.g., "master" is not automatically expanded to + * the name of the ref to lookup. Must not be a short-hand form; + * e.g., "master" is not automatically expanded to * "refs/heads/master". * @return the Ref with the given name, or {@code null} if it does not exist * @throws java.io.IOException + * if an IO error occurred * @since 4.2 */ @Nullable @@ -1087,6 +1094,7 @@ public final Ref exactRef(String name) throws IOException { * "refs/heads/master" if "refs/heads/master" already exists. * @return the Ref with the given name, or {@code null} if it does not exist * @throws java.io.IOException + * if an IO error occurred * @since 4.2 */ @Nullable @@ -1162,6 +1170,7 @@ public Ref peel(Ref ref) { * * @return a map with all objects referenced by a peeled ref. * @throws IOException + * if an IO error occurred */ @NonNull public Map> getAllRefsByPeeledObjectId() @@ -1579,6 +1588,7 @@ public File getWorkTree() throws NoWorkTreeException { * changes are detected. * * @throws java.io.IOException + * if an IO error occurred */ public abstract void scanForRepoChanges() throws IOException; @@ -1703,6 +1713,7 @@ public abstract ReflogReader getReflogReader(String refName) * @return a {@link org.eclipse.jgit.lib.ReflogReader} for the supplied ref, * or {@code null} if the ref does not exist. * @throws IOException + * if an IO error occurred * @since 5.13.2 */ public @Nullable ReflogReader getReflogReader(@NonNull Ref ref) @@ -1718,6 +1729,7 @@ public abstract ReflogReader getReflogReader(String refName) * @return a String containing the content of the MERGE_MSG file or * {@code null} if this file doesn't exist * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.errors.NoWorkTreeException * if this is bare, which implies it has no working directory. * See {@link #isBare()}. @@ -1737,6 +1749,7 @@ public String readMergeCommitMsg() throws IOException, NoWorkTreeException { * the message which should be written or null to * delete the file * @throws java.io.IOException + * if an IO error occurred */ public void writeMergeCommitMsg(String msg) throws IOException { File mergeMsgFile = new File(gitDir, Constants.MERGE_MSG); @@ -1751,6 +1764,7 @@ public void writeMergeCommitMsg(String msg) throws IOException { * @return a String containing the content of the COMMIT_EDITMSG file or * {@code null} if this file doesn't exist * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.errors.NoWorkTreeException * if this is bare, which implies it has no working directory. * See {@link #isBare()}. @@ -1770,6 +1784,7 @@ public String readCommitEditMsg() throws IOException, NoWorkTreeException { * the message which should be written or {@code null} to delete * the file * @throws java.io.IOException + * if an IO error occurred * @since 4.0 */ public void writeCommitEditMsg(String msg) throws IOException { @@ -1786,6 +1801,7 @@ public void writeCommitEditMsg(String msg) throws IOException { * {@code null} if this file doesn't exist. Also if the file exists * but is empty {@code null} will be returned * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.errors.NoWorkTreeException * if this is bare, which implies it has no working directory. * See {@link #isBare()}. @@ -1818,6 +1834,7 @@ public List readMergeHeads() throws IOException, NoWorkTreeException { * a list of commits which IDs should be written to * $GIT_DIR/MERGE_HEAD or null to delete the file * @throws java.io.IOException + * if an IO error occurred */ public void writeMergeHeads(List heads) throws IOException { writeHeadsFile(heads, Constants.MERGE_HEAD); @@ -1830,6 +1847,7 @@ public void writeMergeHeads(List heads) throws IOException { * doesn't exist. Also if the file exists but is empty {@code null} * will be returned * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.errors.NoWorkTreeException * if this is bare, which implies it has no working directory. * See {@link #isBare()}. @@ -1854,6 +1872,7 @@ public ObjectId readCherryPickHead() throws IOException, * doesn't exist. Also if the file exists but is empty {@code null} * will be returned * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.errors.NoWorkTreeException * if this is bare, which implies it has no working directory. * See {@link #isBare()}. @@ -1877,6 +1896,7 @@ public ObjectId readRevertHead() throws IOException, NoWorkTreeException { * an object id of the cherry commit or null to * delete the file * @throws java.io.IOException + * if an IO error occurred */ public void writeCherryPickHead(ObjectId head) throws IOException { List heads = (head != null) ? Collections.singletonList(head) @@ -1892,6 +1912,7 @@ public void writeCherryPickHead(ObjectId head) throws IOException { * an object id of the revert commit or null to * delete the file * @throws java.io.IOException + * if an IO error occurred */ public void writeRevertHead(ObjectId head) throws IOException { List heads = (head != null) ? Collections.singletonList(head) @@ -1906,6 +1927,7 @@ public void writeRevertHead(ObjectId head) throws IOException { * an object id of the original HEAD commit or null * to delete the file * @throws java.io.IOException + * if an IO error occurred */ public void writeOrigHead(ObjectId head) throws IOException { List heads = head != null ? Collections.singletonList(head) @@ -1920,6 +1942,7 @@ public void writeOrigHead(ObjectId head) throws IOException { * doesn't exist. Also if the file exists but is empty {@code null} * will be returned * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.errors.NoWorkTreeException * if this is bare, which implies it has no working directory. * See {@link #isBare()}. @@ -1941,6 +1964,7 @@ public ObjectId readOrigHead() throws IOException, NoWorkTreeException { * @return a String containing the content of the SQUASH_MSG file or * {@code null} if this file doesn't exist * @throws java.io.IOException + * if an IO error occurred * @throws NoWorkTreeException * if this is bare, which implies it has no working directory. * See {@link #isBare()}. @@ -1960,6 +1984,7 @@ public String readSquashCommitMsg() throws IOException { * the message which should be written or null to * delete the file * @throws java.io.IOException + * if an IO error occurred */ public void writeSquashCommitMsg(String msg) throws IOException { File squashMsgFile = new File(gitDir, Constants.SQUASH_MSG); @@ -1997,9 +2022,11 @@ private void writeCommitMsg(File msgFile, String msg) throws IOException { * Read a file from the git directory. * * @param filename + * the file to read * @return the raw contents or {@code null} if the file doesn't exist or is * empty * @throws IOException + * if an IO error occurred */ private byte[] readGitDirectoryFile(String filename) throws IOException { File file = new File(getDirectory(), filename); @@ -2021,8 +2048,11 @@ private byte[] readGitDirectoryFile(String filename) throws IOException { * a list of object ids to write or null if the file should be * deleted. * @param filename + * name of the file to write heads to * @throws FileNotFoundException + * if the heads file couldn't be found * @throws IOException + * if an IO error occurred */ private void writeHeadsFile(List heads, String filename) throws FileNotFoundException, IOException { @@ -2052,6 +2082,7 @@ private void writeHeadsFile(List heads, String filename) * true if also comments should be reported * @return the list of steps * @throws java.io.IOException + * if an IO error occurred * @since 3.2 */ @NonNull @@ -2072,6 +2103,7 @@ public List readRebaseTodo(String path, * @param append * whether to append to an existing file or to write a new file * @throws java.io.IOException + * if an IO error occurred * @since 3.2 */ public void writeRebaseTodoFile(String path, List steps, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/StoredConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/StoredConfig.java index 9ddfd59a1..a10eb0c58 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/StoredConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/StoredConfig.java @@ -57,7 +57,6 @@ public StoredConfig(Config defaultConfig) { */ public abstract void save() throws IOException; - /** {@inheritDoc} */ @Override public void clear() { super.clear(); 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 3ba33422c..6fb8f326c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymbolicRef.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/SymbolicRef.java @@ -59,20 +59,17 @@ public SymbolicRef(@NonNull String refName, @NonNull Ref target, this.updateIndex = updateIndex; } - /** {@inheritDoc} */ @Override @NonNull public String getName() { return name; } - /** {@inheritDoc} */ @Override public boolean isSymbolic() { return true; } - /** {@inheritDoc} */ @Override @NonNull public Ref getLeaf() { @@ -82,35 +79,30 @@ public Ref getLeaf() { return dst; } - /** {@inheritDoc} */ @Override @NonNull public Ref getTarget() { return target; } - /** {@inheritDoc} */ @Override @Nullable public ObjectId getObjectId() { return getLeaf().getObjectId(); } - /** {@inheritDoc} */ @Override @NonNull public Storage getStorage() { return Storage.LOOSE; } - /** {@inheritDoc} */ @Override @Nullable public ObjectId getPeeledObjectId() { return getLeaf().getPeeledObjectId(); } - /** {@inheritDoc} */ @Override public boolean isPeeled() { return getLeaf().isPeeled(); @@ -128,7 +120,6 @@ public long getUpdateIndex() { return updateIndex; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java index facb4a54b..bbc614448 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TagBuilder.java @@ -223,7 +223,6 @@ public byte[] toByteArray() { } } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java index 85aa0b663..98ea2f97a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TextProgressMonitor.java @@ -45,7 +45,6 @@ public TextProgressMonitor(Writer out) { this.write = true; } - /** {@inheritDoc} */ @Override protected void onUpdate(String taskName, int workCurr, Duration duration) { StringBuilder s = new StringBuilder(); @@ -53,7 +52,6 @@ protected void onUpdate(String taskName, int workCurr, Duration duration) { send(s); } - /** {@inheritDoc} */ @Override protected void onEndTask(String taskName, int workCurr, Duration duration) { StringBuilder s = new StringBuilder(); @@ -73,7 +71,6 @@ private void format(StringBuilder s, String taskName, int workCurr, appendDuration(s, duration); } - /** {@inheritDoc} */ @Override protected void onUpdate(String taskName, int cmp, int totalWork, int pcnt, Duration duration) { @@ -82,7 +79,6 @@ protected void onUpdate(String taskName, int cmp, int totalWork, int pcnt, send(s); } - /** {@inheritDoc} */ @Override protected void onEndTask(String taskName, int cmp, int totalWork, int pcnt, Duration duration) { 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 e55395556..05eacdcd6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ThreadSafeProgressMonitor.java @@ -55,7 +55,6 @@ public ThreadSafeProgressMonitor(ProgressMonitor pm) { this.process = new Semaphore(0); } - /** {@inheritDoc} */ @Override public void start(int totalTasks) { if (!isMainThread()) @@ -63,7 +62,6 @@ public void start(int totalTasks) { pm.start(totalTasks); } - /** {@inheritDoc} */ @Override public void beginTask(String title, int totalWork) { if (!isMainThread()) @@ -132,14 +130,12 @@ private void doUpdates() { pm.update(cnt); } - /** {@inheritDoc} */ @Override public void update(int completed) { if (0 == pendingUpdates.getAndAdd(completed)) process.release(); } - /** {@inheritDoc} */ @Override public boolean isCancelled() { lock.lock(); @@ -150,7 +146,6 @@ public boolean isCancelled() { } } - /** {@inheritDoc} */ @Override public void endTask() { if (!isMainThread()) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java index e1f868483..c3c170a2c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java @@ -332,7 +332,6 @@ public byte[] toByteArray() { } } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TypedConfigGetter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TypedConfigGetter.java index c4eb8f10d..0c03adcab 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/TypedConfigGetter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/TypedConfigGetter.java @@ -57,6 +57,8 @@ boolean getBoolean(Config config, String section, String subsection, /** * Parse an enumeration from a git {@link Config}. * + * @param + * type of the enum * @param config * to get the value from * @param all diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/EolAwareOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/EolAwareOutputStream.java index e44970abf..1ddac18e5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/EolAwareOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/EolAwareOutputStream.java @@ -79,14 +79,12 @@ boolean isBeginln() { return bol; } - /** {@inheritDoc} */ @Override public void write(int val) throws IOException { out.write(val); bol = (val == '\n'); } - /** {@inheritDoc} */ @Override public void write(byte[] buf, int pos, int cnt) throws IOException { if (cnt > 0) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java index 80607351a..abca813c1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeAlgorithm.java @@ -90,10 +90,16 @@ private static boolean isEndEdit(Edit edit) { /** * Does the three way merge between a common base and two sequences. * - * @param cmp comparison method for this execution. - * @param base the common base sequence - * @param ours the first sequence to be merged - * @param theirs the second sequence to be merged + * @param + * type of the sequences + * @param cmp + * comparison method for this execution. + * @param base + * the common base sequence + * @param ours + * the first sequence to be merged + * @param theirs + * the second sequence to be merged * @return the resulting content */ public MergeResult merge( diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java index 18b0ad92c..baf5d2771 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeFormatter.java @@ -43,6 +43,7 @@ public class MergeFormatter { * the name of the character set used when writing conflict * metadata * @throws java.io.IOException + * if an IO error occurred * @deprecated Use * {@link #formatMerge(OutputStream, MergeResult, List, Charset)} * instead. @@ -73,6 +74,7 @@ public void formatMerge(OutputStream out, MergeResult res, * @param charset * the character set used when writing conflict metadata * @throws java.io.IOException + * if an IO error occurred * @since 5.2 */ public void formatMerge(OutputStream out, MergeResult res, @@ -102,6 +104,7 @@ public void formatMerge(OutputStream out, MergeResult res, * the name of the character set used when writing conflict * metadata * @throws java.io.IOException + * if an IO error occurred * @deprecated use * {@link #formatMerge(OutputStream, MergeResult, String, String, String, Charset)} * instead. @@ -134,6 +137,7 @@ public void formatMerge(OutputStream out, MergeResult res, String baseName, * @param charset * the character set used when writing conflict metadata * @throws java.io.IOException + * if an IO error occurred * @since 5.2 */ @SuppressWarnings("unchecked") 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 20fc3c339..acf955303 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/MergeResult.java @@ -97,7 +97,6 @@ public List getSequences() { static final ConflictState[] states = ConflictState.values(); - /** {@inheritDoc} */ @Override public Iterator iterator() { return new Iterator<>() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java index df6068925..1162a615f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java @@ -123,6 +123,7 @@ protected RevCommit getBaseCommit(RevCommit a, RevCommit b) * synthetic merge base this commit is visible only the merger's * RevWalk and will not be in the repository. * @throws java.io.IOException + * if an IO error occurred * @throws IncorrectObjectTypeException * one of the input objects is not a commit. * @throws NoMergeBaseException @@ -213,6 +214,7 @@ protected RevCommit getBaseCommit(RevCommit a, RevCommit b, int callDepth) * the list of parent commits * @return a new commit visible only within this merger's RevWalk. * @throws IOException + * if an IO error occurred */ private RevCommit createCommitForTree(ObjectId tree, List parents) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java index e56513d4e..2b2ab023b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java @@ -466,7 +466,6 @@ private void addCheckoutMetadata(Map map, /** * Detects if CRLF conversion has been configured. *

    - *

    * See {@link EolStreamTypeUtil#detectStreamType} for more info. * * @param attributes @@ -904,7 +903,6 @@ public void setContentMergeStrategy(ContentMergeStrategy strategy) { : strategy; } - /** {@inheritDoc} */ @Override protected boolean mergeImpl() throws IOException { return mergeTrees(mergeBase(), sourceTrees[0], sourceTrees[1], @@ -915,18 +913,23 @@ protected boolean mergeImpl() throws IOException { * adds a new path with the specified stage to the index builder * * @param path + * the new path * @param p + * canonical tree parser * @param stage - * @param lastMod + * the stage + * @param lastModified + * lastModified attribute of the file * @param len + * file length * @return the entry which was added to the index */ private DirCacheEntry add(byte[] path, CanonicalTreeParser p, int stage, - Instant lastMod, long len) { + Instant lastModified, long len) { if (p != null && !p.getEntryFileMode().equals(FileMode.TREE)) { return workTreeUpdater.addExistingToIndex(p.getEntryObjectId(), path, p.getEntryFileMode(), stage, - lastMod, (int) len); + lastModified, (int) len); } return null; } @@ -1056,6 +1059,7 @@ protected void addDeletion(String path, boolean isFile, * didn't match ours or the working-dir file was dirty and a * conflict occurred * @throws java.io.IOException + * if an IO error occurred * @since 6.1 */ protected boolean processEntry(CanonicalTreeParser base, @@ -1432,15 +1436,21 @@ private static MergeResult createGitLinksMergeResult( * specified as null then an empty text will be used instead. * * @param base + * used to parse base tree * @param ours + * used to parse ours tree * @param theirs + * used to parse theirs tree * @param attributes + * attributes for the different stages * @param strategy + * merge strategy * * @return the result of the content merge * @throws BinaryBlobException * if any of the blobs looks like a binary blob * @throws IOException + * if an IO error occurred */ private MergeResult contentMerge(CanonicalTreeParser base, CanonicalTreeParser ours, CanonicalTreeParser theirs, @@ -1516,11 +1526,17 @@ private boolean isWorktreeDirty(WorkingTreeIterator work, * correct stages to the index. * * @param base + * used to parse base tree * @param ours + * used to parse ours tree * @param theirs + * used to parse theirs tree * @param result + * merge result * @param attributes + * the file's attributes * @throws IOException + * if an IO error occurred */ private void updateIndex(CanonicalTreeParser base, CanonicalTreeParser ours, CanonicalTreeParser theirs, @@ -1571,6 +1587,7 @@ private void updateIndex(CanonicalTreeParser base, * the files .gitattributes entries * @return the working tree file to which the merged content was written. * @throws IOException + * if an IO error occurred */ private File writeMergedFile(TemporaryBuffer rawMerged, Attributes attributes) @@ -1659,7 +1676,6 @@ private static boolean isGitLink(int mode) { return FileMode.GITLINK.equals(mode); } - /** {@inheritDoc} */ @Override public ObjectId getResultTreeId() { return (resultTree == null) ? null : resultTree.toObjectId(); @@ -1819,6 +1835,7 @@ public void setWorkingTreeIterator(WorkingTreeIterator workingTreeIterator) { * content-merge conflicts. * @return whether the trees merged cleanly * @throws java.io.IOException + * if an IO error occurred * @since 3.5 */ protected boolean mergeTrees(AbstractTreeIterator baseTree, @@ -1878,6 +1895,7 @@ protected boolean mergeTrees(AbstractTreeIterator baseTree, * {@link org.eclipse.jgit.merge.ResolveMerger#mergeTrees(AbstractTreeIterator, RevTree, RevTree, boolean)} * @return Whether the trees merged cleanly. * @throws java.io.IOException + * if an IO error occurred * @since 3.5 */ protected boolean mergeTreeWalk(TreeWalk treeWalk, boolean ignoreConflicts) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyOneSided.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyOneSided.java index 7055ccd12..6064ebe32 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyOneSided.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyOneSided.java @@ -43,25 +43,21 @@ protected StrategyOneSided(String name, int index) { treeIndex = index; } - /** {@inheritDoc} */ @Override public String getName() { return strategyName; } - /** {@inheritDoc} */ @Override public Merger newMerger(Repository db) { return new OneSide(db, treeIndex); } - /** {@inheritDoc} */ @Override public Merger newMerger(Repository db, boolean inCore) { return new OneSide(db, treeIndex); } - /** {@inheritDoc} */ @Override public Merger newMerger(ObjectInserter inserter, Config config) { return new OneSide(inserter, treeIndex); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyRecursive.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyRecursive.java index c9512edf6..a74bfc037 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyRecursive.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyRecursive.java @@ -21,25 +21,21 @@ */ public class StrategyRecursive extends StrategyResolve { - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db) { return new RecursiveMerger(db, false); } - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db, boolean inCore) { return new RecursiveMerger(db, inCore); } - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(ObjectInserter inserter, Config config) { return new RecursiveMerger(inserter, config); } - /** {@inheritDoc} */ @Override public String getName() { return "recursive"; //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyResolve.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyResolve.java index 5991ef68a..a686fd096 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyResolve.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategyResolve.java @@ -19,25 +19,21 @@ */ public class StrategyResolve extends ThreeWayMergeStrategy { - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db) { return new ResolveMerger(db, false); } - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db, boolean inCore) { return new ResolveMerger(db, inCore); } - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(ObjectInserter inserter, Config config) { return new ResolveMerger(inserter, config); } - /** {@inheritDoc} */ @Override public String getName() { return "resolve"; //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java index ff40fc1d6..c3180abd3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/StrategySimpleTwoWayInCore.java @@ -43,26 +43,22 @@ protected StrategySimpleTwoWayInCore() { // } - /** {@inheritDoc} */ @Override public String getName() { return "simple-two-way-in-core"; //$NON-NLS-1$ } - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db) { return new InCoreMerger(db); } - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db, boolean inCore) { // This class is always inCore, so ignore the parameter return newMerger(db); } - /** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(ObjectInserter inserter, Config config) { return new InCoreMerger(inserter); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMergeStrategy.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMergeStrategy.java index 411789fd9..8cefa6566 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMergeStrategy.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMergeStrategy.java @@ -16,11 +16,9 @@ * A merge strategy to merge 2 trees, using a common base ancestor tree. */ public abstract class ThreeWayMergeStrategy extends MergeStrategy { - /** {@inheritDoc} */ @Override public abstract ThreeWayMerger newMerger(Repository db); - /** {@inheritDoc} */ @Override public abstract ThreeWayMerger newMerger(Repository db, boolean inCore); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMerger.java index f283edee0..68a1b5e50 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ThreeWayMerger.java @@ -88,7 +88,6 @@ public void setBase(AnyObjectId id) throws MissingObjectException, } } - /** {@inheritDoc} */ @Override public boolean merge(AnyObjectId... tips) throws IOException { if (tips.length != 2) @@ -96,7 +95,6 @@ public boolean merge(AnyObjectId... tips) throws IOException { return super.merge(tips); } - /** {@inheritDoc} */ @Override public ObjectId getBaseCommitId() { return baseCommitId; @@ -108,6 +106,7 @@ public ObjectId getBaseCommitId() { * @return an iterator over the caller-specified merge base, or the natural * merge base of the two input commits. * @throws java.io.IOException + * if an IO error occurred */ protected AbstractTreeIterator mergeBase() throws IOException { if (baseTree != null) { 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 881873de6..16d17637e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/nls/NLS.java @@ -83,6 +83,8 @@ private static NLS useJVMDefaultInternal() { * injected as described in the * {@link org.eclipse.jgit.nls.TranslationBundle}. * + * @param + * type of the translation bundle * @param type * required bundle type * @return an instance of the required bundle type 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 bde0b9e44..b65f28c91 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/DefaultNoteMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/DefaultNoteMerger.java @@ -34,7 +34,6 @@ */ public class DefaultNoteMerger implements NoteMerger { - /** {@inheritDoc} */ @Override public Note merge(Note base, Note ours, Note theirs, ObjectReader reader, ObjectInserter inserter) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/notes/Note.java b/org.eclipse.jgit/src/org/eclipse/jgit/notes/Note.java index c35696323..2f719bf45 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/Note.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/Note.java @@ -45,7 +45,6 @@ void setData(ObjectId newData) { data = newData; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 93adf36a3..b87275021 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java @@ -166,7 +166,6 @@ private NoteMap(ObjectReader reader) { this.reader = reader; } - /** {@inheritDoc} */ @Override public Iterator iterator() { try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMapMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMapMerger.java index a6ea523a7..79ceb1316 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMapMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMapMerger.java @@ -94,6 +94,7 @@ public NoteMapMerger(Repository db) { * theirs version of the note tree * @return merge result as a new NoteMap * @throws java.io.IOException + * if an IO error occurred */ public NoteMap merge(NoteMap base, NoteMap ours, NoteMap theirs) throws IOException { @@ -113,11 +114,16 @@ public NoteMap merge(NoteMap base, NoteMap ours, NoteMap theirs) * between base, ours and theirs. * * @param treeDepth + * depth of the tree * @param base + * base version * @param ours + * ours version * @param theirs + * theirs version * @return merge result as an InMemoryBucket * @throws IOException + * if an IO error occurred */ private InMemoryNoteBucket merge(int treeDepth, InMemoryNoteBucket base, InMemoryNoteBucket ours, InMemoryNoteBucket theirs) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java index 4ba7cca51..e29af614a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedFileHeader.java @@ -40,7 +40,6 @@ public class CombinedFileHeader extends FileHeader { super(b, offset); } - /** {@inheritDoc} */ @Override @SuppressWarnings("unchecked") public List getHunks() { @@ -48,9 +47,6 @@ public List getHunks() { } /** - * {@inheritDoc} - *

    - * * @return number of ancestor revisions mentioned in this diff. */ @Override @@ -60,7 +56,7 @@ public int getParentCount() { /** * {@inheritDoc} - *

    + * * @return get the file mode of the first parent. */ @Override @@ -81,7 +77,6 @@ public FileMode getOldMode(int nthParent) { /** * {@inheritDoc} - *

    * * @return get the object id of the first parent. */ @@ -101,7 +96,6 @@ public AbbreviatedObjectId getOldId(int nthParent) { return oldIds[nthParent]; } - /** {@inheritDoc} */ @Override public String getScriptText(Charset ocs, Charset ncs) { final Charset[] cs = new Charset[getParentCount() + 1]; @@ -110,11 +104,6 @@ public String getScriptText(Charset ocs, Charset ncs) { return getScriptText(cs); } - /** - * {@inheritDoc} - *

    - * Convert the patch script for this file into a string. - */ @Override public String getScriptText(Charset[] charsetGuess) { return super.getScriptText(charsetGuess); @@ -156,7 +145,6 @@ int parseGitHeaders(int ptr, int end) { return ptr; } - /** {@inheritDoc} */ @Override protected void parseIndexLine(int ptr, int eol) { // "index $asha1,$bsha1..$csha1" @@ -178,7 +166,6 @@ protected void parseIndexLine(int ptr, int eol) { oldModes = new FileMode[oldIds.length]; } - /** {@inheritDoc} */ @Override protected void parseNewFileMode(int ptr, int eol) { for (int i = 0; i < oldModes.length; i++) 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 263b1b9dd..49cf49986 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/CombinedHunkHeader.java @@ -45,13 +45,11 @@ public AbbreviatedObjectId getId() { } } - /** {@inheritDoc} */ @Override public CombinedFileHeader getFileHeader() { return (CombinedFileHeader) super.getFileHeader(); } - /** {@inheritDoc} */ @Override public OldImage getOldImage() { return getOldImage(0); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java index 1e6fb780b..a47b73dc3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FileHeader.java @@ -187,6 +187,13 @@ public String getScriptText(Charset oldCharset, Charset newCharset) { return getScriptText(new Charset[] { oldCharset, newCharset }); } + /** + * Convert the patch script for this file into a string. + * + * @param charsetGuess + * hint which charset is used + * @return the patch script, as a Unicode string. + */ String getScriptText(Charset[] charsetGuess) { if (getHunks().isEmpty()) { // If we have no hunks then we can safely assume the entire diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FormatError.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FormatError.java index 5618a7178..8d21b6dab 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/FormatError.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/FormatError.java @@ -91,7 +91,6 @@ public String getLineText() { return RawParseUtils.decode(UTF_8, buf, offset, eol); } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder r = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java index 4b59fcfc6..1359f6606 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java @@ -409,7 +409,6 @@ void skipLine(final String[] text, final int[] offsets, offsets[fileIdx] = end < 0 ? s.length() : end + 1; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java b/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java index da698d6bf..e9c119279 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java @@ -251,6 +251,7 @@ public Result applyPatch(InputStream patchInput) * the patch to apply. * @return the result of the patch * @throws IOException + * if an IO error occurred * @since 6.6 */ public Result applyPatch(Patch p) throws IOException { @@ -423,6 +424,7 @@ private boolean verifyExistence(FileHeader fh, File src, File dest, * @param result * The patch application result. * @throws IOException + * if an IO error occurred */ private void apply(String pathWithOriginalContent, DirCache dirCache, DirCacheBuilder dirCacheBuilder, @Nullable File f, FileHeader fh, Result result) @@ -777,7 +779,9 @@ private static class ContentStreamLoader { * The patch application result * @return a loader for the new content, or null if invalid. * @throws IOException + * if an IO error occurred * @throws UnsupportedOperationException + * if an operation isn't supported */ private @Nullable ContentStreamLoader applyBinary(String path, File f, FileHeader fh, StreamSupplier inputSupplier, ObjectId id, Result result) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java index c11fca13d..fa109e820 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommit.java @@ -179,7 +179,6 @@ public final L getLane() { return (L) lane; } - /** {@inheritDoc} */ @Override public void reset() { forkingOffLanes = NO_LANES; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java index 458f24098..3177de17e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotCommitList.java @@ -49,7 +49,6 @@ public class PlotCommitList extends private final HashMap laneLength = new HashMap<>( 32); - /** {@inheritDoc} */ @Override public void clear() { super.clear(); @@ -59,7 +58,6 @@ public void clear() { laneLength.clear(); } - /** {@inheritDoc} */ @Override public void source(RevWalk w) { if (!(w instanceof PlotWalk)) @@ -91,7 +89,6 @@ public void findPassingThrough(final PlotCommit currCommit, result.add((L) p); } - /** {@inheritDoc} */ @SuppressWarnings("ReferenceEquality") @Override protected void enter(int index, PlotCommit currCommit) { @@ -184,6 +181,7 @@ private void continueActiveLanes(PlotCommit currCommit) { * @param index * the index of currCommit in the list * @param currCommit + * the current commit * @param childOnLane * the direct child on the same lane as currCommit, * may be null if currCommit is the first commit on @@ -287,8 +285,11 @@ private PlotLane handleMerge(final int index, final PlotCommit currCommit, * All blockades on the lane must be resolved before calling this method. * * @param commitIndex + * commit index * @param child + * child to connect * @param laneToContinue + * lane to continue */ @SuppressWarnings("ReferenceEquality") private void drawLaneToChild(final int commitIndex, PlotCommit child, 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 058233865..0f6bd2d6c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revplot/PlotWalk.java @@ -49,7 +49,6 @@ public class PlotWalk extends RevWalk { private Repository repository; - /** {@inheritDoc} */ @Override public void dispose() { super.dispose(); @@ -83,6 +82,7 @@ public PlotWalk(Repository repo) { * @param refs * additional refs * @throws java.io.IOException + * if an IO error occurred */ public void addAdditionalRefs(Iterable refs) throws IOException { for (Ref ref : refs) { @@ -97,7 +97,6 @@ public void addAdditionalRefs(Iterable refs) throws IOException { } } - /** {@inheritDoc} */ @Override public void sort(RevSort s, boolean use) { if (s == RevSort.TOPO && !use) @@ -105,13 +104,11 @@ public void sort(RevSort s, boolean use) { super.sort(s, use); } - /** {@inheritDoc} */ @Override protected RevCommit createCommit(AnyObjectId id) { return new PlotCommit(id); } - /** {@inheritDoc} */ @Override public RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { 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 dda108bc6..73ae62a23 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/AbstractRevQueue.java @@ -79,8 +79,6 @@ public final void addParents(RevCommit c, RevFlag queueControl) { } /** - * {@inheritDoc} - *

    * Remove the first commit from the queue. */ @Override 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 cdd8073d6..e855d8f70 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/BlockRevQueue.java @@ -45,8 +45,6 @@ protected BlockRevQueue(boolean firstParent) { } /** - * {@inheritDoc} - *

    * Reconfigure this queue to share the same free list as another. *

    * Multiple revision queues can be connected to the same free list, making @@ -56,6 +54,11 @@ protected BlockRevQueue(boolean firstParent) { *

    * Free lists are not thread-safe. Applications must ensure that all queues * sharing the same free list are doing so from only a single thread. + * + * @param q + * another FIFO queue that wants to share our queue's free list. + * + * @see Generator#shareFreeList */ @Override public void shareFreeList(BlockRevQueue q) { 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 0cabf0705..4ec9afc71 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DateRevQueue.java @@ -56,7 +56,6 @@ public DateRevQueue() { } } - /** {@inheritDoc} */ @Override public void add(RevCommit c) { sinceLastIndex++; @@ -102,7 +101,6 @@ else if (t > when) } } - /** {@inheritDoc} */ @Override public RevCommit next() { final Entry q = head; @@ -139,7 +137,6 @@ public RevCommit peek() { return head != null ? head.commit : null; } - /** {@inheritDoc} */ @Override public void clear() { head = null; @@ -173,7 +170,6 @@ int outputType() { return outputType | SORT_COMMIT_TIME_DESC; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder s = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java index ec0824cb0..664f8fa3a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthGenerator.java @@ -55,10 +55,15 @@ class DepthGenerator extends Generator { /** * @param w - * @param s Parent generator + * walk used for depth filtering + * @param s + * Parent generator * @throws MissingObjectException + * if an object is missing * @throws IncorrectObjectTypeException + * if an object has an unexpected type * @throws IOException + * if an IO error occurred */ DepthGenerator(DepthWalk w, Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { 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 5277563ac..f74666bd8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java @@ -159,8 +159,11 @@ public RevWalk(ObjectReader or, int depth) { * @param c * Commit to mark * @throws IOException + * if an IO error occurred * @throws IncorrectObjectTypeException + * if object has an unexpected type * @throws MissingObjectException + * if object is missing */ public void markRoot(RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -289,8 +292,11 @@ public ObjectWalk(ObjectReader or, int depth) { * @param o * Commit to mark * @throws IOException + * if an IO error occurred * @throws IncorrectObjectTypeException + * if object has an unexpected type * @throws MissingObjectException + * if object is missing */ public void markRoot(RevObject o) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -313,8 +319,11 @@ public void markRoot(RevObject o) throws MissingObjectException, * @param c * Commit to mark * @throws MissingObjectException + * if object is missing * @throws IncorrectObjectTypeException + * if object has an unexpected type * @throws IOException + * if an IO error occurred */ public void markUnshallow(RevObject c) throws MissingObjectException, IncorrectObjectTypeException, IOException { 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 0f8eddd6d..996745c15 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FIFORevQueue.java @@ -37,7 +37,6 @@ public FIFORevQueue() { super(s); } - /** {@inheritDoc} */ @Override public void add(RevCommit c) { Block b = tail; @@ -82,7 +81,6 @@ public void unpop(RevCommit c) { head = b; } - /** {@inheritDoc} */ @Override public RevCommit next() { final Block b = head; @@ -99,7 +97,6 @@ public RevCommit next() { return c; } - /** {@inheritDoc} */ @Override public void clear() { head = null; @@ -135,7 +132,6 @@ void removeFlag(int f) { } } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder s = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java index 3b54123f0..14a34375c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FollowFilter.java @@ -77,7 +77,6 @@ public String getPath() { return path.getPath(); } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, @@ -85,19 +84,16 @@ public boolean include(TreeWalk walker) return path.include(walker) && ANY_DIFF.include(walker); } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return path.shouldBeRecursive() || ANY_DIFF.shouldBeRecursive(); } - /** {@inheritDoc} */ @Override public TreeFilter clone() { return new FollowFilter(path.clone(), cfg); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterKey.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterKey.java index 74e4c1edb..af5079401 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterKey.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterKey.java @@ -51,7 +51,6 @@ public String getName() { return name; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java index 3d128a6bd..676573c2f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/FooterLine.java @@ -117,7 +117,6 @@ public String getEmailAddress() { return RawParseUtils.decode(enc, buffer, lt, gt - 1); } - /** {@inheritDoc} */ @Override public String toString() { return getKey() + ": " + getValue(); //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java index 3493dcfb4..d97812ff4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/Generator.java @@ -71,8 +71,11 @@ void shareFreeList(BlockRevQueue q) { * * @return next available commit; null if no more are to be returned. * @throws MissingObjectException + * if an object is missing * @throws IncorrectObjectTypeException + * if an object has an unexpected type * @throws IOException + * if an IO error occurred */ abstract RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException; 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 4773ca842..ae67ca759 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/LIFORevQueue.java @@ -34,7 +34,6 @@ public LIFORevQueue() { super(s); } - /** {@inheritDoc} */ @Override public void add(RevCommit c) { Block b = head; @@ -47,7 +46,6 @@ public void add(RevCommit c) { b.unpop(c); } - /** {@inheritDoc} */ @Override public RevCommit next() { final Block b = head; @@ -62,7 +60,6 @@ public RevCommit next() { return c; } - /** {@inheritDoc} */ @Override public void clear() { head = null; @@ -89,7 +86,6 @@ boolean anybodyHasFlag(int f) { return false; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder s = new StringBuilder(); 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 4e48a5c32..64b2fcd66 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java @@ -300,14 +300,12 @@ else if (o instanceof RevTree) addObject(o); } - /** {@inheritDoc} */ @Override public void sort(RevSort s) { super.sort(s); boundary = hasRevSort(RevSort.BOUNDARY); } - /** {@inheritDoc} */ @Override public void sort(RevSort s, boolean use) { super.sort(s, use); @@ -357,7 +355,6 @@ public void setVisitationPolicy(VisitationPolicy policy) { visitationPolicy = requireNonNull(policy); } - /** {@inheritDoc} */ @Override public RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -762,7 +759,6 @@ private void growPathBuf(int ptr) { pathBuf = newBuf; } - /** {@inheritDoc} */ @Override public void dispose() { super.dispose(); @@ -771,7 +767,6 @@ public void dispose() { freeVisit = null; } - /** {@inheritDoc} */ @Override protected void reset(int retainFlags) { super.reset(retainFlags); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevBlob.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevBlob.java index f5abbb870..1f81b6a92 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevBlob.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevBlob.java @@ -33,7 +33,6 @@ protected RevBlob(AnyObjectId id) { super(id); } - /** {@inheritDoc} */ @Override public final int getType() { return Constants.OBJ_BLOB; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java index b64c9ce90..e32f28ebb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommit.java @@ -222,7 +222,6 @@ void parseCanonical(RevWalk walk, byte[] raw) throws IOException { flags |= PARSED; } - /** {@inheritDoc} */ @Override public final int getType() { return Constants.OBJ_COMMIT; @@ -713,7 +712,6 @@ public final void disposeBody() { buffer = null; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder s = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitCG.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitCG.java index 4d3664da1..3846ca579 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitCG.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitCG.java @@ -44,7 +44,6 @@ protected RevCommitCG(AnyObjectId id, int graphPosition) { this.graphPosition = graphPosition; } - /** {@inheritDoc} */ @Override void parseCanonical(RevWalk walk, byte[] raw) throws IOException { if (walk.isRetainBody()) { @@ -53,7 +52,6 @@ void parseCanonical(RevWalk walk, byte[] raw) throws IOException { parseInGraph(walk); } - /** {@inheritDoc} */ @Override void parseHeaders(RevWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -98,7 +96,6 @@ private void parseInGraph(RevWalk walk) throws IOException { flags |= PARSED; } - /** {@inheritDoc} */ @Override int getGeneration() { return generation; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java index 59213a8e6..58f5d425c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevCommitList.java @@ -25,7 +25,6 @@ public class RevCommitList extends RevObjectList { private RevWalk walker; - /** {@inheritDoc} */ @Override public void clear() { super.clear(); @@ -313,7 +312,6 @@ public void fillTo(int highMark) throws MissingObjectException, * walker specified by {@link #source(RevWalk)} is pumped until the * specified commit is loaded. Callers can test the final size of the list * by {@link #size()} to determine if the high water mark specified was met. - *

    * * @param commitToLoad * commit the caller wants this list to contain when the fill 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 a0160ddbe..3221bf6e8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevFlag.java @@ -67,7 +67,6 @@ public RevWalk getRevWalk() { return walker; } - /** {@inheritDoc} */ @Override public String toString() { return name; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java index 4d2684a0f..55ea30d24 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java @@ -132,7 +132,6 @@ public final void remove(RevFlagSet set) { flags &= ~set.mask; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder s = new StringBuilder(); 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 0393f5595..ad8aeedeb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObjectList.java @@ -47,7 +47,6 @@ public RevObjectList() { // Initialized above. } - /** {@inheritDoc} */ @Override public void add(int index, E element) { if (index != size) @@ -58,7 +57,6 @@ public void add(int index, E element) { size++; } - /** {@inheritDoc} */ @Override @SuppressWarnings("unchecked") public E set(int index, E element) { @@ -80,7 +78,6 @@ public E set(int index, E element) { return (E) old; } - /** {@inheritDoc} */ @Override @SuppressWarnings("unchecked") public E get(int index) { @@ -95,13 +92,11 @@ public E get(int index) { return s != null ? (E) s.contents[index] : null; } - /** {@inheritDoc} */ @Override public int size() { return size; } - /** {@inheritDoc} */ @Override public void clear() { contents = new Block(0); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java index b9d145008..75dbd5774 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTag.java @@ -149,7 +149,6 @@ void parseCanonical(RevWalk walk, byte[] rawTag) flags |= PARSED; } - /** {@inheritDoc} */ @Override public final int getType() { return Constants.OBJ_TAG; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTree.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTree.java index 8119af468..d81af0c02 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTree.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevTree.java @@ -33,7 +33,6 @@ protected RevTree(AnyObjectId id) { super(id); } - /** {@inheritDoc} */ @Override public final int getType() { return Constants.OBJ_TREE; 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 3737c6b67..27a09f495 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java @@ -220,7 +220,6 @@ public RevWalk(Repository repo) { /** * Create a new revision walker for a given repository. - *

    * * @param or * the reader the walker will obtain data from. The reader is not @@ -454,7 +453,6 @@ public boolean isMergedInto(RevCommit base, RevCommit tip) *

    * A commit is merged into a ref if we can find a path of commits that leads * from that specific ref and ends at commit. - *

    * * @param commit * commit the caller thinks is reachable from refs. @@ -476,7 +474,6 @@ public List getMergedInto(RevCommit commit, Collection refs) *

    * A commit is merged into a ref if we can find a path of commits that leads * from that specific ref and ends at commit. - *

    * * @param commit * commit the caller thinks is reachable from refs. @@ -1197,6 +1194,8 @@ CommitGraph commitGraph() { /** * Asynchronous object parsing. * + * @param + * Type of returned {@code ObjectId} * @param objectIds * objects to open from the object store. The supplied collection * must not be modified until the queue has finished. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java index e52e91631..4bfe2fda0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalkUtils.java @@ -51,8 +51,11 @@ private RevWalkUtils() { * should be done until there are no more commits * @return the number of commits * @throws org.eclipse.jgit.errors.MissingObjectException + * if object is missing * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException + * if object has unexpected type * @throws java.io.IOException + * if an IO error occurred */ public static int count(final RevWalk walk, final RevCommit start, final RevCommit end) throws MissingObjectException, @@ -80,8 +83,11 @@ public static int count(final RevWalk walk, final RevCommit start, * should be done until there are no more commits * @return the commits found * @throws org.eclipse.jgit.errors.MissingObjectException + * if object is missing * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException + * if object has unexpected type * @throws java.io.IOException + * if an IO error occurred */ public static List find(final RevWalk walk, final RevCommit start, final RevCommit end) @@ -116,8 +122,11 @@ public static List find(final RevWalk walk, * the set of branches we want to see reachability from * @return the list of branches a given commit is reachable from * @throws org.eclipse.jgit.errors.MissingObjectException + * if object is missing * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException + * if object has unexpected type * @throws java.io.IOException + * if an IO error occurred */ public static List findBranchesReachableFrom(RevCommit commit, RevWalk revWalk, Collection refs) @@ -147,8 +156,11 @@ public static List findBranchesReachableFrom(RevCommit commit, * the callback for progress and cancellation * @return the list of branches a given commit is reachable from * @throws org.eclipse.jgit.errors.MissingObjectException + * if object is missing * @throws org.eclipse.jgit.errors.IncorrectObjectTypeException + * if object has unexpected type * @throws java.io.IOException + * if an IO error occurred * @since 5.4 */ public static List findBranchesReachableFrom(RevCommit commit, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java index 2c88bb872..4a93f4d74 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RewriteGenerator.java @@ -101,9 +101,13 @@ RevCommit next() throws MissingObjectException, * of this commit by the previous {@link PendingGenerator}. * * @param c + * given commit * @throws MissingObjectException + * if an object is missing * @throws IncorrectObjectTypeException + * if an object has an unexpected type * @throws IOException + * if an IO error occurred */ private void applyFilterToParents(RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoNonIntermixSortGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoNonIntermixSortGenerator.java index 452545a04..c9d8ff90f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoNonIntermixSortGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoNonIntermixSortGenerator.java @@ -33,8 +33,11 @@ class TopoNonIntermixSortGenerator extends Generator { * @param s * generator to pull all commits out of, and into this buffer. * @throws MissingObjectException + * if an object is missing * @throws IncorrectObjectTypeException + * if an object has an unexpected type * @throws IOException + * if an IO error occurred */ TopoNonIntermixSortGenerator(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java index 4739f78fc..950b0a45b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java @@ -33,8 +33,11 @@ class TopoSortGenerator extends Generator { * @param s * generator to pull all commits out of, and into this buffer. * @throws MissingObjectException + * if an object is missing * @throws IncorrectObjectTypeException + * if an object has an unexpected type * @throws IOException + * if an IO error occurred */ TopoSortGenerator(Generator s) throws MissingObjectException, IncorrectObjectTypeException, IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java index f921449ff..98bb5884f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TreeRevFilter.java @@ -92,13 +92,11 @@ public TreeRevFilter(RevWalk walker, TreeFilter t) { this.rewriteFlag = rewriteFlag; } - /** {@inheritDoc} */ @Override public RevFilter clone() { throw new UnsupportedOperationException(); } - /** {@inheritDoc} */ @Override public boolean include(RevWalk walker, RevCommit c) throws StopWalkException, MissingObjectException, @@ -241,7 +239,6 @@ public boolean include(RevWalk walker, RevCommit c) return false; } - /** {@inheritDoc} */ @Override public boolean requiresCommitBody() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java index 6ac490a34..4100e877d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/CommitTimeRevFilter.java @@ -98,13 +98,11 @@ public static final RevFilter between(long since, long until) { when = (int) (ts / 1000); } - /** {@inheritDoc} */ @Override public RevFilter clone() { return this; } - /** {@inheritDoc} */ @Override public boolean requiresCommitBody() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MaxCountRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MaxCountRevFilter.java index 0e3a803b6..09bcb33f2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MaxCountRevFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/MaxCountRevFilter.java @@ -46,7 +46,6 @@ private MaxCountRevFilter(int maxCount) { this.maxCount = maxCount; } - /** {@inheritDoc} */ @Override public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, @@ -57,7 +56,6 @@ public boolean include(RevWalk walker, RevCommit cmit) return true; } - /** {@inheritDoc} */ @Override public RevFilter clone() { return new MaxCountRevFilter(maxCount); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/NotRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/NotRevFilter.java index 1482c5129..8fcebc9fa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/NotRevFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/NotRevFilter.java @@ -38,13 +38,11 @@ private NotRevFilter(RevFilter one) { a = one; } - /** {@inheritDoc} */ @Override public RevFilter negate() { return a; } - /** {@inheritDoc} */ @Override public boolean include(RevWalk walker, RevCommit c) throws MissingObjectException, IncorrectObjectTypeException, @@ -52,19 +50,16 @@ public boolean include(RevWalk walker, RevCommit c) return !a.include(walker, c); } - /** {@inheritDoc} */ @Override public boolean requiresCommitBody() { return a.requiresCommitBody(); } - /** {@inheritDoc} */ @Override public RevFilter clone() { return new NotRevFilter(a.clone()); } - /** {@inheritDoc} */ @Override public String toString() { return "NOT " + a.toString(); //$NON-NLS-1$ 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 256e4794c..843064630 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 @@ -264,7 +264,6 @@ public abstract boolean include(RevWalk walker, RevCommit cmit) @Override public abstract RevFilter clone(); - /** {@inheritDoc} */ @Override public String toString() { String n = getClass().getName(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java index 16d9f7614..f9ee632b5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/RevFlagFilter.java @@ -91,13 +91,11 @@ public static RevFilter hasAny(RevFlagSet a) { flags = m; } - /** {@inheritDoc} */ @Override public RevFilter clone() { return this; } - /** {@inheritDoc} */ @Override public String toString() { return super.toString() + flags; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SkipRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SkipRevFilter.java index 84df36a2d..bf93b7ba3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SkipRevFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SkipRevFilter.java @@ -45,7 +45,6 @@ private SkipRevFilter(int skip) { this.skip = skip; } - /** {@inheritDoc} */ @Override public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, @@ -55,7 +54,6 @@ public boolean include(RevWalk walker, RevCommit cmit) return true; } - /** {@inheritDoc} */ @Override public RevFilter clone() { return new SkipRevFilter(skip); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SubStringRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SubStringRevFilter.java index 7f00dfd50..ff1fea241 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SubStringRevFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/SubStringRevFilter.java @@ -67,7 +67,6 @@ protected SubStringRevFilter(String patternText) { pattern = new RawSubStringPattern(patternText); } - /** {@inheritDoc} */ @Override public boolean include(RevWalk walker, RevCommit cmit) throws MissingObjectException, IncorrectObjectTypeException, @@ -75,7 +74,6 @@ public boolean include(RevWalk walker, RevCommit cmit) return pattern.match(text(cmit)) >= 0; } - /** {@inheritDoc} */ @Override public boolean requiresCommitBody() { return true; @@ -90,13 +88,11 @@ public boolean requiresCommitBody() { */ protected abstract RawCharSequence text(RevCommit cmit); - /** {@inheritDoc} */ @Override public RevFilter clone() { return this; // Typically we are actually thread-safe. } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 cba5e1697..910c5cbd8 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 @@ -84,7 +84,6 @@ public FileBasedConfig(Config base, File cfgLocation, FS fs) { this.hash = ObjectId.zeroId(); } - /** {@inheritDoc} */ @Override protected boolean notifyUponTransientChanges() { // we will notify listeners upon save() @@ -197,7 +196,6 @@ public void save() throws IOException { fireConfigChangedEvent(); } - /** {@inheritDoc} */ @Override public void clear() { hash = hash(new byte[0]); @@ -208,7 +206,6 @@ private static ObjectId hash(byte[] rawText) { return ObjectId.fromRaw(Constants.newMessageDigest().digest(rawText)); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 b0b1d4ff2..95c001e8a 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 @@ -256,8 +256,9 @@ public class PackConfig { public static final int DEFAULT_MIN_BYTES_FOR_OBJ_SIZE_INDEX = -1; /** - * Default max time to spend during the search for reuse phase. This - * optimization is disabled by default: {@value} + * Default max time to spend during the search for reuse phase. + * + * This optimization is disabled by default: {@link Integer#MAX_VALUE} seconds. * * @see #setSearchForReuseTimeout(Duration) * @since 5.13 @@ -1185,7 +1186,7 @@ public int getBitmapInactiveBranchAgeInDays() { /** * Get the max time to spend during the search for reuse phase. * - * Default setting: {@value #DEFAULT_SEARCH_FOR_REUSE_TIMEOUT} + * Default setting: {@link #DEFAULT_SEARCH_FOR_REUSE_TIMEOUT} * * @return the maximum time to spend during the search for reuse phase. * @since 5.13 @@ -1197,7 +1198,7 @@ public Duration getSearchForReuseTimeout() { /** * Set the age in days that marks a branch as "inactive". * - * Default setting: {@value #DEFAULT_BITMAP_INACTIVE_BRANCH_AGE_IN_DAYS} + * Default setting: {@link #DEFAULT_BITMAP_INACTIVE_BRANCH_AGE_IN_DAYS} * * @param ageInDays * the age in days that marks a branch as "inactive" @@ -1234,7 +1235,7 @@ public void setBitmapExcludedRefsPrefixes(String[] excludedRefsPrefixes) { * @param timeout * max time allowed during the search for reuse phase * - * Default setting: {@value #DEFAULT_SEARCH_FOR_REUSE_TIMEOUT} + * Default setting: {@link #DEFAULT_SEARCH_FOR_REUSE_TIMEOUT} * @since 5.13 */ public void setSearchForReuseTimeout(Duration timeout) { @@ -1369,7 +1370,6 @@ public void fromConfig(Config rc) { CONFIG_KEY_PRUNE_PRESERVED, DEFAULT_PRUNE_PRESERVED)); } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder b = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleConflict.java b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleConflict.java index 856eb725d..f09e1a517 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleConflict.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleConflict.java @@ -55,9 +55,11 @@ public class SubmoduleConflict extends Sequence { private final ObjectId objectId; /** - * Create a SubmoduleConflict for the given submodule object id - * @param objectId - */ + * Create a SubmoduleConflict for the given submodule object id + * + * @param objectId + * the id of the object to create a submodule conflict for + */ public SubmoduleConflict(ObjectId objectId) { super(); this.objectId = objectId; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java index bf77021b0..7d5836ece 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleWalk.java @@ -87,6 +87,7 @@ public enum IgnoreSubmoduleMode { * @return generator over submodule index entries. The caller is responsible * for calling {@link #close()}. * @throws java.io.IOException + * if an IO error occurred */ public static SubmoduleWalk forIndex(Repository repository) throws IOException { @@ -116,6 +117,7 @@ public static SubmoduleWalk forIndex(Repository repository) * @return generator at given path. The caller is responsible for calling * {@link #close()}. Null if no submodule at given path. * @throws java.io.IOException + * if an IO error occurred */ public static SubmoduleWalk forPath(Repository repository, AnyObjectId treeId, String path) throws IOException { @@ -150,6 +152,7 @@ public static SubmoduleWalk forPath(Repository repository, * @return generator at given path. The caller is responsible for calling * {@link #close()}. Null if no submodule at given path. * @throws java.io.IOException + * if an IO error occurred */ public static SubmoduleWalk forPath(Repository repository, AbstractTreeIterator iterator, String path) throws IOException { @@ -193,6 +196,7 @@ public static File getSubmoduleDirectory(final Repository parent, * submodule path * @return repository or null if repository doesn't exist * @throws java.io.IOException + * if an IO error occurred */ public static Repository getSubmoduleRepository(final Repository parent, final String path) throws IOException { @@ -209,6 +213,7 @@ public static Repository getSubmoduleRepository(final Repository parent, * submodule path * @return repository or null if repository doesn't exist * @throws java.io.IOException + * if an IO error occurred */ public static Repository getSubmoduleRepository(final File parent, final String path) throws IOException { @@ -220,11 +225,14 @@ public static Repository getSubmoduleRepository(final File parent, * abstraction * * @param parent + * {@link Repository} that contains the submodule * @param path + * of the working tree of the submodule * @param fs * the file system abstraction to be used * @return repository or null if repository doesn't exist * @throws IOException + * if an IO error occurred * @since 4.10 */ public static Repository getSubmoduleRepository(final File parent, @@ -249,7 +257,7 @@ public static Repository getSubmoduleRepository(final File parent, * @return the {@link Repository} of the submodule, or {@code null} if it * doesn't exist * @throws IOException - * on errors + * if an IO error occurred * @since 5.6 */ public static Repository getSubmoduleRepository(File parent, String path, @@ -286,6 +294,7 @@ public static Repository getSubmoduleRepository(File parent, String path, * absolute or relative URL of the submodule repository * @return resolved URL * @throws java.io.IOException + * if an IO error occurred */ public static String getSubmoduleRemoteUrl(final Repository parent, final String url) throws IOException { @@ -369,6 +378,7 @@ else if (submoduleUrl.startsWith("../")) { //$NON-NLS-1$ * @param repository * the {@link org.eclipse.jgit.lib.Repository}. * @throws java.io.IOException + * if an IO error occurred */ public SubmoduleWalk(Repository repository) throws IOException { this.repository = repository; @@ -419,13 +429,14 @@ public SubmoduleWalk setRootTree(AbstractTreeIterator tree) { * The root tree is not read until the first submodule is encountered by the * walk. *

    - * This method need only be called if constructing a walk manually instead of - * with one of the static factory methods above. + * This method need only be called if constructing a walk manually instead + * of with one of the static factory methods above. * * @param id * ID of a tree containing .gitmodules * @return this generator * @throws java.io.IOException + * if an IO error occurred */ public SubmoduleWalk setRootTree(AnyObjectId id) throws IOException { final CanonicalTreeParser p = new CanonicalTreeParser(); @@ -448,6 +459,7 @@ public SubmoduleWalk setRootTree(AnyObjectId id) throws IOException { * @throws java.io.IOException * if an error occurred, or if the repository is bare * @throws org.eclipse.jgit.errors.ConfigInvalidException + * if .gitmodules config is invalid */ public SubmoduleWalk loadModulesConfig() throws IOException, ConfigInvalidException { if (rootTree == null) { @@ -512,11 +524,13 @@ private void loadPathNames() { * * @param repository * the repository to check - * @return true if the working tree contains a .gitmodules file, - * false otherwise. Always returns false - * for bare repositories. + * @return true if the working tree contains a .gitmodules + * file, false otherwise. Always returns + * false for bare repositories. * @throws java.io.IOException - * @throws CorruptObjectException if any. + * if an IO error occurred + * @throws CorruptObjectException + * if a corrupt object was found * @since 3.6 */ public static boolean containsGitModulesFile(Repository repository) @@ -560,6 +574,7 @@ public SubmoduleWalk setFilter(TreeFilter filter) { * object. * @return this generator * @throws org.eclipse.jgit.errors.CorruptObjectException + * if a corrupt object was found */ public SubmoduleWalk setTree(AbstractTreeIterator iterator) throws CorruptObjectException { @@ -574,10 +589,11 @@ public SubmoduleWalk setTree(AbstractTreeIterator iterator) * an {@link org.eclipse.jgit.lib.AnyObjectId} object. * @return this generator * @throws java.io.IOException + * if an IO error occurred * @throws IncorrectObjectTypeException - * if any. + * if object has unexpected type * @throws MissingObjectException - * if any. + * if object is missing */ public SubmoduleWalk setTree(AnyObjectId treeId) throws IOException { walk.addTree(treeId); @@ -614,6 +630,7 @@ public File getDirectory() { * * @return true if entry found, false otherwise * @throws java.io.IOException + * if an IO error occurred */ public boolean next() throws IOException { while (walk.next()) { @@ -656,9 +673,11 @@ public void setBuilderFactory(RepositoryBuilderFactory factory) { * name of .git/config) * * @since 4.10 - * @return name + * @return name of the submodule * @throws ConfigInvalidException + * if the .gitmodules config is invalid * @throws IOException + * if an IO error occurred */ public String getModuleName() throws IOException, ConfigInvalidException { lazyLoadModulesConfig(); @@ -680,7 +699,9 @@ public ObjectId getObjectId() { * * @return configured path * @throws org.eclipse.jgit.errors.ConfigInvalidException + * if .gitmodules config is invalid * @throws java.io.IOException + * if an IO error occurred */ public String getModulesPath() throws IOException, ConfigInvalidException { lazyLoadModulesConfig(); @@ -694,7 +715,9 @@ public String getModulesPath() throws IOException, ConfigInvalidException { * * @return configured URL * @throws org.eclipse.jgit.errors.ConfigInvalidException + * if .gitmodules config is invalid * @throws java.io.IOException + * if an IO error occurred */ public String getConfigUrl() throws IOException, ConfigInvalidException { return repoConfig.getString(ConfigConstants.CONFIG_SUBMODULE_SECTION, @@ -707,7 +730,9 @@ public String getConfigUrl() throws IOException, ConfigInvalidException { * * @return configured URL * @throws org.eclipse.jgit.errors.ConfigInvalidException + * if .gitmodules config is invalid * @throws java.io.IOException + * if an IO error occurred */ public String getModulesUrl() throws IOException, ConfigInvalidException { lazyLoadModulesConfig(); @@ -721,7 +746,9 @@ public String getModulesUrl() throws IOException, ConfigInvalidException { * * @return update value * @throws org.eclipse.jgit.errors.ConfigInvalidException + * if .gitmodules config is invalid * @throws java.io.IOException + * if an IO error occurred */ public String getConfigUpdate() throws IOException, ConfigInvalidException { return repoConfig.getString(ConfigConstants.CONFIG_SUBMODULE_SECTION, @@ -734,7 +761,9 @@ public String getConfigUpdate() throws IOException, ConfigInvalidException { * * @return update value * @throws org.eclipse.jgit.errors.ConfigInvalidException + * if .gitmodules config is invalid * @throws java.io.IOException + * if an IO error occurred */ public String getModulesUpdate() throws IOException, ConfigInvalidException { lazyLoadModulesConfig(); @@ -748,7 +777,9 @@ public String getModulesUpdate() throws IOException, ConfigInvalidException { * * @return ignore value * @throws org.eclipse.jgit.errors.ConfigInvalidException + * if .gitmodules config is invalid * @throws java.io.IOException + * if an IO error occurred * @since 3.6 */ public IgnoreSubmoduleMode getModulesIgnore() throws IOException, @@ -771,6 +802,7 @@ ConfigConstants.CONFIG_SUBMODULE_SECTION, getModuleName(), * * @return repository or null if non-existent * @throws java.io.IOException + * if an IO error occurred */ public Repository getRepository() throws IOException { return getSubmoduleRepository(repository.getWorkTree(), path, @@ -782,6 +814,7 @@ public Repository getRepository() throws IOException { * * @return object id of HEAD reference * @throws java.io.IOException + * if an IO error occurred */ public ObjectId getHead() throws IOException { try (Repository subRepo = getRepository()) { @@ -797,6 +830,7 @@ public ObjectId getHead() throws IOException { * * @return ref name, null on failures * @throws java.io.IOException + * if an IO error occurred */ public String getHeadRef() throws IOException { try (Repository subRepo = getRepository()) { @@ -816,7 +850,9 @@ public String getHeadRef() throws IOException { * * @return resolved remote URL * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.errors.ConfigInvalidException + * if .gitmodules config is invalid */ public String getRemoteUrl() throws IOException, ConfigInvalidException { String url = getModulesUrl(); 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 fb9c14576..260a85e0e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AbstractAdvertiseRefsHook.java @@ -58,7 +58,6 @@ * @since 2.0 */ public abstract class AbstractAdvertiseRefsHook implements AdvertiseRefsHook { - /** {@inheritDoc} */ @Override public void advertiseRefs(UploadPack uploadPack) throws ServiceMayNotContinueException { @@ -67,7 +66,6 @@ public void advertiseRefs(UploadPack uploadPack) } /** - * {@inheritDoc} */ @Override public void advertiseRefs(ReceivePack receivePack) 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 84c36915a..6381f1e94 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHook.java @@ -92,6 +92,7 @@ void advertiseRefs(UploadPack uploadPack) * @throws org.eclipse.jgit.transport.ServiceMayNotContinueException * abort; the message will be sent to the user. * @throws IOException + * if an IO error occurred * @since 5.6 */ void advertiseRefs(ReceivePack receivePack) 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 eb9c673ef..6db077576 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/AdvertiseRefsHookChain.java @@ -50,9 +50,6 @@ public static AdvertiseRefsHook newChain(List hooks } } - /** - * {@inheritDoc} - */ @Override public void advertiseRefs(ReceivePack rp) throws IOException { @@ -60,7 +57,6 @@ public void advertiseRefs(ReceivePack rp) hooks[i].advertiseRefs(rp); } - /** {@inheritDoc} */ @Override public void advertiseRefs(UploadPack rp) throws ServiceMayNotContinueException { 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 9e229a18a..3ac9f59ba 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseConnection.java @@ -38,25 +38,21 @@ public abstract class BaseConnection implements Connection { private Writer messageWriter; - /** {@inheritDoc} */ @Override public Map getRefsMap() { return advertisedRefs; } - /** {@inheritDoc} */ @Override public final Collection getRefs() { return advertisedRefs.values(); } - /** {@inheritDoc} */ @Override public final Ref getRef(String name) { return advertisedRefs.get(name); } - /** {@inheritDoc} */ @Override public String getMessages() { return messageWriter != null ? messageWriter.toString() : ""; //$NON-NLS-1$ @@ -84,7 +80,6 @@ protected void setPeerUserAgent(String agent) { peerUserAgent = agent; } - /** {@inheritDoc} */ @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 6954bd9a0..48992f3e3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BaseFetchConnection.java @@ -31,7 +31,6 @@ */ abstract class BaseFetchConnection extends BaseConnection implements FetchConnection { - /** {@inheritDoc} */ @Override public final void fetch(final ProgressMonitor monitor, final Collection want, final Set have) @@ -39,7 +38,6 @@ public final void fetch(final ProgressMonitor monitor, fetch(monitor, want, have, null); } - /** {@inheritDoc} */ @Override public final void fetch(final ProgressMonitor monitor, final Collection want, final Set have, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java index 09c559d7b..bac5025f8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackConnection.java @@ -64,6 +64,7 @@ */ abstract class BasePackConnection extends BaseConnection { + /** The capability prefix for a symlink */ protected static final String CAPABILITY_SYMREF_PREFIX = "symref="; //$NON-NLS-1$ /** The repository this transport fetches into, or pushes out of. */ @@ -72,7 +73,7 @@ abstract class BasePackConnection extends BaseConnection { /** Remote repository location. */ protected final URIish uri; - /** A transport connected to {@link #uri}. */ + /** A transport connected to {@link BasePackConnection#uri}. */ protected final Transport transport; /** Low-level input stream, if a timeout was configured. */ @@ -81,7 +82,10 @@ abstract class BasePackConnection extends BaseConnection { /** Low-level output stream, if a timeout was configured. */ protected TimeoutOutputStream timeoutOut; - /** Timer to manage {@link #timeoutIn} and {@link #timeoutOut}. */ + /** + * Timer to manage {@link #timeoutIn} and + * {@link BasePackConnection#timeoutOut}. + */ private InterruptTimer myTimer; /** Input stream reading from the remote. */ @@ -90,13 +94,16 @@ abstract class BasePackConnection extends BaseConnection { /** Output stream sending to the remote. */ protected OutputStream out; - /** Packet line decoder around {@link #in}. */ + /** Packet line decoder around {@link BasePackConnection#in}. */ protected PacketLineIn pckIn; - /** Packet line encoder around {@link #out}. */ + /** Packet line encoder around {@link BasePackConnection#out}. */ protected PacketLineOut pckOut; - /** Send {@link PacketLineOut#end()} before closing {@link #out}? */ + /** + * Send {@link PacketLineOut#end()} before closing + * {@link BasePackConnection#out}? + */ protected boolean outNeedsEnd; /** True if this is a stateless RPC connection. */ @@ -486,7 +493,6 @@ private void processLineV2(String line, ObjectId id, String rest, *

    * If refMap already contains an entry for symRef.key, it is replaced. *

    - *

    *

    * For example, given: *

    @@ -627,7 +633,6 @@ protected void addUserAgentCapability(StringBuilder b) { } } - /** {@inheritDoc} */ @Override public String getPeerUserAgent() { String agent = remoteCapabilities.get(OPTION_AGENT); @@ -642,7 +647,6 @@ private PackProtocolException invalidRefAdvertisementLine(String line) { return new PackProtocolException(uri, MessageFormat.format(JGitText.get().invalidRefAdvertisementLine, line)); } - /** {@inheritDoc} */ @Override public void close() { if (out != null) { 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 890938017..cdda3c038 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackFetchConnection.java @@ -334,7 +334,6 @@ static class FetchConfig { } } - /** {@inheritDoc} */ @Override public final void fetch(final ProgressMonitor monitor, final Collection want, final Set have) @@ -342,7 +341,6 @@ public final void fetch(final ProgressMonitor monitor, fetch(monitor, want, have, null); } - /** {@inheritDoc} */ @Override public final void fetch(final ProgressMonitor monitor, final Collection want, final Set have, @@ -351,25 +349,21 @@ public final void fetch(final ProgressMonitor monitor, doFetch(monitor, want, have, outputStream); } - /** {@inheritDoc} */ @Override public boolean didFetchIncludeTags() { return false; } - /** {@inheritDoc} */ @Override public boolean didFetchTestConnectivity() { return false; } - /** {@inheritDoc} */ @Override public void setPackLockMessage(String message) { lockMessage = message; } - /** {@inheritDoc} */ @Override public Collection getPackLocks() { if (packLock != null) @@ -659,7 +653,6 @@ private boolean readAcknowledgments(FetchStateV2 fetchState, return gotReady; } - /** {@inheritDoc} */ @Override public void close() { if (walk != null) 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 adc1c9849..9a96fdcf3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BasePackPushConnection.java @@ -122,7 +122,6 @@ public BasePackPushConnection(PackTransport packTransport) { useBitmaps = transport.isPushUseBitmaps(); } - /** {@inheritDoc} */ @Override public void push(final ProgressMonitor monitor, final Map refUpdates) @@ -130,7 +129,6 @@ public void push(final ProgressMonitor monitor, push(monitor, refUpdates, null); } - /** {@inheritDoc} */ @Override public void push(final ProgressMonitor monitor, final Map refUpdates, OutputStream outputStream) @@ -139,7 +137,6 @@ public void push(final ProgressMonitor monitor, doPush(monitor, refUpdates, outputStream); } - /** {@inheritDoc} */ @Override protected TransportException noRepository(Throwable cause) { // Sadly we cannot tell the "invalid URI" case from "push not allowed". 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 f04e573fe..5299dfa98 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/BundleFetchConnection.java @@ -147,13 +147,11 @@ private String readLine(byte[] hdrbuf) throws IOException { return line.toString(); } - /** {@inheritDoc} */ @Override public boolean didFetchTestConnectivity() { return false; } - /** {@inheritDoc} */ @Override protected void doFetch(final ProgressMonitor monitor, final Collection want, final Set have) @@ -174,13 +172,11 @@ protected void doFetch(final ProgressMonitor monitor, } } - /** {@inheritDoc} */ @Override public void setPackLockMessage(String message) { lockMessage = message; } - /** {@inheritDoc} */ @Override public Collection getPackLocks() { if (packLock != null) @@ -258,7 +254,6 @@ private void verifyPrerequisites() throws TransportException { } } - /** {@inheritDoc} */ @Override public void close() { if (bin != null) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ChainingCredentialsProvider.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ChainingCredentialsProvider.java index 6a4cfca86..3bae0eae5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ChainingCredentialsProvider.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ChainingCredentialsProvider.java @@ -39,7 +39,6 @@ public ChainingCredentialsProvider(CredentialsProvider... providers) { Arrays.asList(providers)); } - /** {@inheritDoc} */ @Override public boolean isInteractive() { for (CredentialsProvider p : credentialProviders) @@ -48,7 +47,6 @@ public boolean isInteractive() { return false; } - /** {@inheritDoc} */ @Override public boolean supports(CredentialItem... items) { for (CredentialsProvider p : credentialProviders) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialItem.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialItem.java index 2b0942452..78c5c6374 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialItem.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialItem.java @@ -115,8 +115,8 @@ public String getValue() { } /** - * * @param newValue + * the new value */ public void setValue(String newValue) { value = newValue; @@ -223,6 +223,7 @@ public boolean getValue() { * Set the new value. * * @param newValue + * the new value */ public void setValue(boolean newValue) { value = newValue; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java index a8cf849fe..12a7dd3af 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java @@ -55,7 +55,6 @@ boolean contains(int type) { return val.testBit(type); } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof ObjectTypes)) { @@ -66,7 +65,6 @@ public boolean equals(Object obj) { return other.val.equals(val); } - /** {@inheritDoc} */ @Override public int hashCode() { return val.hashCode(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FtpChannel.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FtpChannel.java index 44656c139..6d5b5e61e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FtpChannel.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FtpChannel.java @@ -71,6 +71,7 @@ public int getStatus() { * @param unit * of the {@code timeout} * @throws IOException + * if an IO error occurred */ void connect(int timeout, TimeUnit unit) throws IOException; @@ -97,6 +98,7 @@ public int getStatus() { /** * @return the current remote directory path * @throws IOException + * if an IO error occurred */ String pwd() throws IOException; @@ -118,6 +120,7 @@ interface DirEntry { * of the directory to list * @return the directory entries * @throws IOException + * if an IO error occurred */ Collection ls(String path) throws IOException; @@ -128,6 +131,7 @@ interface DirEntry { * @param path * to delete * @throws IOException + * if an IO error occurred */ void rmdir(String path) throws IOException; @@ -137,6 +141,7 @@ interface DirEntry { * @param path * to create * @throws IOException + * if an IO error occurred */ void mkdir(String path) throws IOException; @@ -148,6 +153,7 @@ interface DirEntry { * * @return the stream to read from * @throws IOException + * if an IO error occurred */ InputStream get(String path) throws IOException; @@ -160,6 +166,7 @@ interface DirEntry { * * @return the stream to read from * @throws IOException + * if an IO error occurred */ OutputStream put(String path) throws IOException; @@ -204,6 +211,7 @@ default void delete(String path) throws IOException { * @param to * new name of the file * @throws IOException + * if an IO error occurred * @see stdio.h: * rename() 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 14d6c1ec1..655b4605e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HMACSHA1NonceGenerator.java @@ -35,9 +35,8 @@ public class HMACSHA1NonceGenerator implements NonceGenerator { * * @param seed * seed the generator - * @throws java.lang.IllegalStateException */ - public HMACSHA1NonceGenerator(String seed) throws IllegalStateException { + public HMACSHA1NonceGenerator(String seed) { try { byte[] keyBytes = seed.getBytes(ISO_8859_1); SecretKeySpec signingKey = new SecretKeySpec(keyBytes, "HmacSHA1"); //$NON-NLS-1$ @@ -48,16 +47,13 @@ public HMACSHA1NonceGenerator(String seed) throws IllegalStateException { } } - /** {@inheritDoc} */ @Override - public synchronized String createNonce(Repository repo, long timestamp) - throws IllegalStateException { + public synchronized String createNonce(Repository repo, long timestamp) { String input = repo.getIdentifier() + ":" + String.valueOf(timestamp); //$NON-NLS-1$ byte[] rawHmac = mac.doFinal(input.getBytes(UTF_8)); return Long.toString(timestamp) + "-" + toHex(rawHmac); //$NON-NLS-1$ } - /** {@inheritDoc} */ @Override public NonceStatus verify(String received, String sent, Repository db, boolean allowSlop, int slop) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java index aec5b89c7..3db0421d6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java @@ -224,7 +224,9 @@ boolean authorize(URIish uri, CredentialsProvider credentialsProvider) { * Update this method with the given username and password pair. * * @param user + * username * @param pass + * password */ abstract void authorize(String user, String pass); @@ -232,7 +234,9 @@ boolean authorize(URIish uri, CredentialsProvider credentialsProvider) { * Update connection properties based on this authentication method. * * @param conn + * the connection to configure * @throws IOException + * if an IO error occurred */ abstract void configureRequest(HttpConnection conn) throws IOException; 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 18dc792eb..9a699a877 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalFetchConnection.java @@ -103,7 +103,6 @@ public void run() { readAdvertisedRefs(); } - /** {@inheritDoc} */ @Override public void close() { super.close(); 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 d2b0ef4a2..a23fdc94a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/InternalPushConnection.java @@ -99,7 +99,6 @@ public void run() { readAdvertisedRefs(); } - /** {@inheritDoc} */ @Override public void close() { super.close(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/LsRefsV2Request.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/LsRefsV2Request.java index 856047ee1..b2799e136 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/LsRefsV2Request.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/LsRefsV2Request.java @@ -130,6 +130,7 @@ private Builder() { /** * @param value + * ref prefix values * @return the Builder */ public Builder setRefPrefixes(List value) { @@ -139,6 +140,7 @@ public Builder setRefPrefixes(List value) { /** * @param value + * of symrefs * @return the Builder */ public Builder setSymrefs(boolean value) { @@ -148,6 +150,7 @@ public Builder setSymrefs(boolean value) { /** * @param value + * of peel * @return the Builder */ public Builder setPeel(boolean value) { @@ -203,7 +206,11 @@ public Builder setClientSID(@Nullable String value) { return this; } - /** @return LsRefsV2Request */ + /** + * Builds the request + * + * @return LsRefsV2Request the request + */ public LsRefsV2Request build() { return new LsRefsV2Request( Collections.unmodifiableList(refPrefixes), symrefs, peel, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/NetRCCredentialsProvider.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/NetRCCredentialsProvider.java index 6531b17e2..e32530cc9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/NetRCCredentialsProvider.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/NetRCCredentialsProvider.java @@ -67,7 +67,6 @@ public static void install() { CredentialsProvider.setDefault(new NetRCCredentialsProvider()); } - /** {@inheritDoc} */ @Override public boolean supports(CredentialItem... items) { for (CredentialItem i : items) { @@ -81,7 +80,6 @@ else if (i instanceof CredentialItem.Password) return true; } - /** {@inheritDoc} */ @Override public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem { @@ -112,7 +110,6 @@ public boolean get(URIish uri, CredentialItem... items) return !isAnyNull(items); } - /** {@inheritDoc} */ @Override public boolean isInteractive() { return false; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/NonceGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/NonceGenerator.java index 2541ff139..30e80e078 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/NonceGenerator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/NonceGenerator.java @@ -31,10 +31,8 @@ public interface NonceGenerator { * @param timestamp * The current time in seconds. * @return The nonce to be signed by the pusher - * @throws java.lang.IllegalStateException */ - String createNonce(Repository db, long timestamp) - throws IllegalStateException; + String createNonce(Repository db, long timestamp); /** * Verify trustworthiness of the received nonce. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java index 86a271667..2a52d7fd7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java @@ -53,6 +53,7 @@ private Builder() { /** * @param value + * of objectIds * @return the Builder */ public Builder setObjectIDs(List value) { @@ -60,7 +61,11 @@ public Builder setObjectIDs(List value) { return this; } - /** @return ObjectInfoRequest */ + /** + * Build the request + * + * @return ObjectInfoRequest the request + */ public ObjectInfoRequest build() { return new ObjectInfoRequest( Collections.unmodifiableList(objectIDs)); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java index d9669044c..fe9ddabf8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java @@ -1102,6 +1102,7 @@ private void whole(long pos, int type, long sz) * @param data * raw content of the object. * @throws org.eclipse.jgit.errors.CorruptObjectException + * if a corrupt object was found * @since 4.9 */ protected void verifySafeObject(final AnyObjectId id, final int type, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java index bf7997ec6..d7ef4f8f0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java @@ -117,6 +117,7 @@ public void setType(int type) { * Size in storage * * @param sizeBeforeInflating + * size before inflating */ void setSize(long sizeBeforeInflating) { this.sizeBeforeInflating = sizeBeforeInflating; 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 4d53e1b26..f9d2c38ad 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHookChain.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostReceiveHookChain.java @@ -47,7 +47,6 @@ public static PostReceiveHook newChain( } } - /** {@inheritDoc} */ @Override public void onPostReceive(ReceivePack rp, Collection commands) { 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 4334888a9..072f43f41 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHookChain.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PostUploadHookChain.java @@ -80,7 +80,6 @@ public static PostUploadHook newChain(List hooks) { } } - /** {@inheritDoc} */ @Override public void onPostUpload(PackStatistics stats) { for (PostUploadHook hook : hooks) { 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 dffa30da8..2a5522bb4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHookChain.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreReceiveHookChain.java @@ -46,7 +46,6 @@ public static PreReceiveHook newChain(List hooks) { } } - /** {@inheritDoc} */ @Override public void onPreReceive(ReceivePack rp, Collection commands) { 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 9c28abed9..dc703d0b1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHookChain.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PreUploadHookChain.java @@ -48,7 +48,6 @@ public static PreUploadHook newChain(List hooks) { } } - /** {@inheritDoc} */ @Override public void onBeginNegotiateRound(UploadPack up, Collection wants, int cntOffered) @@ -58,7 +57,6 @@ public void onBeginNegotiateRound(UploadPack up, } } - /** {@inheritDoc} */ @Override public void onEndNegotiateRound(UploadPack up, Collection wants, int cntCommon, @@ -69,7 +67,6 @@ public void onEndNegotiateRound(UploadPack up, } } - /** {@inheritDoc} */ @Override public void onSendPack(UploadPack up, Collection wants, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV0Parser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV0Parser.java index 9d055519a..f1afeab02 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV0Parser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV0Parser.java @@ -51,7 +51,9 @@ final class ProtocolV0Parser { * incoming lines. This method will read until an END line. * @return a FetchV0Request with the data received in the wire. * @throws PackProtocolException + * if a protocol occurred * @throws IOException + * if an IO error occurred */ FetchV0Request recvWants(PacketLineIn pckIn) throws PackProtocolException, IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificate.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificate.java index d9831c770..437abb063 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificate.java @@ -222,13 +222,11 @@ private StringBuilder toStringBuilder() { return sb; } - /** {@inheritDoc} */ @Override public int hashCode() { return signature.hashCode(); } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { if (!(o instanceof PushCertificate)) { @@ -259,7 +257,6 @@ private static boolean commandsEqual(PushCertificate c1, PushCertificate c2) { return true; } - /** {@inheritDoc} */ @Override public String toString() { return getClass().getSimpleName() + '[' diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateIdent.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateIdent.java index 94d1169ab..bd76b34ae 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateIdent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushCertificateIdent.java @@ -228,20 +228,17 @@ public int getTimeZoneOffset() { return tzOffset; } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { return (o instanceof PushCertificateIdent) && raw.equals(((PushCertificateIdent) o).raw); } - /** {@inheritDoc} */ @Override public int hashCode() { return raw.hashCode(); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushConnection.java index 51c8558bf..32c443f0f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushConnection.java @@ -43,17 +43,14 @@ public interface PushConnection extends Connection { * and sending objects that remote repository need to have a consistent * objects graph from new refs. *

    - *

    * Only one call per connection is allowed. Subsequent calls will result in * {@link org.eclipse.jgit.errors.TransportException}. - *

    *

    * Implementation may use local repository to send a minimum set of objects * needed by remote repository in efficient way. * {@link org.eclipse.jgit.transport.Transport#isPushThin()} should be * honored if applicable. refUpdates should be filled with information about * status of each update. - *

    * * @param monitor * progress monitor to update the end-user about the amount of @@ -90,17 +87,14 @@ void push(final ProgressMonitor monitor, * and sending objects that remote repository need to have a consistent * objects graph from new refs. *

    - *

    * Only one call per connection is allowed. Subsequent calls will result in * {@link org.eclipse.jgit.errors.TransportException}. - *

    *

    * Implementation may use local repository to send a minimum set of objects * needed by remote repository in efficient way. * {@link org.eclipse.jgit.transport.Transport#isPushThin()} should be * honored if applicable. refUpdates should be filled with information about * status of each update. - *

    * * @param monitor * progress monitor to update the end-user about the amount of diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java index b59ae0c45..8f90f326d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PushProcess.java @@ -76,6 +76,7 @@ class PushProcess { * {@link PrePushHook} to run after the remote advertisement has * been gotten * @throws TransportException + * if a protocol error occurred during push/fetch */ PushProcess(Transport transport, Collection toPush, PrePushHook prePush) throws TransportException { @@ -96,6 +97,7 @@ class PushProcess { * @param out * OutputStream to write messages to * @throws TransportException + * if a protocol error occurred during push/fetch */ PushProcess(Transport transport, Collection toPush, PrePushHook prePush, OutputStream out) throws TransportException { @@ -272,6 +274,7 @@ private Map prepareRemoteUpdates() * {@link ObjectId} of the new commit * @return {@code true} if the update fast-forwards, {@code false} otherwise * @throws TransportException + * if a protocol error occurred during push/fetch */ private boolean isFastForward(ObjectId oldOid, ObjectId newOid) throws TransportException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java index ab411600f..bfc75f036 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceiveCommand.java @@ -849,7 +849,6 @@ void reject(IOException err) { JGitText.get().lockError, err.getMessage())); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 816cec89a..9a6177433 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -460,6 +460,7 @@ public Map getAdvertisedRefs() { * null, assumes the default set of additional haves from the * repository. * @throws IOException + * if an IO error occurred */ public void setAdvertisedRefs(Map allRefs, Set additionalHaves) throws IOException { @@ -1024,6 +1025,7 @@ public List getAllCommands() { * Set an error handler for {@link ReceiveCommand}. * * @param receiveCommandErrorHandler + * the error handler * @since 5.7 */ public void setReceiveCommandErrorHandler( @@ -1212,6 +1214,7 @@ protected void init(final InputStream input, final OutputStream output, * * @return advertised refs, or the default if not explicitly advertised. * @throws IOException + * if an IO error occurred */ private Map getAdvertisedOrDefaultRefs() throws IOException { if (refs == null) @@ -1348,7 +1351,8 @@ private Map getAllRefs() { /** * Receive a list of commands from the input. * - * @throws java.io.IOException + * @throws IOException + * if an IO error occurred */ private void recvCommands() throws IOException { PacketLineIn pck = maxCommandBytes > 0 @@ -1936,7 +1940,8 @@ else if (cmd.getMessage() /** * Close and flush (if necessary) the underlying streams. * - * @throws java.io.IOException + * @throws IOException + * if an IO error occurred */ private void close() throws IOException { if (sideBand) { @@ -2174,6 +2179,7 @@ public String getClientSID() { * standard error channel of the command execution. For most * other network connections this should be null. * @throws java.io.IOException + * if an IO error occurred */ public void receive(final InputStream input, final OutputStream output, final OutputStream messages) throws IOException { @@ -2217,6 +2223,7 @@ public void receive(final InputStream input, final OutputStream output, * standard error channel of the command execution. For most * other network connections this should be null. * @throws java.io.IOException + * if an IO error occurred * @since 5.7 */ public void receiveWithExceptionPropagation(InputStream input, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java index c525e6684..6b022ea5d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java @@ -173,7 +173,7 @@ public void setUseProtocolV2(boolean b) { /** * Toggle tag peeling. *

    - *

    + * * This method must be invoked prior to any of the following: *

      *
    • {@link #send(Map)}
    • diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefLeaseSpec.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefLeaseSpec.java index 1af3fadad..8a131c897 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefLeaseSpec.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefLeaseSpec.java @@ -58,7 +58,6 @@ public String getExpected() { return expected; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder r = new StringBuilder(); 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 61d193593..0466085b3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefSpec.java @@ -616,7 +616,6 @@ private static boolean isValid(String s) { return true; } - /** {@inheritDoc} */ @Override public int hashCode() { int hc = 0; @@ -627,7 +626,6 @@ public int hashCode() { return hc; } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof RefSpec)) @@ -649,7 +647,6 @@ public boolean equals(Object obj) { && Objects.equals(getDestination(), b.getDestination()); } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder r = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java index 218e62c10..fb3cd21d1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RemoteRefUpdate.java @@ -541,7 +541,6 @@ protected void updateTrackingRef(RevWalk walk) throws IOException { trackingRefUpdate.setResult(localUpdate.update(walk)); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java index 96c7be5b9..1f96be8e4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java @@ -94,7 +94,6 @@ public class SideBandInputStream extends InputStream { out = outputStream; } - /** {@inheritDoc} */ @Override public int read() throws IOException { needDataPacket(); @@ -104,7 +103,6 @@ public int read() throws IOException { return rawIn.read(); } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { int r = 0; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandOutputStream.java index bb80299fa..b6d840dd8 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandOutputStream.java @@ -94,14 +94,12 @@ void flushBuffer() throws IOException { writeBuffer(); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { flushBuffer(); out.flush(); } - /** {@inheritDoc} */ @Override public void write(byte[] b, int off, int len) throws IOException { while (0 < len) { @@ -128,7 +126,6 @@ public void write(byte[] b, int off, int len) throws IOException { } } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { if (cnt == buffer.length) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java index 33308600d..1e85d8108 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandProgressMonitor.java @@ -28,7 +28,6 @@ class SideBandProgressMonitor extends BatchingProgressMonitor { write = true; } - /** {@inheritDoc} */ @Override protected void onUpdate(String taskName, int workCurr, Duration duration) { StringBuilder s = new StringBuilder(); @@ -37,7 +36,6 @@ protected void onUpdate(String taskName, int workCurr, Duration duration) { send(s); } - /** {@inheritDoc} */ @Override protected void onEndTask(String taskName, int workCurr, Duration duration) { StringBuilder s = new StringBuilder(); @@ -54,7 +52,6 @@ private void format(StringBuilder s, String taskName, int workCurr, appendDuration(s, duration); } - /** {@inheritDoc} */ @Override protected void onUpdate(String taskName, int cmp, int totalWork, int pcnt, Duration duration) { @@ -64,7 +61,6 @@ protected void onUpdate(String taskName, int cmp, int totalWork, int pcnt, send(s); } - /** {@inheritDoc} */ @Override protected void onEndTask(String taskName, int cmp, int totalWork, int pcnt, Duration duration) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java index 1226a6b5e..b2e2549f1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConfigStore.java @@ -43,6 +43,7 @@ public interface SshConfigStore { * {@link SshConstants#CONNECTION_ATTEMPTS}, fill those values with defaults * from the arguments: *
    caption
    + * * * * diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java index 48cacf096..be0c2963d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshConstants.java @@ -146,8 +146,8 @@ private SshConstants() { * Comma-separated list of jump hosts, defining a jump host chain in * reverse order. Each jump host is a SSH URI or "[user@]host[:port]". *

    - * Reverse order means: to connect A->B->target, one can do in - * {@code ~/.ssh/config} either of: + * Reverse order means: to connect {@literal A -> B -> target}, one can do + * in {@code ~/.ssh/config} either of: *

    * *
    diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshTransport.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshTransport.java
    index 28ec92c70..8d93977a1 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshTransport.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SshTransport.java
    @@ -108,7 +108,6 @@ protected RemoteSession getSession() throws TransportException {
     		return sock;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public void close() {
     		if (sock != null) {
    diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TestProtocol.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TestProtocol.java
    index 1985b66d8..77ab0f676 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TestProtocol.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TestProtocol.java
    @@ -81,19 +81,16 @@ public TestProtocol(UploadPackFactory uploadPackFactory,
     		this.handles = new HashMap<>();
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public String getName() {
     		return JGitText.get().transportProtoTest;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public Set getSchemes() {
     		return Collections.singleton(SCHEME);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public Transport open(URIish uri, Repository local, String remoteName)
     			throws NotSupportedException, TransportException {
    @@ -105,13 +102,11 @@ public Transport open(URIish uri, Repository local, String remoteName)
     		return new TransportInternal(local, uri, h);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public Set getRequiredFields() {
     		return EnumSet.of(URIishField.HOST, URIishField.PATH);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public Set getOptionalFields() {
     		return Collections.emptySet();
    diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TrackingRefUpdate.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TrackingRefUpdate.java
    index 51bc07cb9..26045a2c7 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TrackingRefUpdate.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TrackingRefUpdate.java
    @@ -174,7 +174,6 @@ private RefUpdate.Result decode(ReceiveCommand.Result status) {
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@SuppressWarnings("nls")
     	@Override
     	public String toString() {
    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 ee35f4866..4d2f4a9ac 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java
    @@ -533,10 +533,13 @@ public static Transport open(Repository local, URIish uri, String remoteName)
     	 * Note that the resulting transport instance can not be used for fetching
     	 * or pushing, but only for reading remote refs.
     	 *
    -	 * @param uri a {@link org.eclipse.jgit.transport.URIish} object.
    +	 * @param uri
    +	 *            a {@link org.eclipse.jgit.transport.URIish} object.
     	 * @return new Transport instance
     	 * @throws org.eclipse.jgit.errors.NotSupportedException
    +	 *             case that is not supported by JGit
     	 * @throws org.eclipse.jgit.errors.TransportException
    +	 *             if transport failed
     	 */
     	public static Transport open(URIish uri) throws NotSupportedException, TransportException {
     		for (WeakReference ref : protocols) {
    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 784f56615..58232a7dd 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportAmazonS3.java
    @@ -170,7 +170,6 @@ private static Properties loadPropertiesFile(File propsFile)
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		final DatabaseS3 c = new DatabaseS3(bucket, keyPrefix + "/objects"); //$NON-NLS-1$
    @@ -179,7 +178,6 @@ public FetchConnection openFetch() throws TransportException {
     		return r;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws TransportException {
     		final DatabaseS3 c = new DatabaseS3(bucket, keyPrefix + "/objects"); //$NON-NLS-1$
    @@ -188,7 +186,6 @@ public PushConnection openPush() throws TransportException {
     		return r;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public void close() {
     		// No explicit connections are maintained.
    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 04ebddb10..0f84f7e21 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleFile.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleFile.java
    @@ -105,7 +105,6 @@ public TransportBundleFile(URIish uri, File bundlePath) {
     		bundle = bundlePath;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws NotSupportedException,
     			TransportException {
    @@ -121,14 +120,12 @@ public FetchConnection openFetch() throws NotSupportedException,
     		return new BundleFetchConnection(this, src);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws NotSupportedException {
     		throw new NotSupportedException(
     				JGitText.get().pushIsNotSupportedForBundleTransport);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public void close() {
     		// Resources must be established per-connection.
    diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleStream.java
    index eac9208a3..0366bf3aa 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleStream.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportBundleStream.java
    @@ -57,7 +57,6 @@ public TransportBundleStream(final Repository db, final URIish uri,
     		src = in;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		if (src == null)
    @@ -69,14 +68,12 @@ public FetchConnection openFetch() throws TransportException {
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws NotSupportedException {
     		throw new NotSupportedException(
     				JGitText.get().pushIsNotSupportedForBundleTransport);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public void close() {
     		if (src != null) {
    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 a1914b618..43b3f6cce 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitAnon.java
    @@ -89,7 +89,6 @@ public Transport open(URIish uri) throws NotSupportedException, TransportExcepti
     		super(uri);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		return new TcpFetchConnection();
    @@ -102,13 +101,11 @@ public FetchConnection openFetch(Collection refSpecs,
     		return new TcpFetchConnection(refSpecs, additionalPatterns);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws TransportException {
     		return new TcpPushConnection();
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public void close() {
     		// Resources must be established per-connection.
    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 19ed4fbcc..a2273b21b 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportGitSsh.java
    @@ -140,7 +140,6 @@ public String getType() {
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		return new SshFetchConnection();
    @@ -153,7 +152,6 @@ public FetchConnection openFetch(Collection refSpecs,
     		return new SshFetchConnection(refSpecs, additionalPatterns);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws TransportException {
     		return new SshPushConnection();
    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 df034bdc8..c08b7fa24 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
    @@ -311,6 +311,7 @@ private URL toURL(URIish urish) throws MalformedURLException {
     	 * @param uri
     	 *            a {@link org.eclipse.jgit.transport.URIish} object.
     	 * @throws org.eclipse.jgit.errors.NotSupportedException
    +	 *             if URI is not supported by JGit
     	 * @since 4.9
     	 */
     	protected void setURI(URIish uri) throws NotSupportedException {
    @@ -327,7 +328,9 @@ protected void setURI(URIish uri) throws NotSupportedException {
     	 * Create a minimal HTTP transport with default configuration values.
     	 *
     	 * @param uri
    +	 *            URI to create a HTTP transport for
     	 * @throws NotSupportedException
    +	 *             if URI is not supported by JGit
     	 */
     	TransportHttp(URIish uri) throws NotSupportedException {
     		super(uri);
    @@ -445,7 +448,6 @@ public void setPreemptiveBasicAuthentication(String username,
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException,
     			NotSupportedException {
    @@ -532,7 +534,6 @@ private BufferedReader toBufferedReader(InputStream in) {
     		return new BufferedReader(new InputStreamReader(in, UTF_8));
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws NotSupportedException,
     			TransportException {
    @@ -567,7 +568,6 @@ private PushConnection smartPush(String service, HttpConnection c,
     		return p;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public void close() {
     		if (gitSession != null) {
    @@ -822,7 +822,7 @@ private static class CredentialItems {
     		/**
     		 * Trust the server for all git operations from this repository; may be
     		 * {@code null} if the transport was created via
    -		 * {@link #TransportHttp(URIish)}.
    +		 * {@link TransportHttp#TransportHttp(URIish)}.
     		 */
     		CredentialItem.YesNoType forRepo;
     
    @@ -1035,11 +1035,15 @@ private URL getServiceURL(String service)
     	/**
     	 * Open an HTTP connection.
     	 *
    -	 * @param method HTTP request method
    -	 * @param u url of the HTTP connection
    -	 * @param acceptEncoding accept-encoding header option
    +	 * @param method
    +	 *            HTTP request method
    +	 * @param u
    +	 *            url of the HTTP connection
    +	 * @param acceptEncoding
    +	 *            accept-encoding header option
     	 * @return the HTTP connection
     	 * @throws java.io.IOException
    +	 *             if an IO error occurred
     	 * @since 4.6
     	 */
     	protected HttpConnection httpOpen(String method, URL u,
    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 77d1419ea..3a06ce5b6 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportLocal.java
    @@ -151,7 +151,6 @@ private Repository openRepo() throws TransportException {
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		return openFetch(Collections.emptyList());
    @@ -170,7 +169,6 @@ public FetchConnection openFetch(Collection refSpecs,
     		return new InternalFetchConnection<>(this, upf, null, openRepo());
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws TransportException {
     		final String rp = getOptionReceivePack();
    @@ -183,7 +181,6 @@ public PushConnection openPush() throws TransportException {
     		return new InternalPushConnection<>(this, rpf, null, openRepo());
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public void close() {
     		// Resources must be established per-connection.
    diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportProtocol.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportProtocol.java
    index 912a90a1b..bfb840d75 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportProtocol.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportProtocol.java
    @@ -251,7 +251,9 @@ public abstract Transport open(URIish uri, Repository local,
     	 *            a {@link org.eclipse.jgit.transport.URIish} object.
     	 * @return new Transport
     	 * @throws org.eclipse.jgit.errors.NotSupportedException
    +	 *             this protocol does not support the URI.
     	 * @throws org.eclipse.jgit.errors.TransportException
    +	 *             the transport cannot open this URI.
     	 */
     	public Transport open(URIish uri)
     			throws NotSupportedException, TransportException {
    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 b9feeb9c0..a59d352e0 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportSftp.java
    @@ -104,7 +104,6 @@ public Transport open(URIish uri, Repository local, String remoteName)
     		super(local, uri);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		final SftpObjectDB c = new SftpObjectDB(uri.getPath());
    @@ -113,7 +112,6 @@ public FetchConnection openFetch() throws TransportException {
     		return r;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws TransportException {
     		final SftpObjectDB c = new SftpObjectDB(uri.getPath());
    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 c9bb89a43..4de6ff825 100644
    --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
    +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
    @@ -94,7 +94,7 @@ public class URIish implements Serializable {
     	private static final long serialVersionUID = 1L;
     
     	/**
    -	 * A pattern matching standard URI: 
    + * A pattern matching standard URI:
    * scheme "://" user_password? hostname? portnumber? path */ private static final Pattern FULL_URI = Pattern.compile("^" // //$NON-NLS-1$ @@ -175,6 +175,7 @@ public class URIish implements Serializable { * @param s * a {@link java.lang.String} object. * @throws java.net.URISyntaxException + * if {@code s} was null or couldn't be parsed */ public URIish(String s) throws URISyntaxException { if (StringUtils.isEmptyOrNull(s)) { @@ -477,6 +478,7 @@ public URIish setPath(String n) { * the new value for path. * @return a new URI with the updated value. * @throws java.net.URISyntaxException + * if URI couldn't be parsed from String */ public URIish setRawPath(String n) throws URISyntaxException { final URIish r = new URIish(this); @@ -551,7 +553,6 @@ public URIish setPort(int n) { return r; } - /** {@inheritDoc} */ @Override public int hashCode() { int hc = 0; @@ -570,7 +571,6 @@ public int hashCode() { return hc; } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof URIish)) @@ -611,7 +611,6 @@ public String toPrivateString() { return format(true, false); } - /** {@inheritDoc} */ @Override public String toString() { return format(false, false); @@ -683,7 +682,8 @@ public String toPrivateASCIIString() { /** * Get the "humanish" part of the path. Some examples of a 'humanish' part * for a full path: - *
    Description of arguments
    ssh config keyvalue from argument
    + *
    + * * * * 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 3264f556f..78e9110c7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -771,9 +771,13 @@ public void close() { * its own error handling mechanism. * * @param input + * input stream * @param output + * output stream * @param messages + * stream for messages * @throws java.io.IOException + * if an IO error occurred */ public void upload(InputStream input, OutputStream output, @Nullable OutputStream messages) throws IOException { @@ -2266,7 +2270,8 @@ private boolean wantSatisfied(RevObject want) throws IOException { * request in process * @param allTags * refs to search for annotated tags to include in the pack if - * the {@link #OPTION_INCLUDE_TAG} capability was requested. + * the {@link GitProtocolConstants#OPTION_INCLUDE_TAG} capability + * was requested. * @param unshallowCommits * shallow commits on the client that are now becoming unshallow * @param deepenNots @@ -2327,7 +2332,8 @@ private void sendPack(PackStatistics.Accumulator accumulator, * where to write statistics about the content of the pack. * @param allTags * refs to search for annotated tags to include in the pack if - * the {@link #OPTION_INCLUDE_TAG} capability was requested. + * the {@link GitProtocolConstants#OPTION_INCLUDE_TAG} capability + * was requested. * @param unshallowCommits * shallow commits on the client that are now becoming unshallow * @param deepenNots diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java index df98d0cfd..7b052ad4a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UserAgent.java @@ -94,10 +94,12 @@ public static void set(String agent) { /** * * @param options + * options * @param transportAgent + * name of transport agent * @return The transport agent. - * @deprecated Capabilities with = shape are now parsed - * alongside other capabilities in the ReceivePack flow. + * @deprecated Capabilities with <key>=<value> shape are now + * parsed alongside other capabilities in the ReceivePack flow. */ @Deprecated static String getAgent(Set options, String transportAgent) { @@ -117,9 +119,10 @@ static String getAgent(Set options, String transportAgent) { /** * * @param options + * options * @return True if the transport agent is set. False otherwise. - * @deprecated Capabilities with = shape are now parsed - * alongside other capabilities in the ReceivePack flow. + * @deprecated Capabilities with <key>=<value> shape are now + * parsed alongside other capabilities in the ReceivePack flow. */ @Deprecated static boolean hasAgent(Set options) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java index c0de42cb5..da8af5a0f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UsernamePasswordCredentialsProvider.java @@ -48,13 +48,11 @@ public UsernamePasswordCredentialsProvider(String username, char[] password) { this.password = password; } - /** {@inheritDoc} */ @Override public boolean isInteractive() { return false; } - /** {@inheritDoc} */ @Override public boolean supports(CredentialItem... items) { for (CredentialItem i : items) { @@ -77,7 +75,6 @@ public boolean supports(CredentialItem... items) { return true; } - /** {@inheritDoc} */ @Override public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java index c8cdb5a54..3bfc5234e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkEncryption.java @@ -130,6 +130,7 @@ OutputStream encrypt(OutputStream os) { * EncryptionUtil.java *

    * Note: EncryptionUtil is inadequate: + *

      *
    • EncryptionUtil.isCipherAvailableForUse checks encryption only which * "always works", but in JetS3t both encryption and decryption use non-IV * aware algorithm parameters for all PBE specs, which breaks in case of AES @@ -137,6 +138,7 @@ OutputStream encrypt(OutputStream os) { * JetS3t, such as PBEWithMD5AndDES and PBEWithSHAAndTwofish-CBC *
    • any AES based algorithms such as "PBE...With...And...AES" will not * work, since they need proper IV setup + *
    */ static class JetS3tV2 extends WalkEncryption { @@ -516,8 +518,10 @@ static class JGitV2 extends SymmetricEncryption { * Encryption factory. * * @param props - * @return instance + * configuration properties + * @return instance this object * @throws GeneralSecurityException + * if generic security failure occurred */ static WalkEncryption instance(Properties props) throws GeneralSecurityException { 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 cc6c252fa..8d89107c2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkFetchConnection.java @@ -186,13 +186,11 @@ class WalkFetchConnection extends BaseFetchConnection { workQueue = new LinkedList<>(); } - /** {@inheritDoc} */ @Override public boolean didFetchTestConnectivity() { return true; } - /** {@inheritDoc} */ @Override protected void doFetch(final ProgressMonitor monitor, final Collection want, final Set have) @@ -214,19 +212,16 @@ protected void doFetch(final ProgressMonitor monitor, } } - /** {@inheritDoc} */ @Override public Collection getPackLocks() { return packLocks; } - /** {@inheritDoc} */ @Override public void setPackLockMessage(String message) { lockMessage = message; } - /** {@inheritDoc} */ @Override public void close() { inserter.close(); 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 a54fd8e14..464017a84 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/WalkPushConnection.java @@ -104,7 +104,6 @@ class WalkPushConnection extends BaseConnection implements PushConnection { dest = w; } - /** {@inheritDoc} */ @Override public void push(final ProgressMonitor monitor, final Map refUpdates) @@ -112,7 +111,6 @@ public void push(final ProgressMonitor monitor, push(monitor, refUpdates, null); } - /** {@inheritDoc} */ @Override public void push(final ProgressMonitor monitor, final Map refUpdates, OutputStream out) @@ -184,7 +182,6 @@ protected void writeFile(String file, byte[] content) } } - /** {@inheritDoc} */ @Override public void close() { dest.close(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java index 98c231a46..125ee6cbe 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnection.java @@ -105,6 +105,7 @@ public interface HttpConnection { * @see HttpURLConnection#getResponseCode() * @return the HTTP Status-Code, or -1 * @throws java.io.IOException + * if an IO error occurred */ int getResponseCode() throws IOException; @@ -122,6 +123,7 @@ public interface HttpConnection { * @see HttpURLConnection#getResponseMessage() * @return the HTTP response message, or null * @throws java.io.IOException + * if an IO error occurred */ String getResponseMessage() throws IOException; @@ -207,14 +209,14 @@ void setRequestMethod(String method) * @exception IOException * if an I/O error occurs while creating the input stream. * @throws java.io.IOException - * if any. + * if an IO error occurred */ InputStream getInputStream() throws IOException; /** * Get header field. According to - * {@link RFC - * 2616} header field names are case insensitive. Header fields defined + * RFC 2616 + * header field names are case insensitive. Header fields defined * as a comma separated list can have multiple header fields with the same * field name. This method only returns one of these header fields. If you * want the union of all values of all multiple header fields with the same @@ -230,8 +232,8 @@ void setRequestMethod(String method) /** * Get all values of given header field. According to - * {@link RFC - * 2616} header field names are case insensitive. Header fields defined + * RFC 2616 + * header field names are case insensitive. Header fields defined * as a comma separated list can have multiple header fields with the same * field name. This method does not validate if the given header field is * defined as a comma separated list. @@ -287,6 +289,7 @@ void setRequestMethod(String method) * @see HttpURLConnection#getOutputStream() * @return an output stream that writes to this connection. * @throws java.io.IOException + * if an IO error occurred */ OutputStream getOutputStream() throws IOException; @@ -321,6 +324,7 @@ void setRequestMethod(String method) * * @see HttpURLConnection#connect() * @throws java.io.IOException + * if an IO error occurred */ void connect() throws IOException; @@ -338,7 +342,9 @@ void setRequestMethod(String method) * the source of randomness for this generator or null. See * {@link javax.net.ssl.SSLContext#init(KeyManager[], TrustManager[], SecureRandom)} * @throws java.security.NoSuchAlgorithmException + * if algorithm isn't available * @throws java.security.KeyManagementException + * if key management failed */ void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws NoSuchAlgorithmException, @@ -351,7 +357,9 @@ void configure(KeyManager[] km, TrustManager[] tm, * @param hostnameverifier * a {@link javax.net.ssl.HostnameVerifier} object. * @throws java.security.NoSuchAlgorithmException + * if algorithm isn't available * @throws java.security.KeyManagementException + * if key management failed */ void setHostnameVerifier(HostnameVerifier hostnameverifier) throws NoSuchAlgorithmException, KeyManagementException; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory.java index bd0aa3f7a..b50eaa418 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory.java @@ -28,6 +28,7 @@ public interface HttpConnectionFactory { * a {@link java.net.URL} object. * @return a {@link org.eclipse.jgit.transport.http.HttpConnection} * @throws java.io.IOException + * if an IO error occurred */ HttpConnection create(URL url) throws IOException; @@ -41,6 +42,7 @@ public interface HttpConnectionFactory { * the proxy to be used * @return a {@link org.eclipse.jgit.transport.http.HttpConnection} * @throws java.io.IOException + * if an IO error occurred */ HttpConnection create(URL url, Proxy proxy) throws IOException; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory2.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory2.java index 88abc6016..71d5c1b6f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory2.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/http/HttpConnectionFactory2.java @@ -48,7 +48,7 @@ interface GitSession { * {@link HttpConnectionFactory} instance * @param sslVerify * whether SSL is to be verified - * @return the configured {@connection} + * @return the configured {@code connection} * @throws IOException * if the connection cannot be configured * @throws GeneralSecurityException 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 3b0bae21e..8e9be1dde 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 @@ -55,7 +55,9 @@ public class JDKHttpConnection implements HttpConnection { * @param url * a {@link java.net.URL} object. * @throws java.net.MalformedURLException + * if URL is malformed * @throws java.io.IOException + * if an IO error occurred */ protected JDKHttpConnection(URL url) throws MalformedURLException, @@ -71,7 +73,9 @@ protected JDKHttpConnection(URL url) * @param proxy * a {@link java.net.Proxy} object. * @throws java.net.MalformedURLException + * if URL is malformed * @throws java.io.IOException + * if an IO error occurred */ protected JDKHttpConnection(URL url, Proxy proxy) throws MalformedURLException, IOException { @@ -79,73 +83,61 @@ protected JDKHttpConnection(URL url, Proxy proxy) .openConnection(proxy); } - /** {@inheritDoc} */ @Override public int getResponseCode() throws IOException { return wrappedUrlConnection.getResponseCode(); } - /** {@inheritDoc} */ @Override public URL getURL() { return wrappedUrlConnection.getURL(); } - /** {@inheritDoc} */ @Override public String getResponseMessage() throws IOException { return wrappedUrlConnection.getResponseMessage(); } - /** {@inheritDoc} */ @Override public Map> getHeaderFields() { return wrappedUrlConnection.getHeaderFields(); } - /** {@inheritDoc} */ @Override public void setRequestProperty(String key, String value) { wrappedUrlConnection.setRequestProperty(key, value); } - /** {@inheritDoc} */ @Override public void setRequestMethod(String method) throws ProtocolException { wrappedUrlConnection.setRequestMethod(method); } - /** {@inheritDoc} */ @Override public void setUseCaches(boolean usecaches) { wrappedUrlConnection.setUseCaches(usecaches); } - /** {@inheritDoc} */ @Override public void setConnectTimeout(int timeout) { wrappedUrlConnection.setConnectTimeout(timeout); } - /** {@inheritDoc} */ @Override public void setReadTimeout(int timeout) { wrappedUrlConnection.setReadTimeout(timeout); } - /** {@inheritDoc} */ @Override public String getContentType() { return wrappedUrlConnection.getContentType(); } - /** {@inheritDoc} */ @Override public InputStream getInputStream() throws IOException { return wrappedUrlConnection.getInputStream(); } - /** {@inheritDoc} */ @Override public String getHeaderField(@NonNull String name) { return wrappedUrlConnection.getHeaderField(name); @@ -167,68 +159,57 @@ private static List mapValuesToListIgnoreCase(String keyName, return fields; } - /** {@inheritDoc} */ @Override public int getContentLength() { return wrappedUrlConnection.getContentLength(); } - /** {@inheritDoc} */ @Override public void setInstanceFollowRedirects(boolean followRedirects) { wrappedUrlConnection.setInstanceFollowRedirects(followRedirects); } - /** {@inheritDoc} */ @Override public void setDoOutput(boolean dooutput) { wrappedUrlConnection.setDoOutput(dooutput); } - /** {@inheritDoc} */ @Override public void setFixedLengthStreamingMode(int contentLength) { wrappedUrlConnection.setFixedLengthStreamingMode(contentLength); } - /** {@inheritDoc} */ @Override public OutputStream getOutputStream() throws IOException { return wrappedUrlConnection.getOutputStream(); } - /** {@inheritDoc} */ @Override public void setChunkedStreamingMode(int chunklen) { wrappedUrlConnection.setChunkedStreamingMode(chunklen); } - /** {@inheritDoc} */ @Override public String getRequestMethod() { return wrappedUrlConnection.getRequestMethod(); } - /** {@inheritDoc} */ @Override public boolean usingProxy() { return wrappedUrlConnection.usingProxy(); } - /** {@inheritDoc} */ @Override public void connect() throws IOException { wrappedUrlConnection.connect(); } - /** {@inheritDoc} */ @Override public void setHostnameVerifier(HostnameVerifier hostnameverifier) { ((HttpsURLConnection) wrappedUrlConnection) .setHostnameVerifier(hostnameverifier); } - /** {@inheritDoc} */ @Override public void configure(KeyManager[] km, TrustManager[] tm, SecureRandom random) throws NoSuchAlgorithmException, 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 046f39504..36731a5fa 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 @@ -60,7 +60,6 @@ public FileResolver(File basePath, boolean exportAll) { setExportAll(exportAll); } - /** {@inheritDoc} */ @Override public Repository open(C req, String name) throws RepositoryNotFoundException, ServiceNotEnabledException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java index 3ef5b29a5..65b18086b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java @@ -718,7 +718,6 @@ public void getName(byte[] buffer, int offset) { System.arraycopy(path, pathOffset, buffer, offset, pathLen - pathOffset); } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 5c3f6aefe..c6d50d35f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/CanonicalTreeParser.java @@ -191,7 +191,6 @@ public void reset(ObjectReader reader, AnyObjectId id) reset(reader.open(id, OBJ_TREE).getCachedBytes()); } - /** {@inheritDoc} */ @Override public CanonicalTreeParser createSubtreeIterator(final ObjectReader reader, final MutableObjectId idBuffer) @@ -227,51 +226,43 @@ public final CanonicalTreeParser createSubtreeIterator0( return p; } - /** {@inheritDoc} */ @Override public CanonicalTreeParser createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException { return createSubtreeIterator(reader, new MutableObjectId()); } - /** {@inheritDoc} */ @Override public boolean hasId() { return true; } - /** {@inheritDoc} */ @Override public byte[] idBuffer() { return raw; } - /** {@inheritDoc} */ @Override public int idOffset() { return nextPtr - OBJECT_ID_LENGTH; } - /** {@inheritDoc} */ @Override public void reset() { if (!first()) reset(raw); } - /** {@inheritDoc} */ @Override public boolean first() { return currPtr == 0; } - /** {@inheritDoc} */ @Override public boolean eof() { return currPtr == raw.length; } - /** {@inheritDoc} */ @Override public void next(int delta) { if (delta == 1) { @@ -301,7 +292,6 @@ public void next(int delta) { parseEntry(); } - /** {@inheritDoc} */ @Override public void back(int delta) { if (delta == 1 && 0 <= prevPtr) { @@ -376,6 +366,7 @@ private void parseEntry() { * @return {@link org.eclipse.jgit.attributes.AttributesNode} for the * current entry. * @throws java.io.IOException + * if an IO error occurred * @since 4.2 */ public AttributesNode getEntryAttributesNode(ObjectReader reader) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java index 0661c9044..32368dcfb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/EmptyTreeIterator.java @@ -57,75 +57,63 @@ public EmptyTreeIterator(final AbstractTreeIterator p, pathLen = childPathOffset - 1; } - /** {@inheritDoc} */ @Override public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException { return new EmptyTreeIterator(this); } - /** {@inheritDoc} */ @Override public boolean hasId() { return false; } - /** {@inheritDoc} */ @Override public ObjectId getEntryObjectId() { return ObjectId.zeroId(); } - /** {@inheritDoc} */ @Override public byte[] idBuffer() { return zeroid; } - /** {@inheritDoc} */ @Override public int idOffset() { return 0; } - /** {@inheritDoc} */ @Override public void reset() { // Do nothing. } - /** {@inheritDoc} */ @Override public boolean first() { return true; } - /** {@inheritDoc} */ @Override public boolean eof() { return true; } - /** {@inheritDoc} */ @Override public void next(int delta) throws CorruptObjectException { // Do nothing. } - /** {@inheritDoc} */ @Override public void back(int delta) throws CorruptObjectException { // Do nothing. } - /** {@inheritDoc} */ @Override public void stopWalk() { if (parent != null) parent.stopWalk(); } - /** {@inheritDoc} */ @Override protected boolean needsStopWalk() { return parent != null && parent.needsStopWalk(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java index 60b92d727..36fa72028 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/FileTreeIterator.java @@ -175,7 +175,6 @@ protected FileTreeIterator(final WorkingTreeIterator p, final File root, init(entries()); } - /** {@inheritDoc} */ @Override public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException { @@ -425,13 +424,11 @@ public File getEntryFile() { return ((FileEntry) current()).getFile(); } - /** {@inheritDoc} */ @Override protected byte[] idSubmodule(Entry e) { return idSubmodule(getDirectory(), e); } - /** {@inheritDoc} */ @Override protected String readSymlinkTarget(Entry entry) throws IOException { return fs.readSymLink(getEntryFile()); 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 ece945232..e0a8af180 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java @@ -548,7 +548,7 @@ public void setHead(int index) { *

    * Retrieve the git attributes for the current entry. * - *

    Git attribute computation

    + *

    Git attribute computation

    * *
      *
    • Get the attributes matching the current path entry from the info file @@ -563,11 +563,10 @@ public void setHead(int index) { *
    • In the end, completes the list of matching attributes using the * global attribute file define in the configuration (see * {@link AttributesNodeProvider#getGlobalAttributesNode()})
    • - * *
    * * - *

    Iterator constraints

    + *

    Iterator constraints

    * *

    * In order to have a correct list of attributes for the current entry, this @@ -960,6 +959,8 @@ void stopWalk() throws IOException { * iterators to manage only one list of items, with the diving handled by * recursive trees. * + * @param + * Type of returned {@code AbstractTreeIterator} * @param nth * tree to obtain the current iterator of. * @param clazz @@ -1376,12 +1377,14 @@ public void enterSubtree() throws MissingObjectException, } /** - * Returns an AbstractTreeIterator from {@code trees} with the smallest name, and sets its - * {@code matches} field. This may clobber {@code matches} in other {@code tree}s. Other iterators - * at the same name will have their {@code matches} pointing to the same {@code min()} value. + * Returns an AbstractTreeIterator from {@code trees} with the smallest + * name, and sets its {@code matches} field. This may clobber + * {@code matches} in other {@code tree}s. Other iterators at the same name + * will have their {@code matches} pointing to the same {@code min()} value. * * @return the smallest tree iterator available. * @throws CorruptObjectException + * if an object is corrupt */ @SuppressWarnings("unused") AbstractTreeIterator min() throws CorruptObjectException { @@ -1488,6 +1491,7 @@ public T getTree(Class type) { * {{@link #getSmudgeCommand(int)} instead. * @return a filter command * @throws java.io.IOException + * if an IO error occurred * @since 4.2 */ public String getFilterCommand(String filterCommandType) @@ -1521,6 +1525,7 @@ public String getFilterCommand(String filterCommandType) * of the tree the item to be smudged is in * @return a filter command * @throws java.io.IOException + * if an IO error occurred * @since 6.1 */ public String getSmudgeCommand(int index) @@ -1536,6 +1541,7 @@ public String getSmudgeCommand(int index) * to use * @return a filter command * @throws java.io.IOException + * if an IO error occurred * @since 6.1 */ public String getSmudgeCommand(Attributes attributes) throws IOException { 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 b5d6610d5..aa544606a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -270,7 +270,6 @@ public boolean walksIgnoredDirectories() { return state.walkIgnored; } - /** {@inheritDoc} */ @Override public boolean hasId() { if (contentIdFromPtr == ptr) @@ -278,7 +277,6 @@ public boolean hasId() { return (mode & FileMode.TYPE_MASK) == FileMode.TYPE_FILE; } - /** {@inheritDoc} */ @Override public byte[] idBuffer() { if (contentIdFromPtr == ptr) @@ -316,7 +314,6 @@ public byte[] idBuffer() { return zeroid; } - /** {@inheritDoc} */ @Override public boolean isWorkTree() { return true; @@ -549,13 +546,11 @@ public Repository getRepository() { return repository; } - /** {@inheritDoc} */ @Override public int idOffset() { return contentIdOffset; } - /** {@inheritDoc} */ @Override public void reset() { if (!first()) { @@ -565,19 +560,16 @@ public void reset() { } } - /** {@inheritDoc} */ @Override public boolean first() { return ptr == 0; } - /** {@inheritDoc} */ @Override public boolean eof() { return ptr == entryCnt; } - /** {@inheritDoc} */ @Override public void next(int delta) throws CorruptObjectException { ptr += delta; @@ -586,7 +578,6 @@ public void next(int delta) throws CorruptObjectException { } } - /** {@inheritDoc} */ @Override public void back(int delta) throws CorruptObjectException { ptr -= delta; @@ -620,6 +611,7 @@ public long getEntryLength() { * * @return size of the content, in bytes * @throws java.io.IOException + * if an IO error occurred */ public long getEntryContentLength() throws IOException { if (canonLen == -1) { @@ -772,6 +764,7 @@ private IgnoreNode getIgnoreNode() throws IOException { * @return the {@link org.eclipse.jgit.attributes.AttributesNode} for the * current entry. * @throws IOException + * if an IO error occurred */ public AttributesNode getEntryAttributesNode() throws IOException { if (attributesNode instanceof PerDirectoryAttributesNode) @@ -964,6 +957,7 @@ public MetadataDiff compareMetadata(DirCacheEntry entry) { * access to repository objects if necessary. Should not be null. * @return true if content is most likely different. * @throws java.io.IOException + * if an IO error occurred * @since 3.3 */ public boolean isModified(DirCacheEntry entry, boolean forceContentCheck, @@ -1070,6 +1064,7 @@ && getOptions().getSymLinks() == SymLinks.FALSE * @return true if the content doesn't match, * false if it matches * @throws IOException + * if an IO error occurred */ private boolean contentCheck(DirCacheEntry entry, ObjectReader reader) throws IOException { @@ -1450,6 +1445,7 @@ void initializeReadBuffer() { * @return the clean filter command for the current entry or * null if no such command is defined * @throws java.io.IOException + * if an IO error occurred * @since 4.2 */ public String getCleanFilterCommand() throws IOException { @@ -1472,6 +1468,7 @@ public String getCleanFilterCommand() throws IOException { * {@link org.eclipse.jgit.treewalk.TreeWalk} is not based on a * {@link org.eclipse.jgit.lib.Repository} then null is returned. * @throws java.io.IOException + * if an IO error occurred * @since 4.3 */ public EolStreamType getEolStreamType() throws IOException { @@ -1486,6 +1483,7 @@ public EolStreamType getEolStreamType() throws IOException { * {@link TreeWalk} is not based on a {@link Repository} then null * is returned. * @throws IOException + * if an IO error occurred */ private EolStreamType getEolStreamType(OperationType opType) throws IOException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java index cafa926ff..c94160144 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/ByteArraySet.java @@ -39,6 +39,7 @@ class ByteArraySet { * Create an empty set. * * @param capacity + * initial capacity of the set */ ByteArraySet(int capacity) { initTable(1 << Integer.highestOneBit((capacity * 2) - 1)); @@ -180,7 +181,6 @@ private void initTable(int sz) { table = new byte[sz][]; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder sb = new StringBuilder(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java index 4731f345b..699ff6b68 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/IndexDiffFilter.java @@ -106,7 +106,6 @@ public IndexDiffFilter(int dirCacheIndex, int workingTreeIndex, this.honorIgnores = honorIgnores; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk tw) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -234,7 +233,6 @@ private WorkingTreeIterator workingTree(TreeWalk tw) { return tw.getTree(workingTree, WorkingTreeIterator.class); } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { // We cannot compare subtrees in the working tree, so encourage @@ -242,13 +240,11 @@ public boolean shouldBeRecursive() { return true; } - /** {@inheritDoc} */ @Override public TreeFilter clone() { return this; } - /** {@inheritDoc} */ @Override public String toString() { return "INDEX_DIFF_FILTER"; //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/InterIndexDiffFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/InterIndexDiffFilter.java index 163dc71da..0c0b09e7b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/InterIndexDiffFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/InterIndexDiffFilter.java @@ -28,7 +28,6 @@ public final class InterIndexDiffFilter extends TreeFilter { */ public static final TreeFilter INSTANCE = new InterIndexDiffFilter(); - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) { final int n = walker.getTreeCount(); @@ -57,19 +56,16 @@ public boolean include(TreeWalk walker) { return false; } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return false; } - /** {@inheritDoc} */ @Override public TreeFilter clone() { return this; } - /** {@inheritDoc} */ @Override public String toString() { return "INTERINDEX_DIFF"; //$NON-NLS-1$ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotIgnoredFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotIgnoredFilter.java index 7d04f27f3..25947da08 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotIgnoredFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotIgnoredFilter.java @@ -33,7 +33,6 @@ public NotIgnoredFilter(int workdirTreeIndex) { this.index = workdirTreeIndex; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk tw) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -41,20 +40,17 @@ public boolean include(TreeWalk tw) throws MissingObjectException, return i == null || !i.isEntryIgnored(); } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return false; } - /** {@inheritDoc} */ @Override public TreeFilter clone() { // immutable return this; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotTreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotTreeFilter.java index 4fb615321..e9cd83c2e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotTreeFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/NotTreeFilter.java @@ -38,13 +38,11 @@ private NotTreeFilter(TreeFilter one) { a = one; } - /** {@inheritDoc} */ @Override public TreeFilter negate() { return a; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, @@ -52,7 +50,6 @@ public boolean include(TreeWalk walker) return matchFilter(walker) == 0; } - /** {@inheritDoc} */ @Override public int matchFilter(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, @@ -69,20 +66,17 @@ public int matchFilter(TreeWalk walker) return -1; } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return a.shouldBeRecursive(); } - /** {@inheritDoc} */ @Override public TreeFilter clone() { final TreeFilter n = a.clone(); return n == a ? this : new NotTreeFilter(n); } - /** {@inheritDoc} */ @Override public String toString() { return "NOT " + a.toString(); //$NON-NLS-1$ 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 c94215fcb..63e587ab2 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 @@ -67,19 +67,16 @@ public String getPath() { return pathStr; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) { return matchFilter(walker) <= 0; } - /** {@inheritDoc} */ @Override public int matchFilter(TreeWalk walker) { return walker.isPathMatch(pathRaw, pathRaw.length); } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { for (byte b : pathRaw) @@ -88,13 +85,11 @@ public boolean shouldBeRecursive() { return false; } - /** {@inheritDoc} */ @Override public PathFilter clone() { return this; } - /** {@inheritDoc} */ @Override @SuppressWarnings("nls") public String toString() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java index 3816d5ed0..ec2590321 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathSuffixFilter.java @@ -56,13 +56,11 @@ private PathSuffixFilter(String s) { pathRaw = Constants.encode(pathStr); } - /** {@inheritDoc} */ @Override public TreeFilter clone() { return this; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -82,7 +80,6 @@ public int matchFilter(TreeWalk walker) throws MissingObjectException, return super.matchFilter(walker); } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return true; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/SkipWorkTreeFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/SkipWorkTreeFilter.java index 1ed2ef32c..e31152303 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/SkipWorkTreeFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/SkipWorkTreeFilter.java @@ -36,7 +36,6 @@ public SkipWorkTreeFilter(int treeIdx) { this.treeIdx = treeIdx; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) { DirCacheIterator i = walker.getTree(treeIdx, DirCacheIterator.class); @@ -47,19 +46,16 @@ public boolean include(TreeWalk walker) { return e == null || !e.isSkipWorkTree(); } - /** {@inheritDoc} */ @Override public boolean shouldBeRecursive() { return false; } - /** {@inheritDoc} */ @Override public TreeFilter clone() { return this; } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public String toString() { 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 6dbd508e4..28f2cd946 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,7 +220,6 @@ public int matchFilter(TreeWalk walker) @Override public abstract TreeFilter clone(); - /** {@inheritDoc} */ @Override public String toString() { String n = getClass().getName(); 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 527c5a69d..557e2cde3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/BlockList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/BlockList.java @@ -75,13 +75,11 @@ public BlockList(int capacity) { tailBlock = directory[0]; } - /** {@inheritDoc} */ @Override public int size() { return size; } - /** {@inheritDoc} */ @Override public void clear() { for (T[] block : directory) { @@ -94,7 +92,6 @@ public void clear() { tailBlock = directory[0]; } - /** {@inheritDoc} */ @Override public T get(int index) { if (index < 0 || size <= index) @@ -102,7 +99,6 @@ public T get(int index) { return directory[toDirectoryIndex(index)][toBlockIndex(index)]; } - /** {@inheritDoc} */ @Override public T set(int index, T element) { if (index < 0 || size <= index) @@ -160,7 +156,6 @@ public void addAll(T[] src, int srcIdx, int srcCnt) { } } - /** {@inheritDoc} */ @Override public boolean add(T element) { int i = tailBlkIdx; @@ -191,7 +186,6 @@ public boolean add(T element) { return true; } - /** {@inheritDoc} */ @Override public void add(int index, T element) { if (index == size) { @@ -213,7 +207,6 @@ public void add(int index, T element) { } } - /** {@inheritDoc} */ @Override public T remove(int index) { if (index == size - 1) { @@ -253,7 +246,6 @@ private void resetTailBlock() { tailBlock = directory[tailDirIdx]; } - /** {@inheritDoc} */ @Override public Iterator iterator() { return new MyIterator(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java index 5815c62e8..d8183eb8b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/CachedAuthenticator.java @@ -32,7 +32,6 @@ public static void add(CachedAuthentication ca) { cached.add(ca); } - /** {@inheritDoc} */ @Override protected final PasswordAuthentication getPasswordAuthentication() { final String host = getRequestingHost(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java index da1684630..ff136f7b3 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java @@ -13,22 +13,24 @@ /** * Equality utilities. * - * @since: 6.2 + * @since 6.2 */ public class Equality { /** - * Compare by reference - * - * @param a - * First object to compare - * @param b - * Second object to compare - * @return {@code true} if the objects are identical, {@code false} - * otherwise - * - * @since 6.2 - */ + * Compare by reference + * + * @param + * type of the objects to compare + * @param a + * First object to compare + * @param b + * Second object to compare + * @return {@code true} if the objects are identical, {@code false} + * otherwise + * + * @since 6.2 + */ @SuppressWarnings("ReferenceEquality") public static boolean isSameInstance(T a, T b) { return a == b; 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 aef9e64e0..f504c66eb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -118,6 +118,7 @@ protected FSFactory() { * Detect the file system * * @param cygwinUsed + * whether cygwin is used * @return FS instance */ public FS detect(Boolean cygwinUsed) { @@ -149,8 +150,11 @@ public static class ExecutionResult { /** * @param stdout + * stdout stream * @param stderr + * stderr stream * @param rc + * return code */ public ExecutionResult(TemporaryBuffer stdout, TemporaryBuffer stderr, int rc) { @@ -849,6 +853,7 @@ public Duration getFsTimestampResolution() { * timestamp resolution * * @param fsTimestampResolution + * resolution of filesystem timestamps */ public FileStoreAttributes( @NonNull Duration fsTimestampResolution) { @@ -1074,6 +1079,7 @@ private void detectSymlinkSupport() { * a {@link java.io.File} object. * @return last modified time of f * @throws java.io.IOException + * if an IO error occurred * @since 3.0 * @deprecated use {@link #lastModifiedInstant(Path)} instead */ @@ -1120,6 +1126,7 @@ public Instant lastModifiedInstant(File f) { * @param time * last modified time * @throws java.io.IOException + * if an IO error occurred * @since 3.0 * @deprecated use {@link #setLastModified(Path, Instant)} instead */ @@ -1138,6 +1145,7 @@ public void setLastModified(File f, long time) throws IOException { * @param time * last modified time * @throws java.io.IOException + * if an IO error occurred * @since 5.1.9 */ public void setLastModified(Path p, Instant time) throws IOException { @@ -1152,6 +1160,7 @@ public void setLastModified(Path p, Instant time) throws IOException { * a {@link java.io.File} object. * @return length of a file * @throws java.io.IOException + * if an IO error occurred * @since 3.0 */ public long length(File path) throws IOException { @@ -1164,7 +1173,7 @@ public long length(File path) throws IOException { * @param f * a {@link java.io.File} object. * @throws java.io.IOException - * this may be a Java7 subclass with detailed information + * if an IO error occurred * @since 3.3 */ public void delete(File f) throws IOException { @@ -1264,8 +1273,10 @@ public FS setUserHome(File path) { * Return all the attributes of a file, without following symbolic links. * * @param file + * the file * @return {@link BasicFileAttributes} of the file - * @throws IOException in case of any I/O errors accessing the file + * @throws IOException + * in case of any I/O errors accessing the file * * @since 4.5.6 */ @@ -1671,6 +1682,7 @@ protected static File resolveGrandparentFile(File grandchild) { * a {@link java.io.File} object. * @return target of link or null * @throws java.io.IOException + * if an IO error occurred * @since 3.0 */ public String readSymLink(File path) throws IOException { @@ -1684,6 +1696,7 @@ public String readSymLink(File path) throws IOException { * a {@link java.io.File} object. * @return true if the path is a symbolic link (and we support these) * @throws java.io.IOException + * if an IO error occurred * @since 3.0 */ public boolean isSymLink(File path) throws IOException { @@ -1738,6 +1751,7 @@ public boolean isFile(File path) { * @return true if path is hidden, either starts with . on unix or has the * hidden attribute in windows * @throws java.io.IOException + * if an IO error occurred * @since 3.0 */ public boolean isHidden(File path) throws IOException { @@ -1752,6 +1766,7 @@ public boolean isHidden(File path) throws IOException { * @param hidden * whether to set the file hidden * @throws java.io.IOException + * if an IO error occurred * @since 3.0 */ public void setHidden(File path, boolean hidden) throws IOException { @@ -1766,6 +1781,7 @@ public void setHidden(File path, boolean hidden) throws IOException { * @param target * target path of the symlink * @throws java.io.IOException + * if an IO error occurred * @since 3.0 */ public void createSymLink(File path, String target) throws IOException { @@ -1782,6 +1798,7 @@ public void createSymLink(File path, String target) throws IOException { * @return true if the file was created, false if * the file already existed * @throws java.io.IOException + * if an IO error occurred * @deprecated use {@link #createNewFileAtomic(File)} instead * @since 4.5 */ @@ -1852,6 +1869,7 @@ public String toString() { * @return LockToken this token must be closed after the created file was * deleted * @throws IOException + * if an IO error occurred * @since 4.7 */ public LockToken createNewFileAtomic(File path) throws IOException { @@ -2317,7 +2335,9 @@ private static boolean shutdownAndAwaitTermination(ExecutorService pool) { * The standard input stream passed to the process * @return The result of the executed command * @throws java.lang.InterruptedException + * if thread was interrupted * @throws java.io.IOException + * if an IO error occurred * @since 4.2 */ public ExecutionResult execute(ProcessBuilder pb, InputStream in) @@ -2441,8 +2461,10 @@ public Instant getLastModifiedInstant() { * Constructor when there are issues with reading. All attributes except * given will be set to the default values. * - * @param fs * @param path + * file path + * @param fs + * FS to use */ public Attributes(File path, FS fs) { this(fs, path, false, false, false, false, false, 0L, EPOCH, 0L); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java index 1c113617f..6f3184799 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_POSIX.java @@ -418,6 +418,7 @@ public boolean createNewFile(File lock) throws IOException { * @return LockToken this lock token must be held until the file is no * longer needed * @throws IOException + * if an IO error occurred * @since 5.0 */ @Override 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 ae73d3feb..5926655b7 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 @@ -58,43 +58,36 @@ protected FS_Win32(FS src) { super(src); } - /** {@inheritDoc} */ @Override public FS newInstance() { return new FS_Win32(this); } - /** {@inheritDoc} */ @Override public boolean supportsExecute() { return false; } - /** {@inheritDoc} */ @Override public boolean canExecute(File f) { return false; } - /** {@inheritDoc} */ @Override public boolean setExecute(File f, boolean canExec) { return false; } - /** {@inheritDoc} */ @Override public boolean isCaseSensitive() { return false; } - /** {@inheritDoc} */ @Override public boolean retryFailedLockFileCommit() { return true; } - /** {@inheritDoc} */ @Override public Entry[] list(File directory, FileModeStrategy fileModeStrategy) { if (!Files.isDirectory(directory.toPath(), LinkOption.NOFOLLOW_LINKS)) { @@ -140,7 +133,6 @@ public FileVisitResult visitFileFailed(Path file, return result.toArray(new Entry[0]); } - /** {@inheritDoc} */ @Override protected File discoverGitExe() { String path = SystemReader.getInstance().getenv("PATH"); //$NON-NLS-1$ @@ -171,7 +163,6 @@ protected File discoverGitExe() { return gitExe; } - /** {@inheritDoc} */ @Override protected File userHomeImpl() { String home = SystemReader.getInstance().getenv("HOME"); //$NON-NLS-1$ @@ -194,7 +185,6 @@ protected File userHomeImpl() { return super.userHomeImpl(); } - /** {@inheritDoc} */ @Override public ProcessBuilder runInShell(String cmd, String[] args) { List argv = new ArrayList<>(3 + args.length); @@ -207,7 +197,6 @@ public ProcessBuilder runInShell(String cmd, String[] args) { return proc; } - /** {@inheritDoc} */ @Override public Attributes getAttributes(File path) { return FileUtils.getFileAttributesBasic(this, path); 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 add549817..635351ac8 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 @@ -72,13 +72,11 @@ protected FS_Win32_Cygwin(FS src) { super(src); } - /** {@inheritDoc} */ @Override public FS newInstance() { return new FS_Win32_Cygwin(this); } - /** {@inheritDoc} */ @Override public File resolve(File dir, String pn) { String useCygPath = System.getProperty("jgit.usecygpath"); //$NON-NLS-1$ @@ -99,7 +97,6 @@ public File resolve(File dir, String pn) { return super.resolve(dir, pn); } - /** {@inheritDoc} */ @Override protected File userHomeImpl() { final String home = AccessController.doPrivileged( @@ -110,7 +107,6 @@ protected File userHomeImpl() { return resolve(new File("."), home); //$NON-NLS-1$ } - /** {@inheritDoc} */ @Override public ProcessBuilder runInShell(String cmd, String[] args) { List argv = new ArrayList<>(4 + args.length); @@ -129,14 +125,12 @@ String shellQuote(String cmd) { return QuotedString.BOURNE.quote(cmd.replace(File.separatorChar, '/')); } - /** {@inheritDoc} */ @Override public String relativize(String base, String other) { final String relativized = super.relativize(base, other); return relativized.replace(File.separatorChar, '/'); } - /** {@inheritDoc} */ @Override public ProcessResult runHookIfPresent(Repository repository, String hookName, String[] args, OutputStream outRedirect, OutputStream errRedirect, diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java index f013e7e09..9d052d13f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java @@ -288,6 +288,7 @@ public static void rename(File src, File dst) * @throws java.nio.file.AtomicMoveNotSupportedException * if file cannot be moved as an atomic file system operation * @throws java.io.IOException + * if an IO error occurred * @since 4.1 */ public static void rename(final File src, final File dst, @@ -446,6 +447,7 @@ public static void createNewFile(File f) throws IOException { * the target of the symbolic link * @return the path to the symbolic link * @throws java.io.IOException + * if an IO error occurred * @since 4.2 */ public static Path createSymLink(File path, String target) @@ -474,6 +476,7 @@ public static Path createSymLink(File path, String target) * a {@link java.io.File} object. * @return target path of the symlink, or null if it is not a symbolic link * @throws java.io.IOException + * if an IO error occurred * @since 3.0 */ public static String readSymLink(File path) throws IOException { @@ -499,6 +502,7 @@ public static String readSymLink(File path) throws IOException { * The parent dir, can be null to use system default temp dir. * @return the temp dir created. * @throws java.io.IOException + * if an IO error occurred * @since 3.4 */ public static File createTempDir(String prefix, String suffix, File dir) @@ -749,7 +753,10 @@ public static T readWithRetries(File file, } /** + * Check if file is a symlink + * * @param file + * the file to be checked if it is a symbolic link * @return {@code true} if the passed file is a symbolic link */ static boolean isSymlink(File file) { @@ -757,10 +764,14 @@ static boolean isSymlink(File file) { } /** + * Get the lastModified attribute for a given file + * * @param file + * the file * @return lastModified attribute for given file, not following symbolic * links * @throws IOException + * if an IO error occurred * @deprecated use {@link #lastModifiedInstant(Path)} instead which returns * FileTime */ @@ -771,7 +782,10 @@ static long lastModified(File file) throws IOException { } /** + * Get last modified timestamp of a file + * * @param path + * file path * @return lastModified attribute for given file, not following symbolic * links */ @@ -795,8 +809,10 @@ static Instant lastModifiedInstant(Path path) { * Return all the attributes of a file, without following symbolic links. * * @param file + * the file * @return {@link BasicFileAttributes} of the file - * @throws IOException in case of any I/O errors accessing the file + * @throws IOException + * in case of any I/O errors accessing the file * * @since 4.5.6 */ @@ -808,8 +824,11 @@ static BasicFileAttributes fileAttributes(File file) throws IOException { * Set the last modified time of a file system object. * * @param file + * the file * @param time + * last modified timestamp * @throws IOException + * if an IO error occurred */ @Deprecated static void setLastModified(File file, long time) throws IOException { @@ -820,8 +839,11 @@ static void setLastModified(File file, long time) throws IOException { * Set the last modified time of a file system object. * * @param path + * file path * @param time + * last modified timestamp of the file * @throws IOException + * if an IO error occurred */ static void setLastModified(Path path, Instant time) throws IOException { @@ -830,6 +852,7 @@ static void setLastModified(Path path, Instant time) /** * @param file + * the file * @return {@code true} if the given file exists, not following symbolic * links */ @@ -838,9 +861,13 @@ static boolean exists(File file) { } /** + * Check if file is hidden (on Windows) + * * @param file + * the file * @return {@code true} if the given file is hidden * @throws IOException + * if an IO error occurred */ static boolean isHidden(File file) throws IOException { return Files.isHidden(toPath(file)); @@ -854,6 +881,7 @@ static boolean isHidden(File file) throws IOException { * @param hidden * a boolean. * @throws java.io.IOException + * if an IO error occurred * @since 4.1 */ public static void setHidden(File file, boolean hidden) throws IOException { @@ -868,6 +896,7 @@ public static void setHidden(File file, boolean hidden) throws IOException { * a {@link java.io.File}. * @return length of the given file * @throws java.io.IOException + * if an IO error occurred * @since 4.1 */ public static long getLength(File file) throws IOException { @@ -879,7 +908,10 @@ public static long getLength(File file) throws IOException { } /** + * Check if file is directory + * * @param file + * the file * @return {@code true} if the given file is a directory, not following * symbolic links */ @@ -888,7 +920,10 @@ static boolean isDirectory(File file) { } /** + * Check if File is a file + * * @param file + * the file * @return {@code true} if the given file is a file, not following symbolic * links */ @@ -930,7 +965,9 @@ public static boolean canExecute(File file) { /** * @param fs + * a {@link org.eclipse.jgit.util.FS} object. * @param file + * the file * @return non null attributes object */ static Attributes getFileAttributesBasic(FS fs, File file) { @@ -1079,6 +1116,7 @@ public static String pathToString(File file) { * @param f * the file to touch * @throws IOException + * if an IO error occurred * @since 5.1.8 */ public static void touch(Path f) throws IOException { 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 e3ba60634..1942342c4 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/HttpSupport.java @@ -321,6 +321,7 @@ public static Proxy proxyFor(ProxySelector proxySelector, URL u) * a {@link org.eclipse.jgit.transport.http.HttpConnection} * object. * @throws java.io.IOException + * if an IO error occurred * @since 4.3 */ public static void disableSslVerify(HttpConnection conn) @@ -346,7 +347,9 @@ public static void disableSslVerify(HttpConnection conn) * that have all available protocols enabled already, up to the one * specified. *

    + *
    *

    path vs. humanish path
    PathHumanish part
    + * * * * @@ -354,16 +357,16 @@ public static void disableSslVerify(HttpConnection conn) * * * - * - * * * * - * - * * *
    TLS versions
    SSLContext.getInstance()OpenJDK
    "TLS"Supported: TLSv1, TLSV1.1, TLSv1.2 (+ TLSv1.3)
    + *
    Supported: TLSv1, TLSV1.1, TLSv1.2 (+ TLSv1.3)
    * Enabled: TLSv1, TLSV1.1, TLSv1.2 (+ TLSv1.3)
    Supported: TLSv1, TLSV1.1, TLSv1.2
    + *
    Supported: TLSv1, TLSV1.1, TLSv1.2
    * Enabled: TLSv1
    "TLSv1.2"Supported: TLSv1, TLSV1.1, TLSv1.2
    + *
    Supported: TLSv1, TLSV1.1, TLSv1.2
    * Enabled: TLSv1, TLSV1.1, TLSv1.2
    Supported: TLSv1, TLSV1.1, TLSv1.2
    + *
    Supported: TLSv1, TLSV1.1, TLSv1.2
    * Enabled: TLSv1.2
    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 635dd6a1c..6a5190c6a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/IntList.java @@ -204,7 +204,6 @@ private void grow() { entries = n; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder r = new StringBuilder(); @@ -232,8 +231,8 @@ public interface IntComparator { * the first int to compare * @param second * the second int to compare - * @return a negative number if first < second, 0 if first == second, or - * a positive number if first > second + * @return a negative number if first < second, 0 if first == second, or + * a positive number if first > second */ int compare(int first, int second); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java index 7456c71f5..d0b7b9fd2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java @@ -105,6 +105,7 @@ public LfsInputStream applyCleanFilter(Repository db, * @return a loader for the actual data of a blob, or the original loader in * case LFS is not applicable. * @throws IOException + * if an IO error occurred */ public ObjectLoader applySmudgeFilter(Repository db, ObjectLoader loader, Attribute attribute) throws IOException { @@ -117,6 +118,7 @@ public ObjectLoader applySmudgeFilter(Repository db, * @param repo * the {@link Repository} the hook is applied to. * @param outputStream + * output stream * @return a {@link PrePushHook} implementation or null */ @Nullable @@ -131,7 +133,9 @@ public PrePushHook getPrePushHook(Repository repo, * @param repo * the {@link Repository} the hook is applied to. * @param outputStream + * output stream * @param errorStream + * error stream * @return a {@link PrePushHook} implementation or null * @since 5.6 */ 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 b2bdfc1fd..47f38f462 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/LongList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/LongList.java @@ -140,7 +140,6 @@ private void grow() { entries = n; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder r = new StringBuilder(); 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 3de7a1587..be4bd9e35 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawCharSequence.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawCharSequence.java @@ -41,25 +41,21 @@ public RawCharSequence(byte[] buf, int start, int end) { endPtr = end; } - /** {@inheritDoc} */ @Override public char charAt(int index) { return (char) (buffer[startPtr + index] & 0xff); } - /** {@inheritDoc} */ @Override public int length() { return endPtr - startPtr; } - /** {@inheritDoc} */ @Override public CharSequence subSequence(int start, int end) { return new RawCharSequence(buffer, startPtr + start, startPtr + end); } - /** {@inheritDoc} */ @Override public String toString() { final int n = length(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java index 57464f3c4..04fdcd0fa 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawSubStringPattern.java @@ -98,7 +98,6 @@ public String pattern() { return needleString; } - /** {@inheritDoc} */ @Override public String toString() { return pattern(); 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 462bab081..2a287cfe7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java @@ -43,6 +43,8 @@ public class RefList implements Iterable { /** * Create an empty unmodifiable reference list. * + * @param + * type of reference being stored. * @return an empty unmodifiable reference list. */ @SuppressWarnings("unchecked") @@ -70,7 +72,6 @@ protected RefList(RefList src) { this.cnt = src.cnt; } - /** {@inheritDoc} */ @Override public Iterator iterator() { return new Iterator<>() { @@ -286,7 +287,6 @@ public final RefList put(T ref) { return add(idx, ref); } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder r = new StringBuilder(); @@ -305,6 +305,8 @@ public String toString() { /** * Create a {@link Collector} for {@link Ref}. * + * @param + * type of reference being stored. * @param mergeFunction * if specified the result will be sorted and deduped. * @return {@link Collector} for {@link Ref} @@ -390,6 +392,7 @@ public void remove(int idx) { * after additions are complete using {@link #sort()}. * * @param ref + * reference to add */ public void add(T ref) { if (list.length == size) { @@ -404,6 +407,7 @@ public void add(T ref) { * Add all items from another builder. * * @param other + * another builder * @since 5.4 */ public void addAll(Builder other) { @@ -454,6 +458,7 @@ public void sort() { * Dedupe the refs in place. Must be called after {@link #sort}. * * @param mergeFunction + * function used for de-duplication */ @SuppressWarnings("unchecked") void dedupe(BinaryOperator mergeFunction) { 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 c68a76cef..a4d1fd5b7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefMap.java @@ -119,13 +119,11 @@ public RefMap(String prefix, RefList packed, this.resolved = (RefList) resolved; } - /** {@inheritDoc} */ @Override public boolean containsKey(Object name) { return get(name) != null; } - /** {@inheritDoc} */ @Override public Ref get(Object key) { String name = toRefName((String) key); @@ -137,7 +135,6 @@ public Ref get(Object key) { return ref; } - /** {@inheritDoc} */ @Override public Ref put(String keyName, Ref value) { String name = toRefName(keyName); @@ -165,7 +162,6 @@ public Ref put(String keyName, Ref value) { return prior; } - /** {@inheritDoc} */ @Override public Ref remove(Object key) { String name = toRefName((String) key); @@ -189,13 +185,11 @@ public Ref remove(Object key) { return res; } - /** {@inheritDoc} */ @Override public boolean isEmpty() { return entrySet().isEmpty(); } - /** {@inheritDoc} */ @Override public Set> entrySet() { if (entrySet == null) { @@ -238,7 +232,6 @@ public void clear() { return entrySet; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder r = new StringBuilder(); @@ -259,6 +252,7 @@ public String toString() { * Create a {@link Collector} for {@link Ref}. * * @param mergeFunction + * merge function * @return {@link Collector} for {@link Ref} * @since 5.4 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/SshSupport.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/SshSupport.java index e29704158..42a76b5b1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/SshSupport.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/SshSupport.java @@ -48,6 +48,7 @@ public class SshSupport { * cases. * @return The entire output read from stdout. * @throws IOException + * if an IO error occurred * @throws CommandFailedException * if the ssh command execution failed, error message contains * the content of stderr. diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java index 917add360..274706042 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/StringUtils.java @@ -181,9 +181,9 @@ public static int compareWithCase(String a, String b) { * * @param stringValue * the string to parse. - * @return the boolean interpretation of {@code value}. + * @return the boolean interpretation of {@code stringValue}. * @throws java.lang.IllegalArgumentException - * if {@code value} is not recognized as one of the standard + * if {@code stringValue} is not recognized as one of the standard * boolean names. */ public static boolean toBoolean(String stringValue) { @@ -346,7 +346,7 @@ public static String replaceLineBreaksWithSpace(String in) { * allow negative numbers, too * @return the value parsed * @throws NumberFormatException - * if the {@value} is not parseable, or beyond the range of + * if the {@code value} is not parseable, or beyond the range of * {@link Long} * @throws StringIndexOutOfBoundsException * if the string is empty or contains only whitespace, or @@ -420,7 +420,7 @@ public static long parseLongWithSuffix(@NonNull String value, * allow negative numbers, too * @return the value parsed * @throws NumberFormatException - * if the {@value} is not parseable or beyond the range of + * if the {@code value} is not parseable or beyond the range of * {@link Integer} * @throws StringIndexOutOfBoundsException * if the string is empty or contains only whitespace, or diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFInputStream.java index cedb15982..ccc19691b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFInputStream.java @@ -57,14 +57,12 @@ public AutoCRLFInputStream(InputStream in, boolean detectBinary) { this.detectBinary = detectBinary; } - /** {@inheritDoc} */ @Override public int read() throws IOException { final int read = read(single, 0, 1); return read == 1 ? single[0] & 0xff : -1; } - /** {@inheritDoc} */ @Override public int read(byte[] bs, int off, int len) throws IOException { if (len == 0) @@ -103,7 +101,6 @@ public int read(byte[] bs, int off, int len) throws IOException { return n; } - /** {@inheritDoc} */ @Override public void close() throws IOException { in.close(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java index 305ccbd7e..9fb316f28 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoCRLFOutputStream.java @@ -65,14 +65,12 @@ public AutoCRLFOutputStream(OutputStream out, boolean detectBinary) { this.detectBinary = detectBinary; } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { onebytebuf[0] = (byte) b; write(onebytebuf, 0, 1); } - /** {@inheritDoc} */ @Override public void write(byte[] b) throws IOException { int overflow = buffer(b, 0, b.length); @@ -80,7 +78,6 @@ public void write(byte[] b) throws IOException { write(b, b.length - overflow, overflow); } - /** {@inheritDoc} */ @Override public void write(byte[] b, int startOff, int startLen) throws IOException { @@ -151,7 +148,6 @@ private void decideMode(boolean complete) throws IOException { write(binbuf, 0, cachedLen); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { if (binbufcnt <= binbuf.length) { @@ -161,7 +157,6 @@ public void flush() throws IOException { out.flush(); } - /** {@inheritDoc} */ @Override public void close() throws IOException { flush(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java index 7db882c07..238586567 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFInputStream.java @@ -185,14 +185,12 @@ public AutoLFInputStream(InputStream in, boolean detectBinary, this.forCheckout = false; } - /** {@inheritDoc} */ @Override public int read() throws IOException { final int read = read(single, 0, 1); return read == 1 ? single[0] & 0xff : -1; } - /** {@inheritDoc} */ @Override public int read(byte[] bs, int off, int len) throws IOException { @@ -242,7 +240,6 @@ public boolean isBinary() { return isBinary; } - /** {@inheritDoc} */ @Override public void close() throws IOException { in.close(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java index a0e9fb68c..e56991d43 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/AutoLFOutputStream.java @@ -69,14 +69,12 @@ public AutoLFOutputStream(OutputStream out, boolean detectBinary) { this.detectBinary = detectBinary; } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { onebytebuf[0] = (byte) b; write(onebytebuf, 0, 1); } - /** {@inheritDoc} */ @Override public void write(byte[] b) throws IOException { int overflow = buffer(b, 0, b.length); @@ -85,7 +83,6 @@ public void write(byte[] b) throws IOException { } } - /** {@inheritDoc} */ @Override public void write(byte[] b, int startOff, int startLen) throws IOException { @@ -164,7 +161,6 @@ private void decideMode(boolean complete) throws IOException { write(binbuf, 0, cachedLen); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { if (binbufcnt <= binbuf.length) { @@ -173,7 +169,6 @@ public void flush() throws IOException { out.flush(); } - /** {@inheritDoc} */ @Override public void close() throws IOException { flush(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/CountingOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/CountingOutputStream.java index 782f3f4ca..d0049d29d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/CountingOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/CountingOutputStream.java @@ -39,27 +39,23 @@ public long getCount() { return cnt; } - /** {@inheritDoc} */ @Override public void write(int val) throws IOException { out.write(val); cnt++; } - /** {@inheritDoc} */ @Override public void write(byte[] buf, int off, int len) throws IOException { out.write(buf, off, len); cnt += len; } - /** {@inheritDoc} */ @Override public void flush() throws IOException { out.flush(); } - /** {@inheritDoc} */ @Override public void close() throws IOException { out.close(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/DisabledOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/DisabledOutputStream.java index f1bfbe29a..03c25bb70 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/DisabledOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/DisabledOutputStream.java @@ -27,7 +27,6 @@ private DisabledOutputStream() { // more than one instance from being created. } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { // We shouldn't be writing output at this stage, there diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/IsolatedOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/IsolatedOutputStream.java index 2bbdbefd3..1faf6ea9a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/IsolatedOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/IsolatedOutputStream.java @@ -58,13 +58,11 @@ public IsolatedOutputStream(OutputStream out) { new ArrayBlockingQueue<>(1), new NamedThreadFactory()); } - /** {@inheritDoc} */ @Override public void write(int ch) throws IOException { write(new byte[] { (byte) ch }, 0, 1); } - /** {@inheritDoc} */ @Override public void write(byte[] buf, int pos, int cnt) throws IOException { @@ -75,7 +73,6 @@ public void write(byte[] buf, int pos, int cnt) }); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { checkClosed(); @@ -85,7 +82,6 @@ public void flush() throws IOException { }); } - /** {@inheritDoc} */ @Override public void close() throws IOException { if (!copier.isShutdown()) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/LimitedInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/LimitedInputStream.java index 88006242d..681a52988 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/LimitedInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/LimitedInputStream.java @@ -47,21 +47,18 @@ protected LimitedInputStream(InputStream in, long limit) { this.limit = limit; } - /** {@inheritDoc} */ @Override public int available() throws IOException { return (int) Math.min(in.available(), left); } // it's okay to mark even if mark isn't supported, as reset won't work - /** {@inheritDoc} */ @Override public synchronized void mark(int readLimit) { in.mark(readLimit); mark = left; } - /** {@inheritDoc} */ @Override public int read() throws IOException { if (left == 0) { @@ -78,7 +75,6 @@ public int read() throws IOException { return result; } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { if (left == 0) { @@ -96,7 +92,6 @@ public int read(byte[] b, int off, int len) throws IOException { return result; } - /** {@inheritDoc} */ @Override public synchronized void reset() throws IOException { if (!in.markSupported()) @@ -109,7 +104,6 @@ public synchronized void reset() throws IOException { left = mark; } - /** {@inheritDoc} */ @Override public long skip(long n) throws IOException { n = Math.min(n, left); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/MessageWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/MessageWriter.java index 263776615..8d5b8fdcb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/MessageWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/MessageWriter.java @@ -51,7 +51,6 @@ public MessageWriter() { enc = new OutputStreamWriter(getRawStream(), UTF_8); } - /** {@inheritDoc} */ @Override public void write(char[] cbuf, int off, int len) throws IOException { synchronized (buf) { @@ -71,20 +70,17 @@ public OutputStream getRawStream() { return buf; } - /** {@inheritDoc} */ @Override public void close() throws IOException { // Do nothing, we are buffered with no resources. } - /** {@inheritDoc} */ @Override public void flush() throws IOException { // Do nothing, we are buffered with no resources. } /** @return string version of all buffered data. */ - /** {@inheritDoc} */ @Override public String toString() { return RawParseUtils.decode(buf.toByteArray()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java index c0724e43f..ed412fa6f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/StreamCopyThread.java @@ -67,7 +67,6 @@ public void halt() throws InterruptedException { } } - /** {@inheritDoc} */ @Override public void run() { 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 56d0169f7..96376bfc6 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 @@ -46,7 +46,6 @@ public TeeInputStream(InputStream src, OutputStream dst) { this.dst = dst; } - /** {@inheritDoc} */ @Override public int read() throws IOException { byte[] b = skipBuffer(); @@ -54,7 +53,6 @@ public int read() throws IOException { return n == 1 ? b[0] & 0xff : -1; } - /** {@inheritDoc} */ @Override public long skip(long count) throws IOException { long skipped = 0; @@ -71,7 +69,6 @@ public long skip(long count) throws IOException { return skipped; } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { if (len == 0) @@ -83,7 +80,6 @@ public int read(byte[] b, int off, int len) throws IOException { return n; } - /** {@inheritDoc} */ @Override public void close() throws IOException { byte[] b = skipBuffer(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeOutputStream.java index e6fdd709b..ab084a66f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TeeOutputStream.java @@ -34,35 +34,30 @@ public TeeOutputStream(OutputStream stream1, OutputStream stream2) { this.stream2 = stream2; } - /** {@inheritDoc} */ @Override public void write(byte[] buf) throws IOException { this.stream1.write(buf); this.stream2.write(buf); } - /** {@inheritDoc} */ @Override public void write(byte[] buf, int off, int len) throws IOException { this.stream1.write(buf, off, len); this.stream2.write(buf, off, len); } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { this.stream1.write(b); this.stream2.write(b); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { this.stream1.flush(); this.stream2.flush(); } - /** {@inheritDoc} */ @Override public void close() throws IOException { try { 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 3bc92d5bc..4764676c8 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 @@ -41,19 +41,16 @@ public ThrowingPrintWriter(Writer out) { ); } - /** {@inheritDoc} */ @Override public void write(char[] cbuf, int off, int len) throws IOException { out.write(cbuf, off, len); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { out.flush(); } - /** {@inheritDoc} */ @Override public void close() throws IOException { out.close(); @@ -62,8 +59,10 @@ public void close() throws IOException { /** * Print a string and terminate with a line feed. * - * @param s a {@link java.lang.String} object. + * @param s + * a {@link java.lang.String} object. * @throws java.io.IOException + * if an IO error occurred */ public void println(String s) throws IOException { print(s + LF); @@ -73,6 +72,7 @@ public void println(String s) throws IOException { * Print a platform dependent new line * * @throws java.io.IOException + * if an IO error occurred */ public void println() throws IOException { print(LF); @@ -81,8 +81,10 @@ public void println() throws IOException { /** * Print a char * - * @param value a char. + * @param value + * a char. * @throws java.io.IOException + * if an IO error occurred */ public void print(char value) throws IOException { print(String.valueOf(value)); @@ -94,6 +96,7 @@ public void print(char value) throws IOException { * @param value * an int. * @throws java.io.IOException + * if an IO error occurred */ public void print(int value) throws IOException { print(String.valueOf(value)); @@ -102,8 +105,10 @@ public void print(int value) throws IOException { /** * Print a long as string * - * @param value a long. + * @param value + * a long. * @throws java.io.IOException + * if an IO error occurred */ public void print(long value) throws IOException { print(String.valueOf(value)); @@ -112,8 +117,10 @@ public void print(long value) throws IOException { /** * Print a short as string * - * @param value a short. + * @param value + * a short. * @throws java.io.IOException + * if an IO error occurred */ public void print(short value) throws IOException { print(String.valueOf(value)); @@ -128,6 +135,7 @@ public void print(short value) throws IOException { * @param args * objects. * @throws java.io.IOException + * if an IO error occurred */ public void format(String fmt, Object... args) throws IOException { print(String.format(fmt, args)); @@ -139,6 +147,7 @@ public void format(String fmt, Object... args) throws IOException { * @param any * an object. * @throws java.io.IOException + * if an IO error occurred */ public void print(Object any) throws IOException { out.write(String.valueOf(any)); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutInputStream.java index 1947b3bf0..4d9f83d23 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutInputStream.java @@ -63,7 +63,6 @@ public void setTimeout(int millis) { timeout = millis; } - /** {@inheritDoc} */ @Override public int read() throws IOException { try { @@ -76,13 +75,11 @@ public int read() throws IOException { } } - /** {@inheritDoc} */ @Override public int read(byte[] buf) throws IOException { return read(buf, 0, buf.length); } - /** {@inheritDoc} */ @Override public int read(byte[] buf, int off, int cnt) throws IOException { try { @@ -95,7 +92,6 @@ public int read(byte[] buf, int off, int cnt) throws IOException { } } - /** {@inheritDoc} */ @Override public long skip(long cnt) throws IOException { try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutOutputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutOutputStream.java index 3fbf6ffdc..afd798a1a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/TimeoutOutputStream.java @@ -65,7 +65,6 @@ public void setTimeout(int millis) { timeout = millis; } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { try { @@ -78,13 +77,11 @@ public void write(int b) throws IOException { } } - /** {@inheritDoc} */ @Override public void write(byte[] buf) throws IOException { write(buf, 0, buf.length); } - /** {@inheritDoc} */ @Override public void write(byte[] buf, int off, int len) throws IOException { try { @@ -97,7 +94,6 @@ public void write(byte[] buf, int off, int len) throws IOException { } } - /** {@inheritDoc} */ @Override public void flush() throws IOException { try { @@ -110,7 +106,6 @@ public void flush() throws IOException { } } - /** {@inheritDoc} */ @Override public void close() throws IOException { try { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/UnionInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/UnionInputStream.java index 459888190..b37f28b16 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/UnionInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/UnionInputStream.java @@ -91,7 +91,6 @@ public boolean isEmpty() { return streams.isEmpty(); } - /** {@inheritDoc} */ @Override public int read() throws IOException { for (;;) { @@ -106,7 +105,6 @@ else if (in == EOF) } } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { if (len == 0) @@ -123,13 +121,11 @@ else if (in == EOF) } } - /** {@inheritDoc} */ @Override public int available() throws IOException { return head().available(); } - /** {@inheritDoc} */ @Override public long skip(long count) throws IOException { long skipped = 0; @@ -163,7 +159,6 @@ public long skip(long count) throws IOException { return skipped; } - /** {@inheritDoc} */ @Override public void close() throws IOException { IOException err = null; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java index 56e90d063..0a56c8304 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java @@ -193,7 +193,6 @@ public abstract void digest(MutableObjectId id) *

    * Implementations not supporting collision detection always return * {@code false}. - *

    * * @return {@code true} if a likely collision was detected. */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/time/MonotonicSystemClock.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/time/MonotonicSystemClock.java index 66857b5bf..4e079f08b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/time/MonotonicSystemClock.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/time/MonotonicSystemClock.java @@ -37,7 +37,6 @@ private static long nowMicros() { } } - /** {@inheritDoc} */ @Override public ProposedTimestamp propose() { final long u = nowMicros(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/time/ProposedTimestamp.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/time/ProposedTimestamp.java index 8c20423bc..a5ee1070d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/time/ProposedTimestamp.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/time/ProposedTimestamp.java @@ -162,7 +162,6 @@ public void close() { // Do nothing by default. } - /** {@inheritDoc} */ @Override public String toString() { return instant().toString(); diff --git a/pom.xml b/pom.xml index 5576640d3..d04ecf572 100644 --- a/pom.xml +++ b/pom.xml @@ -465,13 +465,38 @@ org.apache.maven.plugins maven-javadoc-plugin - -Xdoclint:-missing + + -Xdoclint:none--> ${project.build.sourceEncoding} true + true org.eclipse.jgit.http.test https://docs.oracle.com/en/java/javase/11/docs/api + + + apiNote + a + API Note: + + + implSpec + a + Implementation Requirements: + + + implNote + a + Implementation Note: + + @@ -589,7 +614,7 @@ - -Xdoclint:-missing + true