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 f79df5b9dd..a08ba7b56f 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 0d409bbf03..07b60cfc79 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 @@ public class GitAddTask extends Task { 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 1f10588b4e..ecb5f9addd 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 class GitCheckoutTask extends Task { 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 c143c9c6e1..facf2ac6a0 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 class GitCloneTask extends Task { 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 161168fbe3..5c2a26b9ee 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 class GitInitTask extends Task { 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 2abe9529d3..b27b6c3c7d 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 0ebac77228..25cd36817a 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 702bad62fe..dfa60321b0 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 final class TarFormat extends BaseFormat implements Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -58,7 +56,6 @@ public final class TarFormat extends BaseFormat implements return applyFormatOptions(out, o); } - /** {@inheritDoc} */ @Override public void putEntry(ArchiveOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) @@ -108,19 +105,16 @@ public final class TarFormat extends BaseFormat implements 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 940dafd40f..26da431147 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 final class Tbz2Format extends BaseFormat implements Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -55,7 +53,6 @@ public final class Tbz2Format extends BaseFormat implements 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 final class Tbz2Format extends BaseFormat implements 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 72e2439f68..d1ed035d0f 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 final class TgzFormat extends BaseFormat implements Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -58,7 +56,6 @@ public final class TgzFormat extends BaseFormat implements 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 final class TgzFormat extends BaseFormat implements 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 b16fb6dcbd..42549de302 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 final class TxzFormat extends BaseFormat implements Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -55,7 +53,6 @@ public final class TxzFormat extends BaseFormat implements 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 final class TxzFormat extends BaseFormat implements 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 97a24c75cb..6cb42ae1e5 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 final class ZipFormat extends BaseFormat implements Collections. emptyMap()); } - /** {@inheritDoc} */ @Override public ArchiveOutputStream createArchiveOutputStream(OutputStream s, Map o) throws IOException { @@ -55,7 +53,6 @@ public final class ZipFormat extends BaseFormat implements return applyFormatOptions(out, o); } - /** {@inheritDoc} */ @Override public void putEntry(ArchiveOutputStream out, ObjectId tree, String path, FileMode mode, ObjectLoader loader) @@ -97,19 +94,16 @@ public final class ZipFormat extends BaseFormat implements 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 d1f54bbe65..d5c0e6c7e0 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 8cd03bd36f..d7bf34e3ac 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 @@ public class BouncyCastleGpgKeyLocator { * @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 @@ public class BouncyCastleGpgKeyLocator { * @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 @@ public class BouncyCastleGpgKeyLocator { /** * 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 6144195983..463b661127 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 @@ class BouncyCastleGpgKeyPassphrasePrompt implements AutoCloseable { * 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 c931724710..3eee18aef5 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 @@ import org.eclipse.jgit.util.sha1.SHA1; * 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 a9bb22c780..c93c2164c9 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 class SExprParser { * * @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 class SExprParser { * * @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 269a1ba0f6..a659d38fd3 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 @@ public final class SecretKeys { * 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 f79df5b9dd..a08ba7b56f 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 90348f54b9..6d806dee37 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 @@ public class HttpClientConnection implements HttpConnection { * 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 class HttpClientConnection implements HttpConnection { * 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 class HttpClientConnection implements HttpConnection { * 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 class HttpClientConnection implements HttpConnection { * 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 class HttpClientConnection implements HttpConnection { 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 @@ public class HttpClientConnection implements HttpConnection { } } - /** {@inheritDoc} */ @Override public Map> getHeaderFields() { Map> ret = new HashMap<>(); @@ -304,13 +310,11 @@ public class HttpClientConnection implements HttpConnection { 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 class HttpClientConnection implements HttpConnection { } } - /** {@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 class HttpClientConnection implements HttpConnection { return null; } - /** {@inheritDoc} */ @Override public InputStream getInputStream() throws IOException { execute(); @@ -366,7 +365,6 @@ public class HttpClientConnection implements HttpConnection { } // will return only the first field - /** {@inheritDoc} */ @Override public String getHeaderField(@NonNull String name) { Header header = resp.getFirstHeader(name); @@ -379,7 +377,6 @@ public class HttpClientConnection implements HttpConnection { .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 class HttpClientConnection implements HttpConnection { } } - /** {@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 class HttpClientConnection implements HttpConnection { entity.setContentLength(contentLength); } - /** {@inheritDoc} */ @Override public OutputStream getOutputStream() throws IOException { if (entity == null) @@ -424,7 +417,6 @@ public class HttpClientConnection implements HttpConnection { return entity.getBuffer(); } - /** {@inheritDoc} */ @Override public void setChunkedStreamingMode(int chunklen) { if (entity == null) @@ -432,31 +424,26 @@ public class HttpClientConnection implements HttpConnection { 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 101886c887..40be0747ef 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 class TemporaryBufferEntity extends AbstractHttpEntity return buffer; } - /** {@inheritDoc} */ @Override public boolean isRepeatable() { return true; } - /** {@inheritDoc} */ @Override public long getContentLength() { if (contentLength != null) @@ -61,20 +60,17 @@ public class TemporaryBufferEntity extends AbstractHttpEntity 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 class TemporaryBufferEntity extends AbstractHttpEntity * 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 f79df5b9dd..a08ba7b56f 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 59dc309ccf..fb74dc7024 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 0957cc80fa..2f3eee41d6 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 @@ public class GitFilter extends MetaFilter { throw new IllegalStateException(HttpServerText.get().alreadyInitializedByContainer); } - /** {@inheritDoc} */ @Override public void init(FilterConfig filterConfig) throws ServletException { super.init(filterConfig); @@ -305,7 +304,6 @@ public class GitFilter extends MetaFilter { } } - /** {@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 8e49b37b3d..0157dff9f5 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 class GitServlet extends MetaServlet { 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 e90580b75f..d94cc41268 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 @@ import org.eclipse.jgit.lib.ObjectDatabase; 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 f67313d77f..4d86be1916 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 @@ import org.eclipse.jgit.util.HttpSupport; 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 e0d95128e3..434cdb48d1 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 @@ import org.eclipse.jgit.lib.Repository; * 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 4f9e6f2223..b1a2b30995 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 @@ import javax.servlet.http.HttpServletResponse; /** 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 625ab3e663..e581707ccf 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 @@ abstract class ObjectFileServlet extends HttpServlet { 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 a7ca4d0931..c87bbe6145 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 ReceivePackErrorHandler { * 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 f8c95f56d4..56b4c80743 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 @@ class ReceivePackServlet extends HttpServlet { 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 943e7f5d4f..9ff922bd7d 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 class RepositoryFilter implements Filter { 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 11123d0079..fdac79d4b0 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 @@ class SmartOutputStream extends TemporaryBuffer { 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 6110bff334..aa04431285 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 @@ abstract class SmartServiceInfoRefs implements Filter { * @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 @@ abstract class SmartServiceInfoRefs implements Filter { * @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 df8eb77271..0b225e769f 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 2aadbbc984..aaf537f283 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 interface UploadPackErrorHandler { } return SC_INTERNAL_SERVER_ERROR; } + /** * @param req * The HTTP request @@ -66,6 +67,7 @@ public interface UploadPackErrorHandler { * @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 UploadPackErrorHandler { * 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 f16e56d949..74419a50d8 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 @@ class UploadPackServlet extends HttpServlet { : 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 7f4243a730..822bb79644 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 class ErrorServlet extends HttpServlet { 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 772b996616..e626bec134 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 class MetaFilter implements Filter { 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 class MetaFilter implements Filter { }; } - /** {@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 a0fa5ea5bb..9a1a24960f 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 class MetaServlet extends HttpServlet { return filter.serveRegex(expression); } - /** {@inheritDoc} */ @Override public void init(ServletConfig config) throws ServletException { String name = filter.getClass().getName(); @@ -96,13 +95,11 @@ public class MetaServlet extends HttpServlet { 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 ebe272885b..3f7ee2a664 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 @@ final class NoParameterFilterConfig implements FilterConfig { }; } - /** {@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 a321c96728..c8ff6a3308 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 class RegexGroupFilter implements Filter { 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 431202b2ba..5baa14a618 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 @@ class RegexPipeline extends UrlPipeline { } } - /** {@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 21f1800239..cd490230d9 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 @@ abstract class ServletBinderImpl implements ServletBinder { 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 86441b18c3..39d57b59ec 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 @@ class SuffixPipeline extends UrlPipeline { 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 e6bc934288..4bac040238 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 class WrappedRequest extends HttpServletRequestWrapper { 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 16b27e8bd6..0bf10cbd78 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 @@ public class DefaultReceivePackFactory implements } } - /** {@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 d362a96bec..29314359c8 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 @@ public class DefaultUploadPackFactory implements } } - /** {@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 4167b038e1..86da87f8d6 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 @@ class RefsUnreadableInMemoryRepository extends InMemoryRepository { private class RefsUnreadableRefDatabase extends MemRefDatabase { - /** {@inheritDoc} */ @Override public Ref exactRef(String name) throws IOException { if (failing) { @@ -63,7 +61,6 @@ class RefsUnreadableInMemoryRepository extends InMemoryRepository { return super.exactRef(name); } - /** {@inheritDoc} */ @Override public Map getRefs(String prefix) throws IOException { if (failing) { @@ -73,7 +70,6 @@ class RefsUnreadableInMemoryRepository extends InMemoryRepository { return super.getRefs(prefix); } - /** {@inheritDoc} */ @Override public List getRefsByPrefix(String prefix) throws IOException { if (failing) { @@ -83,7 +79,6 @@ class RefsUnreadableInMemoryRepository extends InMemoryRepository { return super.getRefsByPrefix(prefix); } - /** {@inheritDoc} */ @Override public List getRefsByPrefixWithExclusions(String include, Set excludes) throws IOException { @@ -94,7 +89,6 @@ class RefsUnreadableInMemoryRepository extends InMemoryRepository { 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 6478b94228..82168d1c5a 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 final class TestRepositoryResolver 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 873d430675..3d4f379243 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 class AccessEvent { 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 36f2f2bc7f..de4535ab52 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 class AppServer { * 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 877b918695..8a4d363709 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 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * * @return the TestRepository * @throws IOException + * if an IO error occurred */ protected TestRepository createTestRepository() throws IOException { @@ -90,8 +89,10 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * Get requests. * * @param base + * base URI * @param path + * the request path relative to {@code base} * * @return list of events */ @@ -140,6 +146,7 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * Get requests. * * @param path + * request path * * @return list of events */ @@ -151,8 +158,11 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * Mirror refs * * @param refs + * the refs * @return set of RefSpecs */ protected static Set mirror(String... refs) { @@ -183,9 +194,12 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * 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 abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * 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 abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class HttpTestCase extends LocalDiskRepositoryTestCase { * 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 715fd19451..cd1eba4bfd 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 class MockServletConfig implements ServletConfig { }; } - /** {@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 af63084e93..f56e1fa5c4 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 class RecordingLogger extends MarkerIgnoringBase { * 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 2493f999fa..01f18dab75 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 class SimpleHttpServer { * 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 class SimpleHttpServer { * 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 class SimpleHttpServer { * 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 04cb2428a2..afa8c35bb2 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 @@ class TestRequestLog extends HandlerWrapper { } } - /** {@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 5d043ffc3a..1138be8a96 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 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 * @since 5.9 */ public SshTestGitServer(@NonNull String testUser, @NonNull Path testKey, @@ -413,6 +417,7 @@ public class SshTestGitServer { * @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 class SshTestGitServer { * 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 a28d5ebd98..6fa30d7e1e 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 @@ public abstract class SshTestHarness extends RepositoryTestCase { * 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 bdfba71f54..bb15648cbf 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 61d3b860e9..177d8737cb 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 @@ public abstract class JGitTestUtil { * Get test resource file. * * @param fileName + * file name * @return the test resource file */ public static File getTestResourceFile(String fileName) { @@ -141,8 +142,11 @@ public abstract class JGitTestUtil { * 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 @@ public abstract class JGitTestUtil { * 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 abstract class JGitTestUtil { * 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 abstract class JGitTestUtil { * 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 abstract class JGitTestUtil { * 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 abstract class JGitTestUtil { * 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 abstract class JGitTestUtil { * 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 59662cec95..0945327ab3 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 @@ public abstract class LocalDiskRepositoryTestCase { * Setup test * * @throws Exception + * if an error occurred */ @Before public void setUp() throws Exception { @@ -189,6 +190,7 @@ public abstract class LocalDiskRepositoryTestCase { * Tear down the test * * @throws Exception + * if an error occurred */ @After public void tearDown() throws Exception { @@ -314,11 +316,11 @@ public abstract class LocalDiskRepositoryTestCase { * {@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 abstract class LocalDiskRepositoryTestCase { * 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 @@ public abstract class LocalDiskRepositoryTestCase { * 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 @@ public abstract class LocalDiskRepositoryTestCase { * * @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 @@ public abstract class LocalDiskRepositoryTestCase { * 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 6bfe70659b..4dbfc59ec7 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 class MockSystemReader extends SystemReader { * 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 class MockSystemReader extends SystemReader { 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 class MockSystemReader extends SystemReader { 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 343aa92f8a..4bf2eb59da 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 @@ import java.lang.annotation.Target; 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 adcc10cad8..30fffe9d94 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 class RepeatRule implements TestRule { } } - /** {@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 04988f6289..3a283ce10d 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * @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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { /** Working directory of {@link #db}. */ protected File trash; - /** {@inheritDoc} */ @Override @Before public void setUp() throws Exception { @@ -229,11 +244,11 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * {@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 abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * @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 abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * * @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 abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * Create DirCacheEntry * * @param path + * file path * @param mode + * file mode * @return the DirCacheEntry */ protected DirCacheEntry createEntry(String path, FileMode mode) { @@ -505,8 +536,11 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 @@ public abstract class RepositoryTestCase extends LocalDiskRepositoryTestCase { * 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 c77bca9751..0168ecea30 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 @@ import org.eclipse.jgit.lib.ProgressMonitor; 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 483b9a7c81..4b45535477 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 class TestRepository implements AutoCloseable { * @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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * * @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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 @@ public class TestRepository implements AutoCloseable { * @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 class TestRepository implements AutoCloseable { /** * 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 class TestRepository implements AutoCloseable { * @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 class TestRepository implements AutoCloseable { * 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 @@ public class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 @@ public class TestRepository implements AutoCloseable { * not removed. * * @throws Exception + * if an error occurred */ public void packAndPrune() throws Exception { if (db.getObjectDatabase() instanceof ObjectDirectory) { @@ -1022,6 +1053,7 @@ public class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { /** * Delete this branch. + * * @throws Exception + * if an error occurred * @since 4.4 */ public void delete() throws Exception { @@ -1102,6 +1137,7 @@ public class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 class TestRepository implements AutoCloseable { * 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 @@ public class TestRepository implements AutoCloseable { * * @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 e5338d36cd..31db6a2c7b 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 class MonotonicFakeClock implements MonotonicClock { 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 0857bc15f2..3a92f0c434 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 5e37664eb3..4c81baf838 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 3ec08ecc83..6747b014dc 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 abstract class LfsProtocolServlet extends HttpServlet { } } - /** {@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 31d5b2f8c5..ff648aaebf 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 class FileLfsRepository implements LargeFileRepository { 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 @@ public class FileLfsRepository implements LargeFileRepository { } /** + * Get URL of content server + * * @return the url of the content server * @since 4.11 */ @@ -156,6 +157,8 @@ public class FileLfsRepository implements LargeFileRepository { } /** + * 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 d42701125e..2ea92da82b 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 f5212fe259..1ac2b2072a 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 class ObjectUploadListener implements ReadListener { * @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 class ObjectUploadListener implements ReadListener { } } - /** {@inheritDoc} */ @Override public void onAllDataRead() throws IOException { close(); @@ -156,6 +157,7 @@ public class ObjectUploadListener implements ReadListener { * 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 @@ public class ObjectUploadListener implements ReadListener { } } - /** {@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 c7c7a7146b..3c98d7b9e5 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 class S3Repository implements LargeFileRepository { this.s3Config = config; } - /** {@inheritDoc} */ @Override public Response.Action getDownloadAction(AnyLongObjectId oid) { URL endpointUrl = getObjectUrl(oid); @@ -75,7 +74,6 @@ public class S3Repository implements LargeFileRepository { return a; } - /** {@inheritDoc} */ @Override public Response.Action getUploadAction(AnyLongObjectId oid, long size) { cacheObjectMetaData(oid, size); @@ -95,13 +93,11 @@ public class S3Repository implements LargeFileRepository { 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 0857bc15f2..3a92f0c434 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 f0526ff8a2..13b74dff7d 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 class CleanFilter extends FilterCommand { 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 0a8a3faec3..afe963640d 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 class LfsPointer implements Comparable { * @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 @@ public class LfsPointer implements Comparable { 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 c26a1bfbb3..b6515b92e1 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 @@ public class SmudgeFilter extends FilterCommand { * 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 class SmudgeFilter extends FilterCommand { 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 3f1f0acac4..009250294e 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 class AtomicObjectOutputStream extends OutputStream { * @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 class AtomicObjectOutputStream extends OutputStream { 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 857ccbe056..0469337b1f 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 class LfsConfig { * * @return the delegate {@link Config} * @throws IOException + * if an IO error occurred */ private Config getDelegate() throws IOException { if (delegate == null) { @@ -86,6 +87,7 @@ public class LfsConfig { * @return The loaded lfs config * * @throws IOException + * if an IO error occurred */ private Config load() throws IOException { Config result = null; @@ -114,6 +116,7 @@ public class LfsConfig { * * @return the config, or null * @throws IOException + * if an IO error occurred */ @Nullable private Config loadFromWorkingTree() @@ -139,6 +142,7 @@ public class LfsConfig { * * @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 @@ public class LfsConfig { * * @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 @@ public class LfsConfig { * 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 12b688d157..f9c623d8b7 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 @@ public class LfsConnectionFactory { * 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 9016e53940..7ae805c33f 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 @@ public final class AbbreviatedLongObjectId implements Serializable { 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 class AbbreviatedLongObjectId implements Serializable { 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 d866db4a2d..75d500ef20 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 abstract class AnyLongObjectId implements Comparable { return abbr.prefixCompare(this) == 0; } - /** {@inheritDoc} */ @Override public final int hashCode() { return (int) (w1 >> 32); @@ -267,7 +266,6 @@ public abstract class AnyLongObjectId implements Comparable { return other != null ? equals(this, other) : false; } - /** {@inheritDoc} */ @Override public final boolean equals(Object o) { if (o instanceof AnyLongObjectId) { @@ -475,7 +473,6 @@ public abstract class AnyLongObjectId implements Comparable { 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 99bae49abb..75798ca0f1 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 class LfsPointerFilter extends TreeFilter { return pointer; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -63,13 +62,11 @@ public class LfsPointerFilter extends TreeFilter { } } - /** {@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 15b3ca4c62..3959115462 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 @@ public class LongObjectId extends AnyLongObjectId implements Serializable { 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 012e4ae915..5397d8135c 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 @@ public class MutableLongObjectId extends AnyLongObjectId { } } - /** {@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 2abe9529d3..b27b6c3c7d 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 681cf5d626..201fa3d22d 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 class ConsoleAuthenticator extends CachedAuthenticator { 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 63ce838f0b..5bdfc7bb51 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 class ConsoleCredentialsProvider extends CredentialsProvider { 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 @@ public class ConsoleCredentialsProvider extends CredentialsProvider { 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 ff0b55d1b8..2ebab5e5d2 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 0acad86f40..9c0915c631 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 4028105b87..f98f8cb728 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 1a3a2f6f4b..93d02c196c 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 @@ class Blame extends TextBuiltin { /** 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 27668b5378..e680394a79 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 @@ class Branch extends TextBuiltin { 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 98724bfceb..229d54d44f 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 6db73e632d..348f2e7dbb 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 9f9fa8fe99..1efba55f05 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 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback { } } - /** {@inheritDoc} */ @Override public void initializedSubmodules(Collection submodules) { try { @@ -162,7 +159,6 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback { } } - /** {@inheritDoc} */ @Override public void cloningSubmodule(String path) { try { @@ -174,7 +170,6 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback { } } - /** {@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 7a197a75a5..fb5a8fffc1 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 class CommandRef { 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 b0713f782c..8df028d2e2 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 979c6fa945..52f40c2957 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 47e4b6ba79..06e37da841 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 f987f2c806..ec201a55ef 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 116db037d4..913d7c790d 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 3152c44554..61979d1695 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 @@ class Diff extends TextBuiltin { // 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 9aaf3f5c5a..352ffde26c 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 @@ class DiffTree extends TextBuiltin { @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 2e0c36b287..7a007e3b58 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 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback { @Argument(index = 1, metaVar = "metaVar_refspec") private List toget; - /** {@inheritDoc} */ @Override protected void run() { try (Git git = new Git(db)) { @@ -167,7 +166,6 @@ class Fetch extends AbstractFetchCommand implements FetchCommand.Callback { } } - /** {@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 c87f0b6dcf..2796b9115f 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 5318018928..ce687c4639 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 @@ class Glog extends RevWalkTextBuiltin { frame.getContentPane().add(world); } - /** {@inheritDoc} */ @Override protected int walkLoop() throws Exception { graphPane.getCommitList().source(walk); @@ -77,13 +76,11 @@ class Glog extends RevWalkTextBuiltin { 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 9732335130..b3808d6fda 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 7a0d96d419..9c4af813a4 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 d693051738..852a4b377b 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 @@ class Log extends RevWalkTextBuiltin { 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 @@ class Log extends RevWalkTextBuiltin { NoteMap.read(argWalk.getObjectReader(), notesCommit)); } - /** {@inheritDoc} */ @Override protected void show(RevCommit c) throws Exception { outw.print(CLIText.get().commitLabel); @@ -314,10 +311,14 @@ class Log extends RevWalkTextBuiltin { } /** + * 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 @@ class Log extends RevWalkTextBuiltin { /** * @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 83446ccd53..89ceed256d 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 @@ class LsRemote extends TextBuiltin { } } - /** {@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 bb140018bd..34b48c1b1a 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 613fc5ff32..d059eff5d7 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 class Main { * @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 class Main { * @param argv * arguments. * @throws java.lang.Exception + * if an error occurred */ protected void run(String[] argv) throws Exception { writer = createErrorWriter(); @@ -263,9 +265,11 @@ public class Main { /** * @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 27a3d90fad..b78998dd74 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 @@ class Merge extends TextBuiltin { } } - /** {@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 68eeff748d..aacde2f430 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 @@ class MergeBase extends TextBuiltin { @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 f2e3a16008..6535d95e9a 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 @@ class Push extends TextBuiltin { 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 f570f7f99b..f89a4d12be 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 c63532df60..46485cc5ef 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 6d6feed7b8..a3100ac8ed 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 @@ class Remote extends TextBuiltin { } } - /** {@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 0588a7cdbe..da622e1130 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 3454cf2515..f33cb6be71 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 e86ad01823..59fc5f296c 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 @@ import org.eclipse.jgit.revwalk.RevTree; @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 @@ class RevList extends RevWalkTextBuiltin { 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 9e4d1c9dd5..b1fb07b5b8 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 696a924ecf..51e597c57a 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 @@ abstract class RevWalkTextBuiltin extends TextBuiltin { @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 @@ abstract class RevWalkTextBuiltin extends TextBuiltin { * * @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 @@ abstract class RevWalkTextBuiltin extends TextBuiltin { * {@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 4a337983eb..234da1a1c5 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 c18d35a205..4feb090032 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 @@ class Show extends TextBuiltin { 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 a58785fef3..64b182e17d 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 @@ import org.eclipse.jgit.lib.RefComparator; @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 141de0cd5d..1ef39a1a7d 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 @@ class Status extends TextBuiltin { * 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 @@ class Status extends TextBuiltin { * 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 @@ class Status extends TextBuiltin { * 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 0603de18ac..4ea67ab92c 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 6cfe93d850..c572e3bc7d 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 abstract class TextBuiltin { * @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 @@ public abstract class TextBuiltin { * @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 abstract class TextBuiltin { * @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 abstract class TextBuiltin { * @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 ac51643b6e..db2c393b9a 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 d06f1e2fbf..8546094ac2 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 @@ import org.eclipse.jgit.pgm.internal.CLIText; @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 @@ class Version extends TextBuiltin { } } - /** {@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 f23f4cf0ea..f156b8cf4c 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 @@ class BenchmarkReftable extends TextBuiltin { @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 a63387c24c..67300dcc6a 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 @@ class DiffAlgorithms extends TextBuiltin { 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 9c0ced5c1e..653530d11a 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 @@ class LfsStore extends TextBuiltin { 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 63897a3891..5188336890 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 @@ import org.eclipse.jgit.pgm.internal.CLIText; @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 33d1059911..6e0f915ff2 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 @@ import org.eclipse.jgit.pgm.internal.CLIText; @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 6dace841ea..a2443d315f 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 8d884c12db..2f96ef7d57 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 28a8d8634a..057d20b8d6 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 @@ import org.eclipse.jgit.pgm.internal.CLIText; @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 9e61357da8..daea1fbe83 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 1f4733f792..3633d880d7 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 49f7ada457..c95f1384e8 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 1ca3034f4f..d7d31bd4b2 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 @@ class TextHashFunctions extends TextBuiltin { @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 16a4c9f333..aa1b81f2b6 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 44836ec0dc..d367f02497 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 @@ import org.eclipse.jgit.pgm.internal.CLIText; @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 80d2f763f1..faa2bceb74 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 d8604726ab..cea2309f7f 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 class AbstractTreeIteratorHandler extends 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 class AbstractTreeIteratorHandler extends 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 df0b39b52a..463213dc4f 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 class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { this.db = repo; } - /** {@inheritDoc} */ @Override public void parseArgument(String... args) throws CmdLineException { final ArrayList tmp = new ArrayList<>(args.length); @@ -265,7 +264,6 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { } } - /** {@inheritDoc} */ @Override protected OptionHandler createOptionHandler(OptionDef o, Setter setter) { if (o instanceof NamedOptionDef) { @@ -275,7 +273,6 @@ public class CmdLineParser extends org.kohsuke.args4j.CmdLineParser { } - /** {@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 af90b83d17..56423ada41 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 class GpgSignHandler extends StringOptionHandler { 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 feee78e9b6..9c54169888 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 class InstantHandler extends OptionHandler { 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 class InstantHandler extends OptionHandler { 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 6cd36c3d98..b50df90788 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 class ObjectIdHandler extends OptionHandler { 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 class ObjectIdHandler extends OptionHandler { 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 7d7c806507..7bb2766fe0 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 class OptionWithValuesListHandler extends OptionHandler> { super(parser, option, setter); } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final List list = new ArrayList<>(); @@ -50,7 +49,6 @@ public class OptionWithValuesListHandler extends OptionHandler> { 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 653511947f..f215040499 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 class PathTreeFilterHandler extends OptionHandler { super(parser, option, setter); } - /** {@inheritDoc} */ @Override public int parseArguments(Parameters params) throws CmdLineException { final List filters = new ArrayList<>(); @@ -73,7 +72,6 @@ public class PathTreeFilterHandler extends OptionHandler { 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 effa22a697..0491445879 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 class RefSpecHandler extends OptionHandler { 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 8b2bed36a7..a095a28af8 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 class RevCommitHandler extends OptionHandler { 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 @@ public class RevCommitHandler extends OptionHandler { 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 357886d0fa..08f1d28392 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 class RevTreeHandler extends OptionHandler { 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 class RevTreeHandler extends OptionHandler { 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 e0962031e8..e71ba90e4b 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 class SubcommandHandler extends OptionHandler { 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 class SubcommandHandler extends OptionHandler { 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 3562754a00..2f99cff768 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 class UntrackedFilesHandler extends StringOptionHandler { 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 d1f54bbe65..d5c0e6c7e0 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 6f8153d000..54e4e2a5a8 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 d1f54bbe65..d5c0e6c7e0 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 5100bc9e54..76175cc5b8 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 7931c76c19..a00e5d96ac 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 @@ import org.slf4j.LoggerFactory; /** * 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 d8bf449acf..65ba5be0c5 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 @@ import org.slf4j.LoggerFactory; * 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 @@ import org.slf4j.LoggerFactory; *

* 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 @@ import org.slf4j.LoggerFactory; * 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 807bda89bc..23f46d8d6c 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 @@ public class IdentityPasswordProvider implements KeyPasswordProvider { * 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 ed9fe37d5c..a80a5d166d 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 @@ public interface KeyPasswordProvider { * {@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 7798b80f18..a99847aa91 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 @@ public class SshdSessionFactory extends SshSessionFactory implements Closeable { * {@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 d8dfbfc94d..b391cf4884 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 d1f54bbe65..d5c0e6c7e0 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 5053493005..b40ff5a0b4 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 @@ public class CredentialsProviderUserInfo implements UserInfo, 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 class CredentialsProviderUserInfo implements UserInfo, return false; } - /** {@inheritDoc} */ @Override public boolean promptPassword(String msg) { CredentialItem.Password p = new CredentialItem.Password(msg); @@ -99,20 +95,17 @@ public class CredentialsProviderUserInfo implements UserInfo, 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 77b68bb034..325d0549a5 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 @@ public class JschConfigSessionFactory extends SshSessionFactory { * 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 02cdf70812..5f36dadc04 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 class JschSession implements RemoteSession2 { 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 2873307e07..087e546f22 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 class OpenSshConfig implements ConfigRepository { 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 ff5f8b76cc..70e990dedf 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 class PushCommandTest extends RepositoryTestCase { } /** - * Check that branch..pushRemote overrides anything else. + * Check that branch.<name>.pushRemote overrides anything else. * * @throws Exception */ @@ -980,7 +980,7 @@ public class PushCommandTest extends RepositoryTestCase { } /** - * 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 37ff40bdf7..0e73588c66 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 @@ public abstract class ObjectReachabilityTestCase } } - /** {@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 7679c11098..eeb13cc8b9 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 @@ public abstract class ReachabilityCheckerTestCase 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 100bd32ad8..ed5a6990ac 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.eclipse.jgit.util.SystemReader; 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 42304e2253..3ea4a167cb 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.lib.StoredConfig; 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 c3dafe4aa2..90a2aa601e 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 @@ import static org.junit.Assert.assertEquals; 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 9755ed1b69..f9687f9f82 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 class UploadPackTest { /** *
 	 * 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 0857bc15f2..3a92f0c434 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 56655b3b6d..2b078c11ff 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 class AwtAuthenticator extends CachedAuthenticator { 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 0403957d66..729f4cb263 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 class AwtCredentialsProvider extends CredentialsProvider { 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 @@ public class AwtCredentialsProvider extends CredentialsProvider { 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 dcf3c1d314..a266a2fc27 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 class CommitGraphPane extends JTable { return allCommits; } - /** {@inheritDoc} */ @Override public void setModel(TableModel dataModel) { if (dataModel != null && !(dataModel instanceof CommitTableModel)) @@ -88,7 +87,6 @@ public class CommitGraphPane extends JTable { 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 2abe9529d3..b27b6c3c7d 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 ceb17fbe25..8805ea2353 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 @@ public class AddNoteCommand extends GitCommand { 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 e612924771..df0f616256 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 fdf8b80cd4..4efc6a7a46 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 @@ public class ArchiveCommand extends GitCommand { } } - /** {@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 7319ff4b2f..7e06a56888 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 @@ public class CheckoutCommand extends GitCommand { this.paths = new LinkedList<>(); } - /** {@inheritDoc} */ @Override public Ref call() throws GitAPIException, RefAlreadyExistsException, RefNotFoundException, InvalidRefNameException, @@ -407,7 +406,9 @@ public class CheckoutCommand extends GitCommand { * * @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 5f8c2b728a..38e795b0eb 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 @@ public class CherryPickCommand extends GitCommand { 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 36ca97d694..a4a0c49f45 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 class CleanCommand extends GitCommand> { } /** - * 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 9e77dd7348..e1efb86cdc 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 @@ public class CreateBranchCommand extends GitCommand { 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 3d3ee63568..f1b5d62349 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 @@ public class DeleteBranchCommand extends GitCommand> { 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 64d0d94171..92d88aad7d 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 @@ public class DeleteTagCommand extends GitCommand> { 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 584d2bc394..1196359c0f 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 class GarbageCollectCommand extends GitCommand { 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 3b3e10e7b2..3dc53ec248 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 class Git implements AutoCloseable { * @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 class Git implements AutoCloseable { 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 4b7445fc95..e3c3c89bcb 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 @@ public class ListBranchCommand extends GitCommand> { 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 34955e86f9..9eb52866dc 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 @@ public class ListNotesCommand extends GitCommand> { 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 27a5288429..9a4a822b59 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 @@ public class ListTagCommand extends GitCommand> { * 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 class ListTagCommand extends GitCommand> { 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 fa40d93e52..555e351d32 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 @@ import org.eclipse.jgit.treewalk.filter.TreeFilter; * *

* - *

* 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 7347f63889..ecc3b40fb7 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 class MergeResult { 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 e6ab1e6588..cd7c4e9b39 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 class NameRevCommand extends GitCommand> { }; } - /** {@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 cbb9cc2f78..fdc7f3f333 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 @@ public class PullResult { 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 19fd3bb2c4..859bf93841 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 @@ import org.eclipse.jgit.util.RawParseUtils; * 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 { /** * @return the commit if we had to do a commit, otherwise null * @throws GitAPIException + * if JGit API failed * @throws IOException + * if an IO error occurred */ private RevCommit continueRebase() throws GitAPIException, IOException { // if there are still conflicts, we throw a specific Exception @@ -1102,7 +1103,9 @@ public class RebaseCommand extends GitCommand { * that can not be parsed as steps * * @param numSteps + * number of steps to remove * @throws IOException + * if an IO error occurred */ private void popSteps(int numSteps) throws IOException { if (numSteps == 0) @@ -1297,7 +1300,9 @@ public class RebaseCommand extends GitCommand { * if we can fast-forward to. * @return the new head, or null * @throws java.io.IOException + * if an IO error occurred * @throws org.eclipse.jgit.api.errors.GitAPIException + * if a JGit API exception occurred */ public RevCommit tryFastForward(RevCommit newCommit) throws IOException, GitAPIException { @@ -1548,6 +1553,7 @@ public class RebaseCommand extends GitCommand { * the name of the upstream branch * @return {@code this} * @throws org.eclipse.jgit.api.errors.RefNotFoundException + * if {@code upstream} Ref couldn't be resolved */ public RebaseCommand setUpstream(String upstream) throws RefNotFoundException { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java index 826ea518e4..83c0dc2ef2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java @@ -194,6 +194,7 @@ public class RebaseResult { * Create 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 f4b60adedb..c65cbf160f 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 @@ public class RemoveNoteCommand extends GitCommand { 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 922cb531de..029f9d02d6 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 @@ public class RenameBranchCommand extends GitCommand { 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 87b4acb14c..225c9996cf 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 @@ public class ResetCommand extends GitCommand { 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 f64cb6b831..7bb9de0ef4 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 @@ public class ShowNoteCommand extends GitCommand { 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 8171c4c3ae..828a3020f8 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 class StashListCommand extends GitCommand> { 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 606d567393..8fb5d60b85 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 class SubmoduleAddCommand extends * Set the submodule name * * @param name + * name of the submodule * @return this command * @since 5.1 */ @@ -117,6 +118,7 @@ public class SubmoduleAddCommand extends * * @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 f4b8ac2e07..0aa1515334 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 class SubmoduleDeinitCommand /** * {@inheritDoc} - *

* * @return the set of repositories successfully deinitialized. * @throws NoSuchSubmoduleException @@ -135,6 +135,7 @@ public class SubmoduleDeinitCommand * @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 @@ public class SubmoduleDeinitCommand * 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 @@ public class SubmoduleDeinitCommand * @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 class SubmoduleDeinitCommand * 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 8129be4a71..b7d7b66333 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 bdceabad37..03b4a000ad 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 class SubmoduleInitCommand extends GitCommand> { 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 196ef7b2a9..d5bc0dda98 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 class SubmoduleStatusCommand extends 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 b319a1b478..4f3e8512c3 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 class SubmoduleSyncCommand extends GitCommand> { * 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 @@ public class SubmoduleSyncCommand extends GitCommand> { 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 58c18b38d1..dd4ba10388 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 @@ import org.eclipse.jgit.transport.CredentialsProvider; * *

* - *

* 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 1af880d792..30f1bc9cc6 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 @@ import org.eclipse.jgit.transport.Transport; * {@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 3b71373b6e..0224b3dbb3 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 class CheckoutConflictException extends GitAPIException { * 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 470a92eaf5..fe3e22a21f 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 final class Attribute { this(key, State.CUSTOM, value); } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) @@ -144,7 +143,6 @@ public final class Attribute { return value; } - /** {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; @@ -155,7 +153,6 @@ public final class Attribute { 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 125ee5961a..08bc1da61e 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 @@ public final class Attributes { return true; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder buf = new StringBuilder(); @@ -246,13 +245,11 @@ public final class Attributes { 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 7ec78597fa..d8857f5192 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 class AttributesHandler { * @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 class AttributesHandler { * 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 @@ public class AttributesHandler { * @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 @@ public class AttributesHandler { *

* * @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 73fd587a14..2039191b8c 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 class AttributesRule { 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 1c9e9d7f71..bbbb437fd2 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 class FilterCommandRegistry { * * @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 class FilterCommandRegistry { * * @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 class FilterCommandRegistry { * @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 c854b37b84..5e2746cc7c 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 class BlameResult { } } - /** {@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 ccf99ff5b5..8e2aaecf94 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 @@ class Candidate { } } - /** {@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 2236eecbfe..c481eb1927 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 @@ class Region { 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 e8f3f38adb..fafc4fb1ec 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 @@ final class ReverseWalk extends RevWalk { 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 2526cbfae4..7821efd2a6 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 abstract class DiffAlgorithm { /** * 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 @@ public abstract class DiffAlgorithm { * 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 f0ce121f73..717d8989ec 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 class DiffEntry { /** * 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 class DiffEntry {
 		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 1a5f74f98a..2f472b5c0a 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 class DiffFormatter implements AutoCloseable {
 	 * @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 class DiffFormatter implements AutoCloseable {
 	 * @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 @@ public class DiffFormatter implements AutoCloseable {
 	 * @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 @@ public class DiffFormatter implements AutoCloseable {
 	 * @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 @@ public class DiffFormatter implements AutoCloseable {
 	 * @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 219a187e27..2968dbaa8f 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 class Edit {
 		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 class Edit {
 		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 d40a64099a..85e23e9a92 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 class EditList extends ArrayList {
 		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 9cb8e7364b..82ab21c11e 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 0380208565..c7dfd9a18f 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 final class HashedSequenceComparator extends
 				&& 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 4035a1e48e..bb72e1faed 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 class HistogramDiff extends LowLevelDiffAlgorithm {
 		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 7f3c251864..39be43d12d 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 @@ package org.eclipse.jgit.diff;
  * 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 abstract class LowLevelDiffAlgorithm extends DiffAlgorithm {
 	 * 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 53cd2ea5d7..4343642f9a 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 class PatchIdDiffFormatter extends DiffFormatter {
 		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 b52803513d..7835582437 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 class RawText extends Sequence {
 	}
 
 	/** @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 0c41b8598b..e06e2f8290 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 abstract class RawTextComparator extends SequenceComparator {
 		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 c33f53adde..fd84bc6c87 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 @@ public class RenameDetector {
 
 	/**
 	 * 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 61f133ca55..878c66b30f 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 final class Subsequence extends Sequence {
 	/**
 	 * 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 final class Subsequence extends Sequence {
 	/**
 	 * 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 final class Subsequence extends Sequence {
 	/**
 	 * 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 final class Subsequence extends Sequence {
 		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 c60945361f..707df59259 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 final class SubsequenceComparator extends
 		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 86e60e5b73..68296ef330 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 @@ import org.eclipse.jgit.errors.DirCacheNameConflictException;
  * 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 @@ abstract class BaseDirCacheEditor { 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 e56061223c..34dba0b5be 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 @@ public class DirCache { * * @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 @@ public class DirCache { * 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 f6e4d360a6..befd8067ab 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 class DirCacheBuildIterator extends DirCacheIterator { builder = p.builder; } - /** {@inheritDoc} */ @Override public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException { @@ -84,7 +83,6 @@ public class DirCacheBuildIterator extends DirCacheIterator { return new DirCacheBuildIterator(this, currentSubtree); } - /** {@inheritDoc} */ @Override public void skip() throws CorruptObjectException { if (currentSubtree != null) @@ -94,7 +92,6 @@ public class DirCacheBuildIterator extends DirCacheIterator { next(1); } - /** {@inheritDoc} */ @Override public void stopWalk() { final int cur = ptr; @@ -103,7 +100,6 @@ public class DirCacheBuildIterator extends DirCacheIterator { 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 9fe77f36e8..28d2502005 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 @@ public class DirCacheBuilder extends BaseDirCacheEditor { 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 1fb81b71e9..20b27375bd 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 class DirCacheCheckout { /** * @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 class DirCacheCheckout { * @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 class DirCacheCheckout { * @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 class DirCacheCheckout { * @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 class DirCacheCheckout { * @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 class DirCacheCheckout { * 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 class DirCacheCheckout { * 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 @@ public class DirCacheCheckout { * @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 @@ public class DirCacheCheckout { * 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 @@ public class DirCacheCheckout { * 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 @@ public class DirCacheCheckout { * @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 class DirCacheCheckout { * {@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 @@ public class DirCacheCheckout { } /** - * 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 @@ public class DirCacheCheckout { } /** - * 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 @@ public class DirCacheCheckout { * @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 class DirCacheCheckout { *

  • 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 class DirCacheCheckout { * {@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 class DirCacheCheckout { * 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 class DirCacheCheckout { * 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 8c342e267d..b1f4e7db21 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 @@ import org.eclipse.jgit.util.Paths; * 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 class DirCacheEditor extends BaseDirCacheEditor { edits.add(edit); } - /** {@inheritDoc} */ @Override public boolean commit() throws IOException { if (edits.isEmpty()) { @@ -92,7 +90,6 @@ public class DirCacheEditor extends BaseDirCacheEditor { 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 aed1c341f2..9cc34a0f11 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 class DirCacheIterator extends AbstractTreeIterator { parseEntry(); } - /** {@inheritDoc} */ @Override public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException { @@ -114,7 +113,6 @@ public class DirCacheIterator extends AbstractTreeIterator { 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 class DirCacheIterator extends AbstractTreeIterator { return new EmptyTreeIterator(this, n, pathLen + 1); } - /** {@inheritDoc} */ @Override public boolean hasId() { if (currentSubtree != null) @@ -131,7 +128,6 @@ public class DirCacheIterator extends AbstractTreeIterator { return currentEntry != null; } - /** {@inheritDoc} */ @Override public byte[] idBuffer() { if (currentSubtree != null) @@ -141,7 +137,6 @@ public class DirCacheIterator extends AbstractTreeIterator { return zeroid; } - /** {@inheritDoc} */ @Override public int idOffset() { if (currentSubtree != null) @@ -151,7 +146,6 @@ public class DirCacheIterator extends AbstractTreeIterator { return 0; } - /** {@inheritDoc} */ @Override public void reset() { if (!first()) { @@ -164,19 +158,16 @@ public class DirCacheIterator extends AbstractTreeIterator { } } - /** {@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 class DirCacheIterator extends AbstractTreeIterator { } } - /** {@inheritDoc} */ @Override public void back(int delta) { while (--delta >= 0) { @@ -271,6 +261,7 @@ public class DirCacheIterator extends AbstractTreeIterator { * @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 e0c1e93918..2561ae999b 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 @@ public class DirCacheTree { 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 4a535619d7..40aa1c3b7c 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 class LargeObjectException extends RuntimeException { 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 084d67c02b..83876ef03c 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 class RevisionSyntaxException extends IllegalArgumentException { 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 e6342542d0..0c2aa46aa0 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 @@ package org.eclipse.jgit.events; * 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 f5a6d64b16..64d285aca1 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 class IndexChangedEvent extends RepositoryEvent { 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 44897605db..94d49fd93e 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 class ListenerHandle { 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 476c37c1c3..92a227750f 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 class ListenerList { /** * 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 6f1e8d5d66..9bd1ef0653 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 @@ package org.eclipse.jgit.events; * 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 81f2e73de2..288074e15f 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 abstract class RepositoryEvent { */ 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 f9888eae34..c3275153ea 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 class WorkingTreeModifiedEvent 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 d54bf65a27..8668ea9c0e 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 @@ abstract class AbstractHead implements Head { 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 faf4ee66c9..92fee62188 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 5ffcafc41e..3b240c3b74 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 6aac3faab3..d4cc850a12 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 @@ final class LastHead implements Head { // 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 14b6038c44..6b4526f825 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 3665a70476..62b6f42c52 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 aa69a05112..957b3869f2 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 class ManifestParser extends DefaultHandler { * 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 class ManifestParser extends DefaultHandler { * @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 class ManifestParser extends DefaultHandler { } } - /** {@inheritDoc} */ @SuppressWarnings("nls") @Override public void startElement( @@ -239,7 +241,6 @@ public class ManifestParser extends DefaultHandler { } } - /** {@inheritDoc} */ @Override public void endElement( String uri, @@ -251,7 +252,6 @@ public class ManifestParser extends DefaultHandler { } } - /** {@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 6e943e5d36..1ca3ce4501 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 class RepoCommand extends GitCommand { * @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 class RepoCommand extends GitCommand { * 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 class RepoCommand extends GitCommand { 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 c5ead09523..ad9538a906 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 class RepoProject implements Comparable { * 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 class RepoProject implements Comparable { return thatPath.startsWith(getPathWithSlash()); } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof RepoProject) { @@ -428,13 +428,11 @@ public class RepoProject implements Comparable { 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 023aef1c1f..17fdd7e7cb 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 @@ public class CommitMsgHook extends GitHook { super(repo, outputStream, errorStream); } - /** {@inheritDoc} */ @Override public String call() throws IOException, AbortedByHookException { if (commitMessage == null) { @@ -94,7 +93,6 @@ public class CommitMsgHook extends GitHook { 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 b9dafcca31..3988ee06ca 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 @@ public class PostCommitHook extends GitHook { 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 321f476620..b12ea83b99 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 @@ public class PreCommitHook extends GitHook { 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 43dbc37f4f..e36312b3da 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 @@ public class PrePushHook extends GitHook { 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 @@ public class PrePushHook extends GitHook { 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 9dd565ff0a..b041729e28 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 class FastIgnoreRule { return matcher == NO_MATCH; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder sb = new StringBuilder(); @@ -221,7 +220,6 @@ public class FastIgnoreRule { } - /** {@inheritDoc} */ @Override public int hashCode() { final int prime = 31; @@ -232,7 +230,6 @@ public class FastIgnoreRule { 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 4e7f126a60..33dceb0717 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 class IgnoreNode { 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 0737ed8878..a3f365ea0e 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 73e2ad3977..84376be53e 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 39fa74f6ea..4f8e149b4b 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 class NameMatcher extends AbstractMatcher { 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 ba77b3dd87..a40568de08 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 @@ public class PathMatcher extends AbstractMatcher { * 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 @@ public class PathMatcher extends AbstractMatcher { } } - /** {@inheritDoc} */ @Override public boolean matches(String path, boolean assumeDirectory, boolean pathMatch) { @@ -192,7 +192,6 @@ public class PathMatcher extends AbstractMatcher { 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 fbce08adf4..3305a74af1 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 @@ public class Strings { .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 @@ public class Strings { /** * @param buffer + * buffer * @return zero of the buffer is empty, otherwise the last character from * buffer */ @@ -427,10 +431,13 @@ public class Strings { } /** + * 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 7fa076b855..1f1c223270 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 76a88641c9..d976f6ea5b 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 1baa9abf19..606b585cdf 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 class WildMatcher extends AbstractMatcher { || (!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 d65624fc6a..ec4049a63e 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 class FilteredRenameDetector { * 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 class FilteredRenameDetector { * 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 ebef5247e6..3a729fb95f 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 class CommandExecutor { * 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 class CommandExecutor { * 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 d0034df3bc..6a67bf3a1a 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 class DiffTools { * 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 class DiffTools { * 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 b2dd846d70..367107d0e8 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 class ExternalToolUtils { * 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 class ExternalToolUtils { * 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 ba8ca54c58..0061e3f878 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 class FileElement { * * @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 class FileElement { * 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 class FileElement { * 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 class FileElement { * @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 b903201264..0da58e4a42 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 class MergeTools { * 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 @@ public class MergeTools { * @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 class MergeTools { * 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 e1169a2d60..c1d69b4f11 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 class PreDefinedDiffTool extends UserDefinedDiffTool { /** * @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 1dd2f0d793..17d5b0b673 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 @@ public class UserDefinedMergeTool extends UserDefinedDiffTool /** * @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 3b94984561..795f4404e8 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 class FsckPackParser extends PackParser { this.blockSize = channel.blockSize() > 0 ? channel.blockSize() : 65536; } - /** {@inheritDoc} */ @Override protected void onPackHeader(long objCnt) throws IOException { if (expectedObjectCount >= 0) { @@ -78,48 +77,41 @@ public class FsckPackParser extends PackParser { } } - /** {@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 @@ public class FsckPackParser extends PackParser { 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 @@ public class FsckPackParser extends PackParser { } } - /** {@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 @@ public class FsckPackParser extends PackParser { 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 @@ public class FsckPackParser extends PackParser { return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, ObjectTypeAndSize info) throws IOException { @@ -184,7 +169,6 @@ public class FsckPackParser extends PackParser { return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected int readDatabase(byte[] dst, int pos, int cnt) throws IOException { @@ -229,13 +213,11 @@ public class FsckPackParser extends PackParser { 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 86d4722000..84f1cb968a 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 class AddToBitmapFilter extends RevFilter { this.bitmap = bitmap; } - /** {@inheritDoc} */ @Override public final boolean include(RevWalk walker, RevCommit cmit) { Bitmap visitedBitmap; @@ -61,13 +60,11 @@ public class AddToBitmapFilter extends RevFilter { 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 d7ccadfbe7..a95432ce73 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 class AddToBitmapWithCacheFilter extends RevFilter { this.bitmap = bitmap; } - /** {@inheritDoc} */ @Override public final boolean include(RevWalk rw, RevCommit c) { Bitmap visitedBitmap; @@ -76,13 +75,11 @@ public class AddToBitmapWithCacheFilter extends RevFilter { 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 da9f9d031e..5ac267e789 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 class AddUnseenToBitmapFilter extends RevFilter { this.bitmap = bitmap; } - /** {@inheritDoc} */ @Override public final boolean include(RevWalk walker, RevCommit cmit) { Bitmap visitedBitmap; @@ -69,13 +68,11 @@ public class AddUnseenToBitmapFilter extends RevFilter { 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 37721ad1ea..f5f51e4830 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 class BitmappedReachabilityChecker implements ReachabilityChecker { this.reached = repoBitmaps.newBitmapBuilder(); } - /** {@inheritDoc} */ @Override public final boolean include(RevWalk walker, RevCommit cmit) { Bitmap commitBitmap; @@ -149,13 +148,11 @@ public class BitmappedReachabilityChecker implements ReachabilityChecker { } } - /** {@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 0796293f52..7fb5956f97 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 a074833fa5..422d3be728 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 da172192e4..d520139bce 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 @@ class CommitGraphV1 implements CommitGraph { 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 a58a9eb632..9a57f38a7d 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 class CommitGraphWriter { * 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 ccf6d0e66a..a9a603ff57 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 @@ public class GraphCommits implements Iterable { 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 cdfd3e9592..68fc296d3e 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 class BeforeDfsPackIndexLoadedEvent 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 0a02180d7d..99b9d556ad 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 @@ public final class DfsBlockCache { /** * @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 22959e9f6b..d6d3fbfd30 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 class DfsCachedPack extends CachedPack { 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 2ee23f8627..4f0e4a55d4 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 @@ import org.eclipse.jgit.lib.StoredConfig; * 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 a2fb67ff0b..ceb1769dec 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 @@ public class DfsInserter extends ObjectInserter { 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 class DfsInserter extends ObjectInserter { return endObject(id, offset); } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, long len, InputStream in) throws IOException { @@ -178,7 +174,6 @@ public class DfsInserter extends ObjectInserter { return buf; } - /** {@inheritDoc} */ @Override public void flush() throws IOException { if (packDsc == null) @@ -206,7 +201,6 @@ public class DfsInserter extends ObjectInserter { 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 46ec87df54..faeafceec0 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 abstract class DfsObjDatabase extends ObjectDatabase { 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 @@ public abstract class DfsObjDatabase extends ObjectDatabase { 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 8e124e3c20..885582fae2 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 10fa2365bd..c2feab8cd3 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 @@ class DfsObjectToPack extends ObjectToPack { 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 7cf91a4882..c74a1e1d7d 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 abstract class DfsOutputStream extends OutputStream { 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 4f418ab4db..f012b8bca5 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 class DfsPackDescription { 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 @@ public class DfsPackDescription { } } - /** {@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 d8e191c4e0..1a438e415c 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 @@ public class DfsPackParser extends PackParser { this.packDigest = Constants.newMessageDigest(); } - /** {@inheritDoc} */ @Override public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving) throws IOException { @@ -172,7 +171,6 @@ public class DfsPackParser extends PackParser { return packDsc; } - /** {@inheritDoc} */ @Override protected void onPackHeader(long objectCount) throws IOException { if (objectCount == 0) { @@ -194,34 +192,29 @@ public class DfsPackParser extends PackParser { 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 @@ public class DfsPackParser extends PackParser { 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 @@ public class DfsPackParser extends PackParser { return v; } - /** {@inheritDoc} */ @Override protected void onPackFooter(byte[] hash) throws IOException { // The base class will validate the original hash matches @@ -307,7 +295,6 @@ public class DfsPackParser extends PackParser { packHash = hash; } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj, ObjectTypeAndSize info) throws IOException { @@ -316,7 +303,6 @@ public class DfsPackParser extends PackParser { return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, ObjectTypeAndSize info) throws IOException { @@ -325,7 +311,6 @@ public class DfsPackParser extends PackParser { return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected int readDatabase(byte[] dst, int pos, int cnt) throws IOException { if (cnt == 0) @@ -381,13 +366,11 @@ public class DfsPackParser extends PackParser { 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 @@ public class DfsPackParser extends PackParser { 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 750c118268..f4e863d02d 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 @@ import org.eclipse.jgit.events.RepositoryEvent; */ 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 8d8a766b0f..56fe5d5087 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 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { 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 class DfsReader extends ObjectReader implements ObjectReuseAsIs { return null; } - /** {@inheritDoc} */ @Override public Optional getCommitGraph() throws IOException { for (DfsPackFile pack : db.getPacks()) { @@ -135,7 +131,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { return Optional.empty(); } - /** {@inheritDoc} */ @Override public Collection getCachedPacksAndUpdate( BitmapBuilder needBitmap) throws IOException { @@ -148,7 +143,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { return Collections.emptyList(); } - /** {@inheritDoc} */ @Override public Collection resolve(AbbreviatedObjectId id) throws IOException { @@ -177,7 +171,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { } } - /** {@inheritDoc} */ @Override public boolean has(AnyObjectId objectId) throws IOException { if (last != null @@ -207,7 +200,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { return false; } - /** {@inheritDoc} */ @Override public ObjectLoader open(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, @@ -262,7 +254,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { return null; } - /** {@inheritDoc} */ @Override public Set getShallowCommits() { return Collections.emptySet(); @@ -370,7 +361,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { return avoidUnreachable && pack.isGarbage(); } - /** {@inheritDoc} */ @Override public AsyncObjectLoaderQueue open( Iterable objectIds, final boolean reportMissing) { @@ -430,7 +420,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { }; } - /** {@inheritDoc} */ @Override public AsyncObjectSizeQueue getObjectSize( Iterable objectIds, final boolean reportMissing) { @@ -492,7 +481,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { }; } - /** {@inheritDoc} */ @Override public long getObjectSize(AnyObjectId objectId, int typeHint) throws MissingObjectException, IncorrectObjectTypeException, @@ -538,7 +526,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { return -1; } - /** {@inheritDoc} */ @Override public DfsObjectToPack newObjectToPack(AnyObjectId objectId, int type) { return new DfsObjectToPack(objectId, type); @@ -642,7 +629,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { return tmp; } - /** {@inheritDoc} */ @Override public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp, boolean validate) throws IOException, @@ -651,7 +637,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { src.pack.copyAsIs(out, src, validate, this); } - /** {@inheritDoc} */ @Override public void writeObjects(PackOutputStream out, List list) throws IOException { @@ -659,7 +644,6 @@ public class DfsReader extends ObjectReader implements ObjectReuseAsIs { 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 ae656707ac..b52456225c 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 @@ public abstract class DfsRefDatabase extends RefDatabase { return 0 < read().size(); } - /** {@inheritDoc} */ @Override public Ref exactRef(String name) throws IOException { RefCache curr = read(); @@ -73,13 +72,11 @@ public abstract class DfsRefDatabase extends RefDatabase { 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 @@ public abstract class DfsRefDatabase extends RefDatabase { return new SymbolicRef(ref.getName(), dst); } - /** {@inheritDoc} */ @Override public Ref peel(Ref ref) throws IOException { final Ref oldLeaf = ref.getLeaf(); @@ -176,7 +172,6 @@ public abstract class DfsRefDatabase extends RefDatabase { return leaf; } - /** {@inheritDoc} */ @Override public RefUpdate newUpdate(String refName, boolean detach) throws IOException { @@ -193,7 +188,6 @@ public abstract class DfsRefDatabase extends RefDatabase { return update; } - /** {@inheritDoc} */ @Override public RefRename newRename(String fromName, String toName) throws IOException { @@ -202,7 +196,6 @@ public abstract class DfsRefDatabase extends RefDatabase { return new DfsRefRename(src, dst); } - /** {@inheritDoc} */ @Override public boolean isNameConflicting(String refName) throws IOException { RefList all = read().ids; @@ -224,19 +217,16 @@ public abstract class DfsRefDatabase extends RefDatabase { 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 569803575d..e76b0bc142 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 28331a08e6..f327034123 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 @@ final class DfsRefUpdate extends RefUpdate { 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 @@ final class DfsRefUpdate extends RefUpdate { } } - /** {@inheritDoc} */ @Override protected Result doUpdate(Result desiredResult) throws IOException { ObjectIdRef newRef; @@ -102,7 +96,6 @@ final class DfsRefUpdate extends RefUpdate { return Result.LOCK_FAILURE; } - /** {@inheritDoc} */ @Override protected Result doDelete(Result desiredResult) throws IOException { if (getRefDatabase().compareAndRemove(dstRef)) { @@ -112,7 +105,6 @@ final class DfsRefUpdate extends RefUpdate { 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 6c3b056efd..3ba74b26fc 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 class DfsReftableDatabase extends DfsRefDatabase { 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 class DfsReftableDatabase extends DfsRefDatabase { 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 class DfsReftableDatabase extends DfsRefDatabase { 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 class DfsReftableDatabase extends DfsRefDatabase { 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 @@ public class DfsReftableDatabase extends DfsRefDatabase { } } - /** {@inheritDoc} */ @Override protected boolean compareAndPut(Ref oldRef, @Nullable Ref newRef) throws IOException { @@ -254,13 +243,11 @@ public class DfsReftableDatabase extends DfsRefDatabase { } } - /** {@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 @@ public class DfsReftableDatabase extends DfsRefDatabase { // 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 27b03299e4..97ba4d52eb 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 class DfsReftableStack implements AutoCloseable { 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 32c0ccdf4f..218f1e9552 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 @@ public abstract class DfsRepository extends Repository { this.description = builder.getRepositoryDescription(); } - /** {@inheritDoc} */ @Override public abstract DfsObjDatabase getObjectDatabase(); @@ -72,7 +71,6 @@ public abstract class DfsRepository extends Repository { return true; } - /** {@inheritDoc} */ @Override public void create(boolean bare) throws IOException { if (exists()) @@ -85,39 +83,33 @@ public abstract class DfsRepository extends Repository { 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 943d92684b..ab5f7fe75e 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 abstract class DfsRepositoryBuilder 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 2b8779f6df..d641da59e1 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 aa578d31ba..e8f532fe24 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 @@ abstract class FileObjectDatabase extends ObjectDatabase { 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 e9e17c0ec5..3abd71aee6 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 @@ public class FileReftableDatabase extends RefDatabase { /** * @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 @@ public class FileReftableDatabase extends RefDatabase { 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 class FileReftableDatabase extends RefDatabase { 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 class FileReftableDatabase extends RefDatabase { 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 @@ public class FileReftableDatabase extends RefDatabase { } } - /** {@inheritDoc} */ @Override public RefRename newRename(String fromName, String toName) throws IOException { @@ -312,20 +302,17 @@ public class FileReftableDatabase extends RefDatabase { 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 5152367d23..c74a298429 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 class FileReftableStack implements AutoCloseable { * @param w * writer to use * @throws IOException + * if an IO error occurred */ void call(ReftableWriter w) throws IOException; } @@ -559,6 +560,7 @@ public class FileReftableStack implements AutoCloseable { * 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 @@ public class FileReftableStack implements AutoCloseable { * 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 3e92cddacd..e5a00d3925 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 class FileRepository extends Repository { 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 class FileRepository extends Repository { throw new IllegalStateException(); } - /** {@inheritDoc} */ @Override public FileBasedConfig getConfig() { try { @@ -357,7 +353,6 @@ public class FileRepository extends Repository { return repoConfig; } - /** {@inheritDoc} */ @Override @Nullable public String getGitwebDescription() throws IOException { @@ -376,7 +371,6 @@ public class FileRepository extends Repository { return d; } - /** {@inheritDoc} */ @Override public void setGitwebDescription(@Nullable String description) throws IOException { @@ -423,6 +417,7 @@ public class FileRepository extends Repository { * 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 class FileRepository extends Repository { objectDatabase.openPack(pack); } - /** {@inheritDoc} */ @Override public void scanForRepoChanges() throws IOException { getRefDatabase().getRefs(); // This will look for changes to refs @@ -504,7 +498,6 @@ public class FileRepository extends Repository { notifyIndexChanged(false); } - /** {@inheritDoc} */ @Override public void notifyIndexChanged(boolean internal) { synchronized (snapshotLock) { @@ -513,7 +506,6 @@ public class FileRepository extends Repository { fireEvent(new IndexChangedEvent(internal)); } - /** {@inheritDoc} */ @Override public ReflogReader getReflogReader(String refName) throws IOException { if (refs instanceof FileReftableDatabase) { @@ -537,7 +529,6 @@ public class FileRepository extends Repository { return new ReflogReaderImpl(this, ref.getName()); } - /** {@inheritDoc} */ @Override public AttributesNodeProvider createAttributesNodeProvider() { return new AttributesNodeProviderImpl(this); @@ -600,7 +591,6 @@ public class FileRepository extends Repository { 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 6088c152a1..9a85752062 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 class FileSnapshot { && Objects.equals(fileKey, other.fileKey); } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (this == obj) { @@ -420,7 +419,6 @@ public class FileSnapshot { return equals(other); } - /** {@inheritDoc} */ @Override public int hashCode() { return Objects.hash(lastModified, Long.valueOf(size), fileKey); @@ -474,7 +472,6 @@ public class FileSnapshot { 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 10b53b6661..46f265f506 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 class GC { * 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 @@ public class GC { * 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 @@ public class GC { * 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 @@ public class GC { } /** - * 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 @@ public class GC { * 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 @@ public class GC { * 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 class GC { * @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 @@ public class GC { * 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 @@ public class GC { * 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 @@ public class GC { * 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 @@ public class GC { /** * @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 @@ public class GC { * * @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 @@ public class GC { * * @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 class GC { * * @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 86994a9eeb..628bf5db0c 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 @@ class GcLog { * @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 254557c08f..bbb7476d65 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 class GlobalAttributesNode extends AttributesNode { * * @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 a22cd3ffeb..11d842b246 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 class InfoAttributesNode extends AttributesNode { * * @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 e2fbd7a0b4..15223ad437 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 @@ class LargePackedWholeObject extends ObjectLoader { } } - /** {@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 2d73f9bd10..d0d320bf02 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 class LazyObjectIdSetFile implements ObjectIdSet { 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 f112947bae..22eef9468c 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 @@ class LocalCachedPack extends CachedPack { 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 559718af3a..3f3d78c734 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 @@ class LocalObjectRepresentation extends StoredObjectRepresentation { 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 ac6cd212d5..ca25212e00 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 d06b5a72d1..8ada0a90e1 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 class LockFile { * 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 class LockFile { 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 326c5f6457..278c846ba8 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 @@ class LooseObjects { 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 f27daad897..0ef38db317 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 class ObjectDirectory extends FileObjectDatabase { } } - /** {@inheritDoc} */ @Override public final File getDirectory() { return loose.getDirectory(); @@ -169,13 +168,11 @@ public class ObjectDirectory extends FileObjectDatabase { 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 class ObjectDirectory extends FileObjectDatabase { packed.create(); } - /** {@inheritDoc} */ @Override public ObjectDirectoryInserter newInserter() { return new ObjectDirectoryInserter(this, config); @@ -199,7 +195,6 @@ public class ObjectDirectory extends FileObjectDatabase { return new PackInserter(this); } - /** {@inheritDoc} */ @Override public void close() { loose.close(); @@ -214,13 +209,11 @@ public class ObjectDirectory extends FileObjectDatabase { } } - /** {@inheritDoc} */ @Override public Collection getPacks() { return packed.getPacks(); } - /** {@inheritDoc} */ @Override public long getApproximateObjectCount() { long count = 0; @@ -234,7 +227,6 @@ public class ObjectDirectory extends FileObjectDatabase { return count; } - /** {@inheritDoc} */ @Override public Optional getCommitGraph() { if (config.get(CoreConfig.KEY).enableCommitGraph()) { @@ -244,7 +236,6 @@ public class ObjectDirectory extends FileObjectDatabase { } /** - * {@inheritDoc} *

    * Add a single existing pack to the list of available pack files. */ @@ -273,13 +264,11 @@ public class ObjectDirectory extends FileObjectDatabase { 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 @@ public class ObjectDirectory extends FileObjectDatabase { } } - /** {@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 e6b2cc12f4..2f30a9797f 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 @@ class ObjectDirectoryInserter extends ObjectInserter { * 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 @@ class ObjectDirectoryInserter extends ObjectInserter { return insertOneObject(tmp, id, createDuplicate); } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, long len, InputStream is) throws IOException { @@ -93,11 +98,17 @@ class ObjectDirectoryInserter extends ObjectInserter { * 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 @@ class ObjectDirectoryInserter extends ObjectInserter { .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 55b2646c46..9f27f4bd6e 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 class ObjectDirectoryPackParser extends PackParser { return newPack; } - /** {@inheritDoc} */ @Override public long getPackSize() { if (newPack == null) @@ -158,7 +157,6 @@ public class ObjectDirectoryPackParser extends PackParser { return size; } - /** {@inheritDoc} */ @Override public PackLock parse(ProgressMonitor receiving, ProgressMonitor resolving) throws IOException { @@ -193,40 +191,34 @@ public class ObjectDirectoryPackParser extends PackParser { } } - /** {@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 @@ public class ObjectDirectoryPackParser extends PackParser { 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 @@ public class ObjectDirectoryPackParser extends PackParser { packHash = hash; } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(UnresolvedDelta delta, ObjectTypeAndSize info) throws IOException { @@ -280,7 +266,6 @@ public class ObjectDirectoryPackParser extends PackParser { return readObjectHeader(info); } - /** {@inheritDoc} */ @Override protected ObjectTypeAndSize seekDatabase(PackedObjectInfo obj, ObjectTypeAndSize info) throws IOException { @@ -289,13 +274,11 @@ public class ObjectDirectoryPackParser extends PackParser { 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 @@ public class ObjectDirectoryPackParser extends PackParser { tmpPack.deleteOnExit(); } - /** {@inheritDoc} */ @Override protected boolean onAppendBase(final int typeCode, final byte[] data, final PackedObjectInfo info) throws IOException { @@ -356,7 +338,6 @@ public class ObjectDirectoryPackParser extends PackParser { 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 5d401f4518..90eb35729d 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 class Pack implements Iterable { * * @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 8fb17fcf21..0c3e724ed8 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 abstract class PackBitmapIndex { /** * @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 5666b57609..755bfc49c4 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 class PackBitmapIndexBuilder extends BasePackBitmapIndex { getBitmaps().add(result); } - /** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { @@ -231,7 +230,6 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { throw new IllegalArgumentException(); } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objectId) { PositionEntry entry = positionEntries.get(objectId); @@ -240,7 +238,6 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { return entry.offsetPosition; } - /** {@inheritDoc} */ @Override public ObjectId getObject(int position) throws IllegalArgumentException { ObjectId objectId = byOffset.get(position); @@ -294,7 +291,6 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { return PackBitmapIndexV1.OPT_FULL; } - /** {@inheritDoc} */ @Override public int getBitmapCount() { return bitmapsToWriteXorBuffer.size() + bitmapsToWrite.size(); @@ -311,7 +307,6 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { 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 e1b6f780c7..c97d9f07ef 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 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex 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 class PackBitmapIndexRemapper extends PackBitmapIndex }; } - /** {@inheritDoc} */ @Override public EWAHCompressedBitmap getBitmap(AnyObjectId objectId) { EWAHCompressedBitmap bitmap = newPackIndex.getBitmap(objectId); @@ -179,7 +173,6 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex } } - /** {@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 988dc6c4ff..70d72330ab 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 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { this.reverseIndex = computedReverseIndex; } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objectId) { long offset = packIndex.findOffset(objectId); @@ -223,7 +222,6 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { return reverseIndex.findPosition(offset); } - /** {@inheritDoc} */ @Override public ObjectId getObject(int position) throws IllegalArgumentException { ObjectId objectId = reverseIndex.findObjectByPosition(position); @@ -232,13 +230,11 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { return objectId; } - /** {@inheritDoc} */ @Override public int getObjectCount() { return (int) packIndex.getObjectCount(); } - /** {@inheritDoc} */ @Override public EWAHCompressedBitmap ofObjectType( EWAHCompressedBitmap bitmap, int type) { @@ -255,13 +251,11 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { 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 @@ class PackBitmapIndexV1 extends BasePackBitmapIndex { 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 6a99cb3d83..85b2d34a92 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 @@ class PackDirectory { return Collections.unmodifiableCollection(Arrays.asList(packs)); } - /** {@inheritDoc} */ @Override public String toString() { return "PackDirectory[" + getDirectory() + "]"; //$NON-NLS-1$ //$NON-NLS-2$ @@ -350,7 +349,7 @@ class PackDirectory { /** * @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 a784af8c3f..dbf7d8ae5d 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 @@ class PackFileSnapshot extends FileSnapshot { 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 f4f62d4205..7778cb5133 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 abstract class PackIndex 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 fff410b4ce..860ebaefc2 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 @@ class PackIndexV1 extends PackIndex { return (int) (nthPosition - base); } - /** {@inheritDoc} */ @Override public ObjectId getObjectId(long nthPosition) { final int levelOne = findLevelOne(nthPosition); @@ -128,7 +125,6 @@ class PackIndexV1 extends PackIndex { return NB.decodeUInt32(idxdata[levelOne], p); } - /** {@inheritDoc} */ @Override public long findOffset(AnyObjectId objId) { final int levelOne = objId.getFirstByte(); @@ -145,7 +141,6 @@ class PackIndexV1 extends PackIndex { return (((long) b0) << 24) | (b1 << 16) | (b2 << 8) | (b3); } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objId) { int levelOne = objId.getFirstByte(); @@ -193,25 +188,21 @@ class PackIndexV1 extends PackIndex { 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 7a390060c7..751b62dc40 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 @@ class PackIndexV2 extends PackIndex { return (int) (nthPosition - base); } - /** {@inheritDoc} */ @Override public ObjectId getObjectId(long nthPosition) { final int levelOne = findLevelOne(nthPosition); @@ -174,7 +171,6 @@ class PackIndexV2 extends PackIndex { 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 @@ class PackIndexV2 extends PackIndex { return getOffset(levelOne, levelTwo); } - /** {@inheritDoc} */ @Override public long findOffset(AnyObjectId objId) { final int levelOne = objId.getFirstByte(); @@ -192,7 +187,6 @@ class PackIndexV2 extends PackIndex { return getOffset(levelOne, levelTwo); } - /** {@inheritDoc} */ @Override public int findPosition(AnyObjectId objId) { int levelOne = objId.getFirstByte(); @@ -211,7 +205,6 @@ class PackIndexV2 extends PackIndex { return p; } - /** {@inheritDoc} */ @Override public long findCRC32(AnyObjectId objId) throws MissingObjectException { final int levelOne = objId.getFirstByte(); @@ -221,19 +214,16 @@ class PackIndexV2 extends PackIndex { 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 e1612bb579..7e28b5eb2b 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 @@ class PackIndexWriterV1 extends PackIndexWriter { 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 7adabad708..fc5ef61912 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 0bceca72ea..fdc2f80075 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 @@ class PackInputStream extends InputStream { return n; } - /** {@inheritDoc} */ @Override public int read() throws IOException { byte[] buf = new byte[1]; @@ -47,7 +45,6 @@ class PackInputStream extends InputStream { 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 d6209c4a79..1b092a3332 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 @@ public class PackInserter extends ObjectInserter { return buffer().length; } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, byte[] data, int off, int len) throws IOException { @@ -169,7 +168,6 @@ public class PackInserter extends ObjectInserter { return endObject(id, offset); } - /** {@inheritDoc} */ @Override public ObjectId insert(int type, long len, InputStream in) throws IOException { @@ -243,19 +241,16 @@ public class PackInserter extends ObjectInserter { 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 @@ public class PackInserter extends ObjectInserter { 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 65a065dd55..328643688d 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 class PackObjectSizeIndexWriter { * * 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 class PackObjectSizeIndexWriter { * * 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 class PackObjectSizeIndexWriter { *
    • 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 106313db63..5584f13db1 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 f0676d9bec..912c89bc8b 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 class RefDirectory extends RefDatabase { return new SnapshottingRefDirectory(this); } - /** {@inheritDoc} */ @Override public void create() throws IOException { FileUtils.mkdir(refsDir); @@ -256,7 +255,6 @@ public class RefDirectory extends RefDatabase { newLogWriter(false).create(); } - /** {@inheritDoc} */ @Override public void close() { clearReferences(); @@ -267,14 +265,12 @@ public class RefDirectory extends RefDatabase { 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 @@ public class RefDirectory extends RefDatabase { } } - /** {@inheritDoc} */ @Override public Ref exactRef(String name) throws IOException { try { @@ -322,7 +317,6 @@ public class RefDirectory extends RefDatabase { } } - /** {@inheritDoc} */ @Override @NonNull public Map exactRef(String... refs) throws IOException { @@ -341,7 +335,6 @@ public class RefDirectory extends RefDatabase { } } - /** {@inheritDoc} */ @Override @Nullable public Ref firstExactRef(String... refs) throws IOException { @@ -359,7 +352,6 @@ public class RefDirectory extends RefDatabase { } } - /** {@inheritDoc} */ @Override public Map getRefs(String prefix) throws IOException { final RefList oldLoose = looseRefs.get(); @@ -399,7 +391,6 @@ public class RefDirectory extends RefDatabase { return new RefMap(prefix, packed, upcast(loose), symbolic.toRefList()); } - /** {@inheritDoc} */ @Override public List getAdditionalRefs() throws IOException { List ret = new LinkedList<>(); @@ -534,7 +525,6 @@ public class RefDirectory extends RefDatabase { } } - /** {@inheritDoc} */ @Override public Ref peel(Ref ref) throws IOException { final Ref leaf = ref.getLeaf(); @@ -585,7 +575,6 @@ public class RefDirectory extends RefDatabase { fireRefsChanged(); } - /** {@inheritDoc} */ @Override public RefDirectoryUpdate newUpdate(String name, boolean detach) throws IOException { @@ -609,7 +598,6 @@ public class RefDirectory extends RefDatabase { return new RefDirectoryUpdate(this, ref); } - /** {@inheritDoc} */ @Override public RefDirectoryRename newRename(String fromName, String toName) throws IOException { @@ -622,7 +610,6 @@ public class RefDirectory extends RefDatabase { return new RefDirectoryRename(from, to); } - /** {@inheritDoc} */ @Override public PackedBatchRefUpdate newBatchUpdate() { return new PackedBatchRefUpdate(this); @@ -643,7 +630,6 @@ public class RefDirectory extends RefDatabase { return new PackedBatchRefUpdate(this, shouldLockLooseRefs); } - /** {@inheritDoc} */ @Override public boolean performsAtomicTransactions() { return true; @@ -724,6 +710,7 @@ public class RefDirectory extends RefDatabase { * @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 @@ public class RefDirectory extends RefDatabase { * 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 @@ public class RefDirectory extends RefDatabase { * * @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 d07299e45a..1c5c48a296 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 @@ class RefDirectoryRename extends RefRename { 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 0dcb3196c5..1dc4e3011f 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 @@ class RefDirectoryUpdate extends RefUpdate { return false; } - /** {@inheritDoc} */ @Override protected void unlock() { if (lock != null) { @@ -70,7 +66,6 @@ class RefDirectoryUpdate extends RefUpdate { } } - /** {@inheritDoc} */ @Override protected Result doUpdate(Result status) throws IOException { WriteConfig wc = database.getRepository().getConfig() @@ -112,7 +107,6 @@ class RefDirectoryUpdate extends RefUpdate { } } - /** {@inheritDoc} */ @Override protected Result doDelete(Result status) throws IOException { if (getRef().getStorage() != Ref.Storage.NEW) @@ -120,7 +114,6 @@ class RefDirectoryUpdate extends RefUpdate { 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 cb80043b7e..6870d7686e 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 class ReflogEntryImpl implements Serializable, ReflogEntry { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getNewId() */ - /** {@inheritDoc} */ @Override public ObjectId getNewId() { return newId; @@ -78,7 +76,6 @@ public class ReflogEntryImpl implements Serializable, ReflogEntry { /* (non-Javadoc) * @see org.eclipse.jgit.internal.storage.file.ReflogEntry#getWho() */ - /** {@inheritDoc} */ @Override public PersonIdent getWho() { return who; @@ -87,13 +84,11 @@ public class ReflogEntryImpl implements Serializable, ReflogEntry { /* (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 class ReflogEntryImpl implements Serializable, ReflogEntry { /* (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 99a9e0938e..21b5a54eb7 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 @@ class ReflogReaderImpl implements ReflogReader { /* (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 @@ class ReflogReaderImpl implements ReflogReader { /* (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 @@ class ReflogReaderImpl implements ReflogReader { /* (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 7032083a4d..b1ceb14809 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 class ReflogWriter { * 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 class ReflogWriter { * 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 class ReflogWriter { * 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 class ReflogWriter { * 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 6a80519d0b..7a564cc6ab 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 @@ class SimpleDataInput implements DataInput { 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 d01f6b4bda..74840889ce 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 0b9748096e..767084afa5 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 @@ class SnapshottingRefDirectory extends RefDirectory { 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 @@ class SnapshottingRefDirectory extends RefDirectory { 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 @@ class SnapshottingRefDirectory extends RefDirectory { * 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 fa743babe7..01f514b939 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 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { 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 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { return null; } - /** {@inheritDoc} */ @Override public Optional getCommitGraph() { return db.getCommitGraph(); } - /** {@inheritDoc} */ @Override public Collection getCachedPacksAndUpdate( BitmapBuilder needBitmap) throws IOException { @@ -115,7 +111,6 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { return Collections.emptyList(); } - /** {@inheritDoc} */ @Override public Collection resolve(AbbreviatedObjectId id) throws IOException { @@ -126,13 +121,11 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { 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 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { 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 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { 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 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { } } - /** {@inheritDoc} */ @Override public void copyObjectAsIs(PackOutputStream out, ObjectToPack otp, boolean validate) throws IOException, @@ -196,7 +184,6 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { src.pack.copyAsIs(out, src, validate, this); } - /** {@inheritDoc} */ @Override public void writeObjects(PackOutputStream out, List list) throws IOException { @@ -240,7 +227,6 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { return cnt - need; } - /** {@inheritDoc} */ @Override public void copyPackAsIs(PackOutputStream out, CachedPack pack) throws IOException { @@ -336,7 +322,6 @@ final class WindowCursor extends ObjectReader implements ObjectReuseAsIs { } } - /** {@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 82d07e6bde..58695fc9ab 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 abstract class BlockSource implements AutoCloseable { // 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 ca2095feec..ce86eabe90 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 class CancellableDigestOutputStream extends OutputStream { return count; } - /** {@inheritDoc} */ @Override public final void write(int b) throws IOException { if (checkCancelAt <= count) { @@ -95,7 +94,6 @@ public class CancellableDigestOutputStream extends OutputStream { count++; } - /** {@inheritDoc} */ @Override public final void write(byte[] b, int off, int len) throws IOException { while (0 < len) { @@ -116,7 +114,6 @@ public class CancellableDigestOutputStream extends OutputStream { } } - /** {@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 1ac6627360..acc1c830d5 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 final class TernarySearchTree { * 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 7ed5defbe4..b86ff7f177 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 @@ public class DeltaIndex { 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 132eb5095b..9a3f4b07ee 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 @@ final class DeltaTask implements Callable { 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 d9013bff26..ea5b9461ca 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 class ObjectToPack extends PackedObjectInfo { return 1 < getOffset(); // markWantWrite sets 1. } - /** {@inheritDoc} */ @Override public final int getType() { return (flags >> TYPE_SHIFT) & 0x7; @@ -357,7 +356,6 @@ public class ObjectToPack extends PackedObjectInfo { // 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 d580083795..e6daaeaca9 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 enum PackExt { 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 9508f3fe39..1b4c5e21a8 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 @@ public class PackWriter implements AutoCloseable { /** * 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 7c06be876b..8700556d48 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 @@ import org.eclipse.jgit.lib.ReflogEntry; /** 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 f78975af34..f9c701ebe2 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 e210acf058..aeaf241710 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 class MergedReftable extends Reftable { return minUpdateIndex; } - /** {@inheritDoc} */ @Override public boolean hasObjectMap() throws IOException { boolean has = true; @@ -101,7 +99,6 @@ public class MergedReftable extends Reftable { return has; } - /** {@inheritDoc} */ @Override public RefCursor allRefs() throws IOException { MergedRefCursor m = new MergedRefCursor(); @@ -111,7 +108,6 @@ public class MergedReftable extends Reftable { return m; } - /** {@inheritDoc} */ @Override public RefCursor seekRef(String name) throws IOException { MergedRefCursor m = new MergedRefCursor(); @@ -121,7 +117,6 @@ public class MergedReftable extends Reftable { return m; } - /** {@inheritDoc} */ @Override public RefCursor seekRefsWithPrefix(String prefix) throws IOException { MergedRefCursor m = new MergedRefCursor(); @@ -131,7 +126,6 @@ public class MergedReftable extends Reftable { return m; } - /** {@inheritDoc} */ @Override public RefCursor byObjectId(AnyObjectId name) throws IOException { MergedRefCursor m = new FilteringMergedRefCursor(name); @@ -141,7 +135,6 @@ public class MergedReftable extends Reftable { return m; } - /** {@inheritDoc} */ @Override public LogCursor allLogs() throws IOException { MergedLogCursor m = new MergedLogCursor(); @@ -151,7 +144,6 @@ public class MergedReftable extends Reftable { 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 5e2c350883..6cd4f6c81d 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 abstract class RefCursor implements AutoCloseable { 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 63786dc17e..6e83778c78 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 abstract class Reftable { 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 dbc2ec7dc9..38c17e346a 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 @@ public abstract class ReftableBatchRefUpdate extends BatchRefUpdate { 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 aa3aba516f..86e16ec863 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 @@ class ReftableOutputStream extends OutputStream { 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 cabb2e1842..2a73efd962 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 class ReftableReader extends Reftable implements AutoCloseable { return maxUpdateIndex; } - /** {@inheritDoc} */ @Override public RefCursor allRefs() throws IOException { if (blockSize == -1) { @@ -144,7 +143,6 @@ public class ReftableReader extends Reftable implements AutoCloseable { return i; } - /** {@inheritDoc} */ @Override public RefCursor seekRef(String refName) throws IOException { initRefIndex(); @@ -155,7 +153,6 @@ public class ReftableReader extends Reftable implements AutoCloseable { return i; } - /** {@inheritDoc} */ @Override public RefCursor seekRefsWithPrefix(String prefix) throws IOException { initRefIndex(); @@ -166,7 +163,6 @@ public class ReftableReader extends Reftable implements AutoCloseable { return i; } - /** {@inheritDoc} */ @Override public RefCursor byObjectId(AnyObjectId id) throws IOException { initObjIndex(); @@ -179,7 +175,6 @@ public class ReftableReader extends Reftable implements AutoCloseable { return i; } - /** {@inheritDoc} */ @Override public LogCursor allLogs() throws IOException { initLogIndex(); @@ -192,7 +187,6 @@ public class ReftableReader extends Reftable implements AutoCloseable { return new EmptyLogCursor(); } - /** {@inheritDoc} */ @Override public LogCursor seekLog(String refName, long updateIndex) throws IOException { @@ -460,7 +454,6 @@ public class ReftableReader extends Reftable implements AutoCloseable { 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 f9f1def958..597303301a 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 class ReftableReflogReader implements ReflogReader { } } - /** {@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 class ReftableReflogReader implements ReflogReader { } } - /** {@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 d0e24413bb..ff8308df40 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 class SubmoduleValidator { * @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 659ccb8c55..29a2922136 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 class OpenSshConfigFile implements SshConfigStore { } } - /** {@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 9109cfd769..c3dffdfe79 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 @@ import org.eclipse.jgit.internal.JGitText; /** * 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 final class AbbrevConfig { * 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 @@ public final class AbbrevConfig { 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 dc5e5cc20f..a13136b9f1 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 @@ public final class AbbreviatedObjectId implements Serializable { 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 class AbbreviatedObjectId implements Serializable { 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 7685b30f8e..c58133adab 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 abstract class AnyObjectId implements Comparable { return abbr.prefixCompare(this) == 0; } - /** {@inheritDoc} */ @Override public final int hashCode() { return w2; @@ -266,7 +265,6 @@ public abstract class AnyObjectId implements Comparable { return other != null ? isEqual(this, other) : false; } - /** {@inheritDoc} */ @Override public final boolean equals(Object o) { if (o instanceof AnyObjectId) { @@ -477,7 +475,6 @@ public abstract class AnyObjectId implements Comparable { 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 d2367cc3d5..f9952501c3 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 @@ public class BatchRefUpdate { : 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 f826057370..8e92f20cb0 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 abstract class BatchingProgressMonitor implements ProgressMonitor { 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 abstract class BatchingProgressMonitor implements ProgressMonitor { 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 abstract class BatchingProgressMonitor implements ProgressMonitor { } } - /** {@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 6c625bb73a..39fc566034 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 1665f051e9..ea33082229 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 class CommitBuilder extends ObjectBuilder { 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 d1d66d280e..0cccaec492 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 class Config { /** * 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 @@ public class Config { /** * 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 class Config { * 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 class Config { * 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 4c080f4761..621db89f66 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 a9235ebcdf..e9a8b44271 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 @@ class ConfigLine { 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 3b2ef42bbe..60a23dde05 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 86409403b0..80aceb4e7d 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 @@ import org.eclipse.jgit.util.StringUtils; */ 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 class DefaultTypedConfigGetter implements TypedConfigGetter { } } - /** {@inheritDoc} */ @Override public > T getEnum(Config config, T[] all, String section, String subsection, String name, T defaultValue) { @@ -106,7 +104,6 @@ public class DefaultTypedConfigGetter implements TypedConfigGetter { 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 class DefaultTypedConfigGetter implements TypedConfigGetter { .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 class DefaultTypedConfigGetter implements TypedConfigGetter { 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 class DefaultTypedConfigGetter implements TypedConfigGetter { } } - /** {@inheritDoc} */ @Override public long getTimeUnit(Config config, String section, String subsection, String name, long defaultValue, TimeUnit wantUnit) { @@ -269,7 +263,6 @@ public class DefaultTypedConfigGetter implements TypedConfigGetter { 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 94d28eb345..a5410b778c 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 @@ package org.eclipse.jgit.lib; */ 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 e78cf16ea4..4018dabebe 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 class GpgSignature implements Serializable { 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 df9fd47efa..b009ea1af7 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 class IndexDiff { * @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 class IndexDiff { * @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 class IndexDiff { * 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 class IndexDiff { * * @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 class IndexDiff { * {@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 class IndexDiff { * 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 class IndexDiff { * {@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 4a712ba360..6a35dedcf5 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 @@ public class MutableObjectId extends AnyObjectId { } } - /** {@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 127cca9d1b..0a4db2a5f6 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 @@ public class NullProgressMonitor implements ProgressMonitor { // 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 4b7054f72b..064d89e084 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 @@ public abstract class ObjectBuilder { *

  • 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 9e9ef882a3..a1d6d92ec2 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 @@ public class ObjectChecker { * * @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 269049f4a2..1c31263e33 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 @@ public class ObjectId extends AnyObjectId implements Serializable { 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 29039097f1..a74fddff42 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 class ObjectIdOwnerMap *

    * 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 class ObjectIdOwnerMap * 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 class ObjectIdOwnerMap 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 a04ca6890c..c3c58372b1 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 @@ public abstract class ObjectIdRef implements Ref { 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 abstract class ObjectIdRef implements Ref { 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 0e015b658b..d4acfd4714 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 class ObjectIdSubclassMap * 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 class ObjectIdSubclassMap * 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 class ObjectIdSubclassMap 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 69b2b5104e..3e2998530f 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 class ObjectReader implements AutoCloseable { * * @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 abstract class ObjectReader implements AutoCloseable { /** * 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 93710299b4..3ba055aae8 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 class PersonIdent implements Serializable { return hc; } - /** {@inheritDoc} */ @Override public boolean equals(Object o) { if (o instanceof PersonIdent) { @@ -421,7 +420,6 @@ public class PersonIdent implements Serializable { 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 a4cd1d6894..c716f464d3 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 class RebaseTodoFile { * 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 @@ public class RebaseTodoFile { * 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 @@ public class RebaseTodoFile { * @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 8b778497fc..878cfc8f9d 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 class RebaseTodoLine { /** * @param token + * token to parse * @return the Action */ public static Action parse(String token) { @@ -245,7 +246,6 @@ public class RebaseTodoLine { 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 3ab649341f..c4c0001d3e 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 98089fb8fd..82dcc6b64c 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 abstract class RefDatabase { * 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 cdd4e4ba75..e8821d0cbb 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 abstract class RefRename { * * @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 abstract class RefRename { * * @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 d1be63b966..d113243bea 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 abstract class RefUpdate { /** * The ref was renamed from another name - *

    */ RENAMED, @@ -245,6 +244,7 @@ public abstract class RefUpdate { * 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 @@ public abstract class RefUpdate { * 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 @@ public abstract class RefUpdate { * 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 @@ public abstract class RefUpdate { * * @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 abstract class RefUpdate { * 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 @@ public abstract class RefUpdate { * @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 d2c3f9de68..41917f8b57 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 abstract class RefWriter { * @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 1e6a661572..5233bfc109 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 db2571c673..d446a1c9c7 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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * 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 @@ public abstract class Repository implements AutoCloseable { getRefDatabase().close(); } - /** {@inheritDoc} */ @Override @NonNull public String toString() { @@ -999,6 +1002,7 @@ public abstract class Repository implements AutoCloseable { * {@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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * * @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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * "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 abstract class Repository implements AutoCloseable { * * @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 abstract class Repository implements AutoCloseable { * changes are detected. * * @throws java.io.IOException + * if an IO error occurred */ public abstract void scanForRepoChanges() throws IOException; @@ -1703,6 +1713,7 @@ public abstract class Repository implements AutoCloseable { * @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 class Repository implements AutoCloseable { * @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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * @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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * {@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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * @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 abstract class Repository implements AutoCloseable { * 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 @@ public abstract class Repository implements AutoCloseable { * 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 @@ public abstract class Repository implements AutoCloseable { * 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 @@ public abstract class Repository implements AutoCloseable { * 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 abstract class Repository implements AutoCloseable { * @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 9ddfd59a18..a10eb0c583 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 abstract class StoredConfig extends Config { */ 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 3ba33422c6..6fb8f326cc 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 class SymbolicRef implements Ref { 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 class SymbolicRef implements Ref { 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 class SymbolicRef implements Ref { 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 facb4a54be..bbc614448f 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 class TagBuilder extends ObjectBuilder { } } - /** {@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 85aa0b6639..98ea2f97a3 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 class TextProgressMonitor extends BatchingProgressMonitor { this.write = true; } - /** {@inheritDoc} */ @Override protected void onUpdate(String taskName, int workCurr, Duration duration) { StringBuilder s = new StringBuilder(); @@ -53,7 +52,6 @@ public class TextProgressMonitor extends BatchingProgressMonitor { send(s); } - /** {@inheritDoc} */ @Override protected void onEndTask(String taskName, int workCurr, Duration duration) { StringBuilder s = new StringBuilder(); @@ -73,7 +71,6 @@ public class TextProgressMonitor extends BatchingProgressMonitor { appendDuration(s, duration); } - /** {@inheritDoc} */ @Override protected void onUpdate(String taskName, int cmp, int totalWork, int pcnt, Duration duration) { @@ -82,7 +79,6 @@ public class TextProgressMonitor extends BatchingProgressMonitor { 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 e553955560..05eacdcd63 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 class ThreadSafeProgressMonitor implements ProgressMonitor { this.process = new Semaphore(0); } - /** {@inheritDoc} */ @Override public void start(int totalTasks) { if (!isMainThread()) @@ -63,7 +62,6 @@ public class ThreadSafeProgressMonitor implements ProgressMonitor { pm.start(totalTasks); } - /** {@inheritDoc} */ @Override public void beginTask(String title, int totalWork) { if (!isMainThread()) @@ -132,14 +130,12 @@ public class ThreadSafeProgressMonitor implements ProgressMonitor { 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 class ThreadSafeProgressMonitor implements ProgressMonitor { } } - /** {@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 e1f8684830..c3c170a2c9 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 class TreeFormatter { } } - /** {@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 c4eb8f10d5..0c03adcab8 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 @@ public interface TypedConfigGetter { /** * 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 e44970abff..1ddac18e56 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 @@ class EolAwareOutputStream extends OutputStream { 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 80607351ae..abca813c11 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 @@ public final class MergeAlgorithm { /** * 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 18b0ad92c8..baf5d27714 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 class MergeFormatter { * @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 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, String, String, String, Charset)} * instead. @@ -134,6 +137,7 @@ public class MergeFormatter { * @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 20fc3c339c..acf955303d 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 class MergeResult implements Iterable { 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 df6068925b..1162a615f2 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 @@ public class RecursiveMerger extends ResolveMerger { * 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 @@ public class RecursiveMerger extends ResolveMerger { * 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 e56513d4e9..2b2ab023ba 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 @@ public class ResolveMerger extends ThreeWayMerger { /** * Detects if CRLF conversion has been configured. *

    - *

    * See {@link EolStreamTypeUtil#detectStreamType} for more info. * * @param attributes @@ -904,7 +903,6 @@ public class ResolveMerger extends ThreeWayMerger { : strategy; } - /** {@inheritDoc} */ @Override protected boolean mergeImpl() throws IOException { return mergeTrees(mergeBase(), sourceTrees[0], sourceTrees[1], @@ -915,18 +913,23 @@ public class ResolveMerger extends ThreeWayMerger { * 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 @@ public class ResolveMerger extends ThreeWayMerger { * 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 @@ public class ResolveMerger extends ThreeWayMerger { * 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 @@ public class ResolveMerger extends ThreeWayMerger { * 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 @@ public class ResolveMerger extends ThreeWayMerger { * 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 @@ public class ResolveMerger extends ThreeWayMerger { return FileMode.GITLINK.equals(mode); } - /** {@inheritDoc} */ @Override public ObjectId getResultTreeId() { return (resultTree == null) ? null : resultTree.toObjectId(); @@ -1819,6 +1835,7 @@ public class ResolveMerger extends ThreeWayMerger { * 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 @@ public class ResolveMerger extends ThreeWayMerger { * {@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 7055ccd127..6064ebe326 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 @@ public class StrategyOneSided extends MergeStrategy { 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 c9512edf63..a74bfc0379 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 @@ import org.eclipse.jgit.lib.Repository; */ 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 5991ef68a3..a686fd0964 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 @@ import org.eclipse.jgit.lib.Repository; */ 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 ff40fc1d68..c3180abd35 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 @@ public class StrategySimpleTwoWayInCore extends ThreeWayMergeStrategy { // } - /** {@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 411789fd95..8cefa6566e 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 @@ import org.eclipse.jgit.lib.Repository; * 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 f283edee01..68a1b5e509 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 abstract class ThreeWayMerger extends Merger { } } - /** {@inheritDoc} */ @Override public boolean merge(AnyObjectId... tips) throws IOException { if (tips.length != 2) @@ -96,7 +95,6 @@ public abstract class ThreeWayMerger extends Merger { return super.merge(tips); } - /** {@inheritDoc} */ @Override public ObjectId getBaseCommitId() { return baseCommitId; @@ -108,6 +106,7 @@ public abstract class ThreeWayMerger extends Merger { * @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 881873de6f..16d17637e2 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 @@ public class NLS { * 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 bde0b9e445..b65f28c918 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 @@ import org.eclipse.jgit.util.io.UnionInputStream; */ 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 c35696323e..2f719bf453 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 @@ public class Note extends ObjectId { 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 93adf36a3a..b872750212 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 @@ public class NoteMap implements Iterable { 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 a6ea523a78..79ceb1316a 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 class NoteMapMerger { * 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 class NoteMapMerger { * 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 4ba7cca51e..e29af614a6 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 class CombinedFileHeader extends FileHeader { } /** - * {@inheritDoc} - *

    - * * @return number of ancestor revisions mentioned in this diff. */ @Override @@ -60,7 +56,7 @@ public class CombinedFileHeader extends FileHeader { /** * {@inheritDoc} - *

    + * * @return get the file mode of the first parent. */ @Override @@ -81,7 +77,6 @@ public class CombinedFileHeader extends FileHeader { /** * {@inheritDoc} - *

    * * @return get the object id of the first parent. */ @@ -101,7 +96,6 @@ public class CombinedFileHeader extends FileHeader { return oldIds[nthParent]; } - /** {@inheritDoc} */ @Override public String getScriptText(Charset ocs, Charset ncs) { final Charset[] cs = new Charset[getParentCount() + 1]; @@ -110,11 +104,6 @@ public class CombinedFileHeader extends FileHeader { 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 @@ public class CombinedFileHeader extends FileHeader { return ptr; } - /** {@inheritDoc} */ @Override protected void parseIndexLine(int ptr, int eol) { // "index $asha1,$bsha1..$csha1" @@ -178,7 +166,6 @@ public class CombinedFileHeader extends FileHeader { 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 263b1b9ddc..49cf499865 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 class CombinedHunkHeader extends HunkHeader { } } - /** {@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 1e6fb780b2..a47b73dc34 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 class FileHeader extends DiffEntry { 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 5618a71782..8d21b6dabb 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 class FormatError { 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 4b59fcfc63..1359f66062 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 @@ public class HunkHeader { 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 da698d6bf6..e9c1192796 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 class PatchApplier { * 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 @@ public class PatchApplier { * @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 @@ public class PatchApplier { * 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 c11fca13d8..fa109e8208 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 class PlotCommit extends RevCommit { 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 458f240982..3177de17e8 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 class PlotCommitList extends laneLength.clear(); } - /** {@inheritDoc} */ @Override public void source(RevWalk w) { if (!(w instanceof PlotWalk)) @@ -91,7 +89,6 @@ public class PlotCommitList extends result.add((L) p); } - /** {@inheritDoc} */ @SuppressWarnings("ReferenceEquality") @Override protected void enter(int index, PlotCommit currCommit) { @@ -184,6 +181,7 @@ public class PlotCommitList extends * @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 @@ public class PlotCommitList extends * 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 0582338652..0f6bd2d6cc 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 class PlotWalk extends RevWalk { * @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 class PlotWalk extends RevWalk { } } - /** {@inheritDoc} */ @Override public void sort(RevSort s, boolean use) { if (s == RevSort.TOPO && !use) @@ -105,13 +104,11 @@ public class PlotWalk extends RevWalk { 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 dda108bc69..73ae62a23f 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 @@ abstract class AbstractRevQueue extends Generator { } /** - * {@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 cdd8073d6e..e855d8f700 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 @@ abstract class BlockRevQueue extends AbstractRevQueue { } /** - * {@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 @@ abstract class BlockRevQueue extends AbstractRevQueue { *

    * 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 0cabf07057..4ec9afc718 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 class DateRevQueue extends AbstractRevQueue { } } - /** {@inheritDoc} */ @Override public void add(RevCommit c) { sinceLastIndex++; @@ -102,7 +101,6 @@ public class DateRevQueue extends AbstractRevQueue { } } - /** {@inheritDoc} */ @Override public RevCommit next() { final Entry q = head; @@ -139,7 +137,6 @@ public class DateRevQueue extends AbstractRevQueue { return head != null ? head.commit : null; } - /** {@inheritDoc} */ @Override public void clear() { head = null; @@ -173,7 +170,6 @@ public class DateRevQueue extends AbstractRevQueue { 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 ec0824cb0b..664f8fa3a7 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 5277563ac4..f74666bd86 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 interface DepthWalk { * @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 interface DepthWalk { * @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 interface DepthWalk { * @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 0f8eddd6d4..996745c158 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 class FIFORevQueue extends BlockRevQueue { super(s); } - /** {@inheritDoc} */ @Override public void add(RevCommit c) { Block b = tail; @@ -82,7 +81,6 @@ public class FIFORevQueue extends BlockRevQueue { head = b; } - /** {@inheritDoc} */ @Override public RevCommit next() { final Block b = head; @@ -99,7 +97,6 @@ public class FIFORevQueue extends BlockRevQueue { return c; } - /** {@inheritDoc} */ @Override public void clear() { head = null; @@ -135,7 +132,6 @@ public class FIFORevQueue extends BlockRevQueue { } } - /** {@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 3b54123f0b..14a34375cd 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 class FollowFilter extends TreeFilter { return path.getPath(); } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, @@ -85,19 +84,16 @@ public class FollowFilter extends TreeFilter { 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 74e4c1edb7..af50794014 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 final class FooterKey { 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 3d128a6bd3..676573c2f2 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 final class FooterLine { 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 3493dcfb47..d97812ff45 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 @@ abstract class Generator { * * @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 4773ca8427..ae67ca7599 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 class LIFORevQueue extends BlockRevQueue { super(s); } - /** {@inheritDoc} */ @Override public void add(RevCommit c) { Block b = head; @@ -47,7 +46,6 @@ public class LIFORevQueue extends BlockRevQueue { b.unpop(c); } - /** {@inheritDoc} */ @Override public RevCommit next() { final Block b = head; @@ -62,7 +60,6 @@ public class LIFORevQueue extends BlockRevQueue { return c; } - /** {@inheritDoc} */ @Override public void clear() { head = null; @@ -89,7 +86,6 @@ public class LIFORevQueue extends BlockRevQueue { 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 4e48a5c328..64b2fcd66a 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 @@ public class ObjectWalk extends RevWalk { 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 class ObjectWalk extends RevWalk { visitationPolicy = requireNonNull(policy); } - /** {@inheritDoc} */ @Override public RevCommit next() throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -762,7 +759,6 @@ public class ObjectWalk extends RevWalk { pathBuf = newBuf; } - /** {@inheritDoc} */ @Override public void dispose() { super.dispose(); @@ -771,7 +767,6 @@ public class ObjectWalk extends RevWalk { 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 f5abbb870a..1f81b6a922 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 @@ public class RevBlob extends RevObject { 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 b64c9ce906..e32f28ebbc 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 @@ public class RevCommit extends RevObject { flags |= PARSED; } - /** {@inheritDoc} */ @Override public final int getType() { return Constants.OBJ_COMMIT; @@ -713,7 +712,6 @@ public class RevCommit extends RevObject { 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 4d3664da11..3846ca579a 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 @@ class RevCommitCG extends RevCommit { this.graphPosition = graphPosition; } - /** {@inheritDoc} */ @Override void parseCanonical(RevWalk walk, byte[] raw) throws IOException { if (walk.isRetainBody()) { @@ -53,7 +52,6 @@ class RevCommitCG extends RevCommit { parseInGraph(walk); } - /** {@inheritDoc} */ @Override void parseHeaders(RevWalk walk) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -98,7 +96,6 @@ class RevCommitCG extends RevCommit { 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 59213a8e60..58f5d425cc 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 @@ import org.eclipse.jgit.revwalk.filter.RevFilter; public class RevCommitList extends RevObjectList { private RevWalk walker; - /** {@inheritDoc} */ @Override public void clear() { super.clear(); @@ -313,7 +312,6 @@ public class RevCommitList extends RevObjectList { * 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 a0160ddbef..3221bf6e8f 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 class RevFlag { 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 4d2684a0f0..55ea30d24b 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 abstract class RevObject extends ObjectIdOwnerMap.Entry { 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 0393f55957..ad8aeedeb9 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 class RevObjectList extends AbstractList { // Initialized above. } - /** {@inheritDoc} */ @Override public void add(int index, E element) { if (index != size) @@ -58,7 +57,6 @@ public class RevObjectList extends AbstractList { size++; } - /** {@inheritDoc} */ @Override @SuppressWarnings("unchecked") public E set(int index, E element) { @@ -80,7 +78,6 @@ public class RevObjectList extends AbstractList { return (E) old; } - /** {@inheritDoc} */ @Override @SuppressWarnings("unchecked") public E get(int index) { @@ -95,13 +92,11 @@ public class RevObjectList extends AbstractList { 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 b9d145008b..75dbd57740 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 @@ public class RevTag extends RevObject { 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 8119af468a..d81af0c029 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 @@ public class RevTree extends RevObject { 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 3737c6b67b..27a09f4956 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 class RevWalk implements Iterable, AutoCloseable { /** * 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 class RevWalk implements Iterable, AutoCloseable { *

    * 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 class RevWalk implements Iterable, AutoCloseable { *

    * 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 @@ public class RevWalk implements Iterable, AutoCloseable { /** * 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 e52e916318..4bfe2fda02 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 @@ public final class 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 final class RevWalkUtils { * 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 final class RevWalkUtils { * 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 final class RevWalkUtils { * 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 2c88bb872e..4a93f4d745 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 @@ class RewriteGenerator extends Generator { * 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 452545a04e..c9d8ff90fd 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 4739f78fc0..950b0a45b4 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 f921449ffa..98bb5884fa 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 class TreeRevFilter extends RevFilter { 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 class TreeRevFilter extends RevFilter { 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 6ac490a345..4100e877df 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 abstract class CommitTimeRevFilter extends RevFilter { 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 0e3a803b64..09bcb33f2e 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 @@ public class MaxCountRevFilter extends RevFilter { this.maxCount = maxCount; } - /** {@inheritDoc} */ @Override public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, @@ -57,7 +56,6 @@ public class MaxCountRevFilter extends RevFilter { 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 1482c51291..8fcebc9fa1 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 @@ public class NotRevFilter extends RevFilter { 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 class NotRevFilter extends RevFilter { 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 256e4794cd..8430646305 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 class RevFilter { @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 16d9f76143..f9ee632b50 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 abstract class RevFlagFilter extends RevFilter { 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 84df36a2d2..bf93b7ba3e 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 @@ public class SkipRevFilter extends RevFilter { this.skip = skip; } - /** {@inheritDoc} */ @Override public boolean include(RevWalk walker, RevCommit cmit) throws StopWalkException, MissingObjectException, @@ -55,7 +54,6 @@ public class SkipRevFilter extends RevFilter { 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 7f00dfd504..ff1fea2418 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 @@ public abstract class SubStringRevFilter extends RevFilter { pattern = new RawSubStringPattern(patternText); } - /** {@inheritDoc} */ @Override public boolean include(RevWalk walker, RevCommit cmit) throws MissingObjectException, IncorrectObjectTypeException, @@ -75,7 +74,6 @@ public abstract class SubStringRevFilter extends RevFilter { return pattern.match(text(cmit)) >= 0; } - /** {@inheritDoc} */ @Override public boolean requiresCommitBody() { return true; @@ -90,13 +88,11 @@ public abstract class SubStringRevFilter extends RevFilter { */ 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 cba5e1697c..910c5cbd85 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 class FileBasedConfig extends StoredConfig { this.hash = ObjectId.zeroId(); } - /** {@inheritDoc} */ @Override protected boolean notifyUponTransientChanges() { // we will notify listeners upon save() @@ -197,7 +196,6 @@ public class FileBasedConfig extends StoredConfig { fireConfigChangedEvent(); } - /** {@inheritDoc} */ @Override public void clear() { hash = hash(new byte[0]); @@ -208,7 +206,6 @@ public class FileBasedConfig extends StoredConfig { 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 b0b1d4ff2d..95c001e8a3 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 class PackConfig { /** * 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 class PackConfig { /** * 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 class PackConfig { * @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 class PackConfig { 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 856eb725dd..f09e1a5171 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 bf77021b0c..7d5836ece2 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 class SubmoduleWalk implements AutoCloseable { * @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 class SubmoduleWalk implements AutoCloseable { * @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 class SubmoduleWalk implements AutoCloseable { * @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 class SubmoduleWalk implements AutoCloseable { * 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 class SubmoduleWalk implements AutoCloseable { * 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 class SubmoduleWalk implements AutoCloseable { * 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 class SubmoduleWalk implements AutoCloseable { * @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 class SubmoduleWalk implements AutoCloseable { * 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 @@ public class SubmoduleWalk implements AutoCloseable { * @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 class SubmoduleWalk implements AutoCloseable { * 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 class SubmoduleWalk implements AutoCloseable { * @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 @@ public class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * 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 class SubmoduleWalk implements AutoCloseable { * 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 class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * 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 class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * * @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 @@ public class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * * @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 class SubmoduleWalk implements AutoCloseable { * * @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 fb9c14576a..260a85e0e4 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 @@ import org.eclipse.jgit.revwalk.RevWalk; * @since 2.0 */ public abstract class AbstractAdvertiseRefsHook implements AdvertiseRefsHook { - /** {@inheritDoc} */ @Override public void advertiseRefs(UploadPack uploadPack) throws ServiceMayNotContinueException { @@ -67,7 +66,6 @@ public abstract class AbstractAdvertiseRefsHook implements AdvertiseRefsHook { } /** - * {@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 84c36915a2..6381f1e946 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 @@ public interface AdvertiseRefsHook { * @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 eb9c673ef3..6db0775769 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 class AdvertiseRefsHookChain implements AdvertiseRefsHook { } } - /** - * {@inheritDoc} - */ @Override public void advertiseRefs(ReceivePack rp) throws IOException { @@ -60,7 +57,6 @@ public class AdvertiseRefsHookChain implements AdvertiseRefsHook { 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 9e229a18ad..3ac9f59ba6 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 @@ public abstract class BaseConnection implements Connection { 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 6954bd9a0e..48992f3e3b 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 @@ import org.eclipse.jgit.lib.Ref; */ 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 @@ abstract class BaseFetchConnection extends BaseConnection implements 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 09c559d7b5..bac5025f83 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 @@ import org.eclipse.jgit.util.io.TimeoutOutputStream; */ 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 @@ abstract class BasePackConnection extends BaseConnection { *

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

    - *

    *

    * For example, given: *

    @@ -627,7 +633,6 @@ abstract class BasePackConnection extends BaseConnection { } } - /** {@inheritDoc} */ @Override public String getPeerUserAgent() { String agent = remoteCapabilities.get(OPTION_AGENT); @@ -642,7 +647,6 @@ abstract class BasePackConnection extends BaseConnection { 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 8909380176..cdda3c0388 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 @@ public abstract class BasePackFetchConnection extends BasePackConnection } } - /** {@inheritDoc} */ @Override public final void fetch(final ProgressMonitor monitor, final Collection want, final Set have) @@ -342,7 +341,6 @@ public abstract class BasePackFetchConnection extends BasePackConnection 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 abstract class BasePackFetchConnection extends BasePackConnection 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 @@ public abstract class BasePackFetchConnection extends BasePackConnection 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 adc1c9849d..9a96fdcf37 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 abstract class BasePackPushConnection extends BasePackConnection implemen useBitmaps = transport.isPushUseBitmaps(); } - /** {@inheritDoc} */ @Override public void push(final ProgressMonitor monitor, final Map refUpdates) @@ -130,7 +129,6 @@ public abstract class BasePackPushConnection extends BasePackConnection implemen push(monitor, refUpdates, null); } - /** {@inheritDoc} */ @Override public void push(final ProgressMonitor monitor, final Map refUpdates, OutputStream outputStream) @@ -139,7 +137,6 @@ public abstract class BasePackPushConnection extends BasePackConnection implemen 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 f04e573feb..5299dfa981 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 @@ class BundleFetchConnection extends BaseFetchConnection { 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 @@ class BundleFetchConnection extends BaseFetchConnection { } } - /** {@inheritDoc} */ @Override public void setPackLockMessage(String message) { lockMessage = message; } - /** {@inheritDoc} */ @Override public Collection getPackLocks() { if (packLock != null) @@ -258,7 +254,6 @@ class BundleFetchConnection extends BaseFetchConnection { } } - /** {@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 6a4cfca865..3bae0eae5a 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 class ChainingCredentialsProvider extends CredentialsProvider { Arrays.asList(providers)); } - /** {@inheritDoc} */ @Override public boolean isInteractive() { for (CredentialsProvider p : credentialProviders) @@ -48,7 +47,6 @@ public class ChainingCredentialsProvider extends CredentialsProvider { 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 2b09424526..78c5c6374f 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 abstract class CredentialItem { } /** - * * @param newValue + * the new value */ public void setValue(String newValue) { value = newValue; @@ -223,6 +223,7 @@ public abstract class CredentialItem { * 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 a8cf849fed..12a7dd3af4 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 @@ public final class FilterSpec { return val.testBit(type); } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof ObjectTypes)) { @@ -66,7 +65,6 @@ public final class FilterSpec { 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 44656c1397..6d5b5e61ec 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 interface FtpChannel { * @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 interface FtpChannel { /** * @return the current remote directory path * @throws IOException + * if an IO error occurred */ String pwd() throws IOException; @@ -118,6 +120,7 @@ public interface FtpChannel { * 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 @@ public interface FtpChannel { * @param path * to delete * @throws IOException + * if an IO error occurred */ void rmdir(String path) throws IOException; @@ -137,6 +141,7 @@ public interface FtpChannel { * @param path * to create * @throws IOException + * if an IO error occurred */ void mkdir(String path) throws IOException; @@ -148,6 +153,7 @@ public interface FtpChannel { * * @return the stream to read from * @throws IOException + * if an IO error occurred */ InputStream get(String path) throws IOException; @@ -160,6 +166,7 @@ public interface FtpChannel { * * @return the stream to read from * @throws IOException + * if an IO error occurred */ OutputStream put(String path) throws IOException; @@ -204,6 +211,7 @@ public interface FtpChannel { * @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 14d6c1ec14..655b4605e4 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 class HMACSHA1NonceGenerator implements NonceGenerator { } } - /** {@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 aec5b89c7e..3db0421d69 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 @@ abstract class HttpAuthMethod { * 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 @@ abstract class HttpAuthMethod { * 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 18dc792eb1..9a699a877f 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 @@ class InternalFetchConnection extends BasePackFetchConnection { 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 d2b0ef4a29..a23fdc94ad 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 @@ class InternalPushConnection extends BasePackPushConnection { 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 856047ee19..b2799e1362 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 @@ public final class LsRefsV2Request { /** * @param value + * ref prefix values * @return the Builder */ public Builder setRefPrefixes(List value) { @@ -139,6 +140,7 @@ public final class LsRefsV2Request { /** * @param value + * of symrefs * @return the Builder */ public Builder setSymrefs(boolean value) { @@ -148,6 +150,7 @@ public final class LsRefsV2Request { /** * @param value + * of peel * @return the Builder */ public Builder setPeel(boolean value) { @@ -203,7 +206,11 @@ public final class LsRefsV2Request { 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 6531b17e23..e32530cc9b 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 class NetRCCredentialsProvider extends CredentialsProvider { CredentialsProvider.setDefault(new NetRCCredentialsProvider()); } - /** {@inheritDoc} */ @Override public boolean supports(CredentialItem... items) { for (CredentialItem i : items) { @@ -81,7 +80,6 @@ public class NetRCCredentialsProvider extends CredentialsProvider { return true; } - /** {@inheritDoc} */ @Override public boolean get(URIish uri, CredentialItem... items) throws UnsupportedCredentialItem { @@ -112,7 +110,6 @@ public class NetRCCredentialsProvider extends CredentialsProvider { 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 2541ff1393..30e80e0783 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 86a2716675..2a52d7fd7f 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 @@ public final class ObjectInfoRequest { /** * @param value + * of objectIds * @return the Builder */ public Builder setObjectIDs(List value) { @@ -60,7 +61,11 @@ public final class ObjectInfoRequest { 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 d9669044c7..fe9ddabf8e 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 @@ public abstract class PackParser { * @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 bf7997ec62..d7ef4f8f0a 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 class PackedObjectInfo extends ObjectIdOwnerMap.Entry { * 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 4d53e1b261..f9d2c38ad3 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 class PostReceiveHookChain implements PostReceiveHook { } } - /** {@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 4334888a9a..072f43f41b 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 class PostUploadHookChain implements PostUploadHook { } } - /** {@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 dffa30da8e..2a5522bb4c 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 class PreReceiveHookChain implements PreReceiveHook { } } - /** {@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 9c28abed95..dc703d0b11 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 class PreUploadHookChain implements PreUploadHook { } } - /** {@inheritDoc} */ @Override public void onBeginNegotiateRound(UploadPack up, Collection wants, int cntOffered) @@ -58,7 +57,6 @@ public class PreUploadHookChain implements PreUploadHook { } } - /** {@inheritDoc} */ @Override public void onEndNegotiateRound(UploadPack up, Collection wants, int cntCommon, @@ -69,7 +67,6 @@ public class PreUploadHookChain implements PreUploadHook { } } - /** {@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 9d055519a5..f1afeab020 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 d9831c7701..437abb0639 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 @@ public class PushCertificate { 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 @@ public class PushCertificate { 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 94d1169abb..bd76b34aef 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 class PushCertificateIdent { 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 51c8558bfd..32c443f0f3 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 @@ 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 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 b59ae0c450..8f90f326d3 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 @@ class PushProcess { * {@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 ab411600f1..bfc75f036c 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 @@ public class ReceiveCommand { 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 816cec89af..9a61774334 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 class ReceivePack { * 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 class ReceivePack { * Set an error handler for {@link ReceiveCommand}. * * @param receiveCommandErrorHandler + * the error handler * @since 5.7 */ public void setReceiveCommandErrorHandler( @@ -1212,6 +1214,7 @@ public class ReceivePack { * * @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 @@ public class ReceivePack { /** * 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 @@ public class ReceivePack { /** * 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 class ReceivePack { * 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 class ReceivePack { * 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 c525e66848..6b022ea5d1 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 abstract class RefAdvertiser { /** * 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 1af3fadadb..8a131c8971 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 class RefLeaseSpec implements Serializable { 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 61d193593a..0466085b32 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 @@ public class RefSpec implements Serializable { return true; } - /** {@inheritDoc} */ @Override public int hashCode() { int hc = 0; @@ -627,7 +626,6 @@ public class RefSpec implements Serializable { return hc; } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof RefSpec)) @@ -649,7 +647,6 @@ public class RefSpec implements Serializable { && 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 218e62c10a..fb3cd21d1a 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 @@ public class RemoteRefUpdate { 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 96c7be5b97..1f96be8e47 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 class SideBandInputStream extends InputStream { 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 bb80299fad..b6d840dd81 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 @@ public class SideBandOutputStream extends OutputStream { 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 class SideBandOutputStream extends OutputStream { } } - /** {@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 33308600d9..1e85d81084 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 @@ class SideBandProgressMonitor extends BatchingProgressMonitor { send(s); } - /** {@inheritDoc} */ @Override protected void onEndTask(String taskName, int workCurr, Duration duration) { StringBuilder s = new StringBuilder(); @@ -54,7 +52,6 @@ class SideBandProgressMonitor extends BatchingProgressMonitor { appendDuration(s, duration); } - /** {@inheritDoc} */ @Override protected void onUpdate(String taskName, int cmp, int totalWork, int pcnt, Duration duration) { @@ -64,7 +61,6 @@ class SideBandProgressMonitor extends BatchingProgressMonitor { 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 1226a6b5ea..b2e2549f12 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 48cacf0964..be0c2963d9 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 @@ public final class 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 28ec92c706..8d93977a1d 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 @@ public abstract class SshTransport extends TcpTransport {
     		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 1985b66d87..77ab0f676d 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 class TestProtocol extends TransportProtocol {
     		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 class TestProtocol extends TransportProtocol {
     		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 51bc07cb94..26045a2c7c 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 @@ public class TrackingRefUpdate {
     		}
     	}
     
    -	/** {@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 ee35f4866e..4d2f4a9ac0 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 abstract class Transport implements AutoCloseable {
     	 * 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 784f566159..58232a7dde 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 @@ public class TransportAmazonS3 extends HttpTransport implements WalkTransport {
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		final DatabaseS3 c = new DatabaseS3(bucket, keyPrefix + "/objects"); //$NON-NLS-1$
    @@ -179,7 +178,6 @@ public class TransportAmazonS3 extends HttpTransport implements WalkTransport {
     		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 class TransportAmazonS3 extends HttpTransport implements WalkTransport {
     		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 04ebddb107..0f84f7e21e 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 @@ class TransportBundleFile extends Transport implements TransportBundle {
     		bundle = bundlePath;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws NotSupportedException,
     			TransportException {
    @@ -121,14 +120,12 @@ class TransportBundleFile extends Transport implements TransportBundle {
     		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 eac9208a3a..0366bf3aa2 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 class TransportBundleStream extends Transport implements TransportBundle
     		src = in;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		if (src == null)
    @@ -69,14 +68,12 @@ public class TransportBundleStream extends Transport implements TransportBundle
     		}
     	}
     
    -	/** {@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 a1914b6182..43b3f6cce0 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 @@ class TransportGitAnon extends TcpTransport implements PackTransport {
     		super(uri);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		return new TcpFetchConnection();
    @@ -102,13 +101,11 @@ class TransportGitAnon extends TcpTransport implements PackTransport {
     		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 19ed4fbcc1..a2273b21be 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 class TransportGitSsh extends SshTransport implements PackTransport {
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		return new SshFetchConnection();
    @@ -153,7 +152,6 @@ public class TransportGitSsh extends SshTransport implements PackTransport {
     		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 df034bdc8b..c08b7fa243 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 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
     	 * @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 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
     	 * 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 class TransportHttp extends HttpTransport implements WalkTransport,
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException,
     			NotSupportedException {
    @@ -532,7 +534,6 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
     		return new BufferedReader(new InputStreamReader(in, UTF_8));
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws NotSupportedException,
     			TransportException {
    @@ -567,7 +568,6 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
     		return p;
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public void close() {
     		if (gitSession != null) {
    @@ -822,7 +822,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
     		/**
     		 * 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 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
     	/**
     	 * 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 77d1419ea2..3a06ce5b63 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 @@ class TransportLocal extends Transport implements PackTransport {
     		}
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		return openFetch(Collections.emptyList());
    @@ -170,7 +169,6 @@ class TransportLocal extends Transport implements PackTransport {
     		return new InternalFetchConnection<>(this, upf, null, openRepo());
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public PushConnection openPush() throws TransportException {
     		final String rp = getOptionReceivePack();
    @@ -183,7 +181,6 @@ class TransportLocal extends Transport implements PackTransport {
     		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 912a90a1bf..bfb840d75f 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 class TransportProtocol {
     	 *            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 b9feeb9c02..a59d352e0d 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 class TransportSftp extends SshTransport implements WalkTransport {
     		super(local, uri);
     	}
     
    -	/** {@inheritDoc} */
     	@Override
     	public FetchConnection openFetch() throws TransportException {
     		final SftpObjectDB c = new SftpObjectDB(uri.getPath());
    @@ -113,7 +112,6 @@ public class TransportSftp extends SshTransport implements WalkTransport {
     		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 c9bb89a436..4de6ff825f 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 class URIish implements Serializable { * 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 class URIish implements Serializable { return r; } - /** {@inheritDoc} */ @Override public int hashCode() { int hc = 0; @@ -570,7 +571,6 @@ public class URIish implements Serializable { return hc; } - /** {@inheritDoc} */ @Override public boolean equals(Object obj) { if (!(obj instanceof URIish)) @@ -611,7 +611,6 @@ public class URIish implements Serializable { return format(true, false); } - /** {@inheritDoc} */ @Override public String toString() { return format(false, false); @@ -683,7 +682,8 @@ public class URIish implements Serializable { /** * 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 3264f556fa..78e9110c7c 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 class UploadPack implements Closeable { * 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 @@ public class UploadPack implements Closeable { * 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 @@ public class UploadPack implements Closeable { * 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 df98d0cfd5..7b052ad4a7 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 class UserAgent { /** * * @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 @@ public class UserAgent { /** * * @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 c0de42cb57..da8af5a0fe 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 class UsernamePasswordCredentialsProvider extends CredentialsProvider { 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 class UsernamePasswordCredentialsProvider extends CredentialsProvider { 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 c8cdb5a549..3bfc5234ee 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 @@ abstract class WalkEncryption { * 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 @@ abstract class WalkEncryption { * 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 @@ abstract class WalkEncryption { * 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 cc6c252fa1..8d89107c2b 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 @@ class WalkFetchConnection extends BaseFetchConnection { } } - /** {@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 a54fd8e14d..464017a84d 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 @@ class WalkPushConnection extends BaseConnection implements PushConnection { push(monitor, refUpdates, null); } - /** {@inheritDoc} */ @Override public void push(final ProgressMonitor monitor, final Map refUpdates, OutputStream out) @@ -184,7 +182,6 @@ class WalkPushConnection extends BaseConnection implements PushConnection { } } - /** {@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 98c231a46d..125ee6cbe9 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 @@ public interface HttpConnection { * @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 @@ public interface HttpConnection { /** * 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 @@ public interface HttpConnection { * @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 @@ public interface HttpConnection { * * @see HttpURLConnection#connect() * @throws java.io.IOException + * if an IO error occurred */ void connect() throws IOException; @@ -338,7 +342,9 @@ public interface HttpConnection { * 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 @@ public interface HttpConnection { * @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 bd0aa3f7ad..b50eaa4186 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 88abc60162..71d5c1b6f7 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 @@ public interface HttpConnectionFactory2 extends HttpConnectionFactory { * {@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 3b0bae21ef..8e9be1dde8 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 @@ public class JDKHttpConnection implements HttpConnection { * @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 @@ public class JDKHttpConnection implements HttpConnection { .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 @@ public class JDKHttpConnection implements HttpConnection { 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 046f395049..36731a5fa6 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 class FileResolver implements RepositoryResolver { 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 3ef5b29a55..65b18086b4 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 abstract class AbstractTreeIterator { 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 5c3f6aefe1..c6d50d35f1 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 class CanonicalTreeParser extends AbstractTreeIterator { reset(reader.open(id, OBJ_TREE).getCachedBytes()); } - /** {@inheritDoc} */ @Override public CanonicalTreeParser createSubtreeIterator(final ObjectReader reader, final MutableObjectId idBuffer) @@ -227,51 +226,43 @@ public class CanonicalTreeParser extends AbstractTreeIterator { 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 class CanonicalTreeParser extends AbstractTreeIterator { parseEntry(); } - /** {@inheritDoc} */ @Override public void back(int delta) { if (delta == 1 && 0 <= prevPtr) { @@ -376,6 +366,7 @@ public class CanonicalTreeParser extends AbstractTreeIterator { * @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 0661c9044a..32368dcfb8 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 class EmptyTreeIterator extends AbstractTreeIterator { 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 60b92d7271..36fa72028e 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 @@ public class FileTreeIterator extends WorkingTreeIterator { init(entries()); } - /** {@inheritDoc} */ @Override public AbstractTreeIterator createSubtreeIterator(ObjectReader reader) throws IncorrectObjectTypeException, IOException { @@ -425,13 +424,11 @@ public class FileTreeIterator extends WorkingTreeIterator { 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 ece945232e..e0a8af1800 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 class TreeWalk implements AutoCloseable, AttributesProvider { *

    * 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 class TreeWalk implements AutoCloseable, AttributesProvider { *
    • 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 @@ public class TreeWalk implements AutoCloseable, AttributesProvider { * 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 class TreeWalk implements AutoCloseable, AttributesProvider { } /** - * 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 class TreeWalk implements AutoCloseable, AttributesProvider { * {{@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 class TreeWalk implements AutoCloseable, AttributesProvider { * 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 class TreeWalk implements AutoCloseable, AttributesProvider { * 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 b5d6610d52..aa544606af 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 abstract class WorkingTreeIterator extends AbstractTreeIterator { return state.walkIgnored; } - /** {@inheritDoc} */ @Override public boolean hasId() { if (contentIdFromPtr == ptr) @@ -278,7 +277,6 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { return (mode & FileMode.TYPE_MASK) == FileMode.TYPE_FILE; } - /** {@inheritDoc} */ @Override public byte[] idBuffer() { if (contentIdFromPtr == ptr) @@ -316,7 +314,6 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { return zeroid; } - /** {@inheritDoc} */ @Override public boolean isWorkTree() { return true; @@ -549,13 +546,11 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { return repository; } - /** {@inheritDoc} */ @Override public int idOffset() { return contentIdOffset; } - /** {@inheritDoc} */ @Override public void reset() { if (!first()) { @@ -565,19 +560,16 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { } } - /** {@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 abstract class WorkingTreeIterator extends AbstractTreeIterator { } } - /** {@inheritDoc} */ @Override public void back(int delta) throws CorruptObjectException { ptr -= delta; @@ -620,6 +611,7 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { * * @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 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { * @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 abstract class WorkingTreeIterator extends AbstractTreeIterator { * 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 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { * @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 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { * @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 abstract class WorkingTreeIterator extends AbstractTreeIterator { * {@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 abstract class WorkingTreeIterator extends AbstractTreeIterator { * {@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 cafa926ffc..c94160144e 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 @@ class ByteArraySet { 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 4731f345bc..699ff6b68b 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 class IndexDiffFilter extends TreeFilter { this.honorIgnores = honorIgnores; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk tw) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -234,7 +233,6 @@ public class IndexDiffFilter extends TreeFilter { 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 class IndexDiffFilter extends TreeFilter { 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 163dc71daa..0c0b09e7bf 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 final class InterIndexDiffFilter extends TreeFilter { 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 7d04f27f3c..25947da08f 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 class NotIgnoredFilter extends TreeFilter { this.index = workdirTreeIndex; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk tw) throws MissingObjectException, IncorrectObjectTypeException, IOException { @@ -41,20 +40,17 @@ public class NotIgnoredFilter extends TreeFilter { 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 4fb615321f..e9cd83c2e2 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 @@ public class NotTreeFilter extends TreeFilter { a = one; } - /** {@inheritDoc} */ @Override public TreeFilter negate() { return a; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, @@ -52,7 +50,6 @@ public class NotTreeFilter extends TreeFilter { return matchFilter(walker) == 0; } - /** {@inheritDoc} */ @Override public int matchFilter(TreeWalk walker) throws MissingObjectException, IncorrectObjectTypeException, @@ -69,20 +66,17 @@ public class NotTreeFilter extends TreeFilter { 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 c94215fcb1..63e587ab24 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 class PathFilter extends TreeFilter { 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 class PathFilter extends TreeFilter { 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 3816d5ed00..ec25903211 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 @@ public class PathSuffixFilter extends TreeFilter { 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 class PathSuffixFilter extends TreeFilter { 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 1ed2ef32cd..e311523033 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 class SkipWorkTreeFilter extends TreeFilter { this.treeIdx = treeIdx; } - /** {@inheritDoc} */ @Override public boolean include(TreeWalk walker) { DirCacheIterator i = walker.getTree(treeIdx, DirCacheIterator.class); @@ -47,19 +46,16 @@ public class SkipWorkTreeFilter extends TreeFilter { 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 6dbd508e48..28f2cd9461 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 abstract class TreeFilter { @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 527c5a69df..557e2cde3b 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 class BlockList extends AbstractList { tailBlock = directory[0]; } - /** {@inheritDoc} */ @Override public int size() { return size; } - /** {@inheritDoc} */ @Override public void clear() { for (T[] block : directory) { @@ -94,7 +92,6 @@ public class BlockList extends AbstractList { tailBlock = directory[0]; } - /** {@inheritDoc} */ @Override public T get(int index) { if (index < 0 || size <= index) @@ -102,7 +99,6 @@ public class BlockList extends AbstractList { 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 class BlockList extends AbstractList { } } - /** {@inheritDoc} */ @Override public boolean add(T element) { int i = tailBlkIdx; @@ -191,7 +186,6 @@ public class BlockList extends AbstractList { return true; } - /** {@inheritDoc} */ @Override public void add(int index, T element) { if (index == size) { @@ -213,7 +207,6 @@ public class BlockList extends AbstractList { } } - /** {@inheritDoc} */ @Override public T remove(int index) { if (index == size - 1) { @@ -253,7 +246,6 @@ public class BlockList extends AbstractList { 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 5815c62e89..d8183eb8be 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 abstract class CachedAuthenticator extends Authenticator { 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 da1684630b..ff136f7b3b 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 @@ package org.eclipse.jgit.util; /** * 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 aef9e64e02..f504c66eb3 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 @@ public abstract class FS { * Detect the file system * * @param cygwinUsed + * whether cygwin is used * @return FS instance */ public FS detect(Boolean cygwinUsed) { @@ -149,8 +150,11 @@ public abstract class FS { /** * @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 abstract class FS { * timestamp resolution * * @param fsTimestampResolution + * resolution of filesystem timestamps */ public FileStoreAttributes( @NonNull Duration fsTimestampResolution) { @@ -1074,6 +1079,7 @@ public abstract class FS { * 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 abstract class FS { * @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 abstract class FS { * @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 abstract class FS { * 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 abstract class FS { * @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 abstract class FS { * 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 @@ public abstract class FS { * 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 abstract class FS { * 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 abstract class FS { * @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 abstract class FS { * @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 abstract class FS { * @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 abstract class FS { * @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 abstract class FS { * @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 @@ public abstract class FS { * 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 abstract class FS { * 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 1c113617f8..6f31847996 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 class FS_POSIX extends FS { * @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 ae73d3feb8..5926655b7b 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 @@ public class FS_Win32 extends FS { 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 class FS_Win32 extends FS { return result.toArray(new Entry[0]); } - /** {@inheritDoc} */ @Override protected File discoverGitExe() { String path = SystemReader.getInstance().getenv("PATH"); //$NON-NLS-1$ @@ -171,7 +163,6 @@ public class FS_Win32 extends FS { return gitExe; } - /** {@inheritDoc} */ @Override protected File userHomeImpl() { String home = SystemReader.getInstance().getenv("HOME"); //$NON-NLS-1$ @@ -194,7 +185,6 @@ public class FS_Win32 extends FS { return super.userHomeImpl(); } - /** {@inheritDoc} */ @Override public ProcessBuilder runInShell(String cmd, String[] args) { List argv = new ArrayList<>(3 + args.length); @@ -207,7 +197,6 @@ public class FS_Win32 extends FS { 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 add5498175..635351ac84 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 @@ public class FS_Win32_Cygwin extends FS_Win32 { 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 class FS_Win32_Cygwin extends FS_Win32 { return super.resolve(dir, pn); } - /** {@inheritDoc} */ @Override protected File userHomeImpl() { final String home = AccessController.doPrivileged( @@ -110,7 +107,6 @@ public class FS_Win32_Cygwin extends FS_Win32 { 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 @@ public class FS_Win32_Cygwin extends FS_Win32 { 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 f013e7e095..9d052d13fa 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 class FileUtils { * @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 class FileUtils { * 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 class FileUtils { * 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 class FileUtils { * 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 class FileUtils { } /** + * 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 @@ public class FileUtils { } /** + * 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 @@ public class FileUtils { } /** + * 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 @@ public class FileUtils { * 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 @@ public class FileUtils { * 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 @@ public class FileUtils { * 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 @@ public class FileUtils { /** * @param file + * the file * @return {@code true} if the given file exists, not following symbolic * links */ @@ -838,9 +861,13 @@ public class FileUtils { } /** + * 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 @@ public class FileUtils { * @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 class FileUtils { * 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 class FileUtils { } /** + * 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 @@ public class FileUtils { } /** + * 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 class FileUtils { /** * @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 class FileUtils { * @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 e3ba606346..1942342c45 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 class HttpSupport { * 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 class HttpSupport { * that have all available protocols enabled already, up to the one * specified. *

    + *
    *

    path vs. humanish path
    PathHumanish part
    + * * * * @@ -354,16 +357,16 @@ public class HttpSupport { * * * - * - * * * * - * - * * *
    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 635dd6a1cc..6a5190c6a2 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 @@ public class IntList { entries = n; } - /** {@inheritDoc} */ @Override public String toString() { final StringBuilder r = new StringBuilder(); @@ -232,8 +231,8 @@ public class IntList { * 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 7456c71f5f..d0b7b9fd2b 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 class LfsFactory { * @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 class LfsFactory { * @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 class LfsFactory { * @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 b2bdfc1fd7..47f38f4627 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 @@ public class LongList { 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 3de7a1587c..be4bd9e356 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 final class RawCharSequence implements CharSequence { 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 57464f3c41..04fdcd0fa4 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 class RawSubStringPattern { 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 462bab081a..2a287cfe78 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 @@ public class RefList implements Iterable { this.cnt = src.cnt; } - /** {@inheritDoc} */ @Override public Iterator iterator() { return new Iterator<>() { @@ -286,7 +287,6 @@ public class RefList implements Iterable { return add(idx, ref); } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder r = new StringBuilder(); @@ -305,6 +305,8 @@ public class RefList implements Iterable { /** * 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 class RefList implements Iterable { * 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 class RefList implements Iterable { * Add all items from another builder. * * @param other + * another builder * @since 5.4 */ public void addAll(Builder other) { @@ -454,6 +458,7 @@ public class RefList implements Iterable { * 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 c68a76cef4..a4d1fd5b70 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 class RefMap extends AbstractMap { 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 class RefMap extends AbstractMap { return ref; } - /** {@inheritDoc} */ @Override public Ref put(String keyName, Ref value) { String name = toRefName(keyName); @@ -165,7 +162,6 @@ public class RefMap extends AbstractMap { return prior; } - /** {@inheritDoc} */ @Override public Ref remove(Object key) { String name = toRefName((String) key); @@ -189,13 +185,11 @@ public class RefMap extends AbstractMap { return res; } - /** {@inheritDoc} */ @Override public boolean isEmpty() { return entrySet().isEmpty(); } - /** {@inheritDoc} */ @Override public Set> entrySet() { if (entrySet == null) { @@ -238,7 +232,6 @@ public class RefMap extends AbstractMap { return entrySet; } - /** {@inheritDoc} */ @Override public String toString() { StringBuilder r = new StringBuilder(); @@ -259,6 +252,7 @@ public class RefMap extends AbstractMap { * 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 e29704158d..42a76b5b16 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 917add3609..274706042b 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 final class StringUtils { * * @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 final class StringUtils { * 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 final class StringUtils { * 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 cedb159827..ccc19691b1 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 class AutoCRLFInputStream extends InputStream { 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 class AutoCRLFInputStream extends InputStream { 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 305ccbd7e6..9fb316f28d 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 class AutoCRLFOutputStream extends OutputStream { 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 class AutoCRLFOutputStream extends OutputStream { write(b, b.length - overflow, overflow); } - /** {@inheritDoc} */ @Override public void write(byte[] b, int startOff, int startLen) throws IOException { @@ -151,7 +148,6 @@ public class AutoCRLFOutputStream extends OutputStream { write(binbuf, 0, cachedLen); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { if (binbufcnt <= binbuf.length) { @@ -161,7 +157,6 @@ public class AutoCRLFOutputStream extends OutputStream { 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 7db882c074..2385865674 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 class AutoLFInputStream extends InputStream { 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 class AutoLFInputStream extends InputStream { 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 a0e9fb68c5..e56991d43a 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 class AutoLFOutputStream extends OutputStream { 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 class AutoLFOutputStream extends OutputStream { } } - /** {@inheritDoc} */ @Override public void write(byte[] b, int startOff, int startLen) throws IOException { @@ -164,7 +161,6 @@ public class AutoLFOutputStream extends OutputStream { write(binbuf, 0, cachedLen); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { if (binbufcnt <= binbuf.length) { @@ -173,7 +169,6 @@ public class AutoLFOutputStream extends OutputStream { 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 782f3f4ca6..d0049d29de 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 class CountingOutputStream extends OutputStream { 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 f1bfbe29a5..03c25bb702 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 @@ public final class DisabledOutputStream extends OutputStream { // 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 2bbdbefd38..1faf6ea9aa 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 class IsolatedOutputStream extends OutputStream { 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 class IsolatedOutputStream extends OutputStream { }); } - /** {@inheritDoc} */ @Override public void flush() throws IOException { checkClosed(); @@ -85,7 +82,6 @@ public class IsolatedOutputStream extends OutputStream { }); } - /** {@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 88006242d9..681a52988e 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 @@ public abstract class LimitedInputStream extends FilterInputStream { 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 abstract class LimitedInputStream extends FilterInputStream { return result; } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { if (left == 0) { @@ -96,7 +92,6 @@ public abstract class LimitedInputStream extends FilterInputStream { return result; } - /** {@inheritDoc} */ @Override public synchronized void reset() throws IOException { if (!in.markSupported()) @@ -109,7 +104,6 @@ public abstract class LimitedInputStream extends FilterInputStream { 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 2637766153..8d5b8fdcba 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 class MessageWriter extends Writer { 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 class MessageWriter extends Writer { 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 c0724e43f2..ed412fa6f5 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 class StreamCopyThread extends Thread { } } - /** {@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 56d0169f7d..96376bfc6a 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 class TeeInputStream extends InputStream { this.dst = dst; } - /** {@inheritDoc} */ @Override public int read() throws IOException { byte[] b = skipBuffer(); @@ -54,7 +53,6 @@ public class TeeInputStream extends InputStream { return n == 1 ? b[0] & 0xff : -1; } - /** {@inheritDoc} */ @Override public long skip(long count) throws IOException { long skipped = 0; @@ -71,7 +69,6 @@ public class TeeInputStream extends InputStream { return skipped; } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { if (len == 0) @@ -83,7 +80,6 @@ public class TeeInputStream extends InputStream { 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 e6fdd709b2..ab084a66f2 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 class TeeOutputStream extends OutputStream { 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 3bc92d5bcd..4764676c88 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 class ThrowingPrintWriter extends Writer { ); } - /** {@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 class ThrowingPrintWriter extends Writer { /** * 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 class ThrowingPrintWriter extends Writer { * 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 class ThrowingPrintWriter extends Writer { /** * 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 class ThrowingPrintWriter extends Writer { * @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 class ThrowingPrintWriter extends Writer { /** * 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 class ThrowingPrintWriter extends Writer { /** * 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 class ThrowingPrintWriter extends Writer { * @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 class ThrowingPrintWriter extends Writer { * @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 1947b3bf04..4d9f83d233 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 class TimeoutInputStream extends FilterInputStream { timeout = millis; } - /** {@inheritDoc} */ @Override public int read() throws IOException { try { @@ -76,13 +75,11 @@ public class TimeoutInputStream extends FilterInputStream { } } - /** {@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 class TimeoutInputStream extends FilterInputStream { } } - /** {@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 3fbf6ffdcb..afd798a1a2 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 class TimeoutOutputStream extends OutputStream { timeout = millis; } - /** {@inheritDoc} */ @Override public void write(int b) throws IOException { try { @@ -78,13 +77,11 @@ public class TimeoutOutputStream extends OutputStream { } } - /** {@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 class TimeoutOutputStream extends OutputStream { } } - /** {@inheritDoc} */ @Override public void flush() throws IOException { try { @@ -110,7 +106,6 @@ public class TimeoutOutputStream extends OutputStream { } } - /** {@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 459888190f..b37f28b161 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 class UnionInputStream extends InputStream { return streams.isEmpty(); } - /** {@inheritDoc} */ @Override public int read() throws IOException { for (;;) { @@ -106,7 +105,6 @@ public class UnionInputStream extends InputStream { } } - /** {@inheritDoc} */ @Override public int read(byte[] b, int off, int len) throws IOException { if (len == 0) @@ -123,13 +121,11 @@ public class UnionInputStream extends InputStream { } } - /** {@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 class UnionInputStream extends InputStream { 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 56e90d0636..0a56c83040 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 class SHA1 { *

    * 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 66857b5bf8..4e079f08b5 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 @@ public class MonotonicSystemClock implements MonotonicClock { } } - /** {@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 8c20423bc6..a5ee1070d0 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 abstract class ProposedTimestamp implements AutoCloseable { // Do nothing by default. } - /** {@inheritDoc} */ @Override public String toString() { return instant().toString(); diff --git a/pom.xml b/pom.xml index 5576640d3d..d04ecf5727 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 -- 2.39.5