diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2023-09-16 22:14:49 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2023-09-25 22:06:13 +0200 |
commit | 84ced89dc3d3163535cb170f4a6da49b60a51c3f (patch) | |
tree | 036d51e581ce2be3b7d3390fe620c149be171af4 | |
parent | d56ae55c836968e09d1ad887d4180ff6bccc5be7 (diff) | |
download | jgit-84ced89dc3d3163535cb170f4a6da49b60a51c3f.tar.gz jgit-84ced89dc3d3163535cb170f4a6da49b60a51c3f.zip |
[errorprone] Add missing javadoc summary
see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment
Change-Id: Iaf4a6b55d4e4c59b7a2da3451164abb1bb47d4a1
112 files changed, 1180 insertions, 190 deletions
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 c87bbe6145..09bb78eefe 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 @@ -35,6 +35,8 @@ import org.eclipse.jgit.transport.ServiceMayNotContinueException; */ public interface ReceivePackErrorHandler { /** + * Receive pack + * * @param req * The HTTP request * @param rsp 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 aaf537f283..cff1fa9a32 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 @@ -60,6 +60,8 @@ public interface UploadPackErrorHandler { } /** + * Upload pack + * * @param req * The HTTP request * @param rsp 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 cd490230d9..e77de2b187 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 @@ -66,6 +66,10 @@ abstract class ServletBinderImpl implements ServletBinder { return filters.toArray(new Filter[0]); } - /** @return the pipeline that matches and executes this chain. */ + /** + * Create UrlPipeline + * + * @return the pipeline that matches and executes this chain. + */ abstract UrlPipeline create(); } 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 4b45535477..671abaec95 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 @@ -1035,6 +1035,8 @@ public class TestRepository<R extends Repository> implements AutoCloseable { } /** + * Create commit builder + * * @return construct a new commit builder that updates this branch. If * the branch already exists, the commit builder will have its * first parent as the current commit and its tree will be 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 6747b014dc..84bab5b9fc 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 @@ -140,6 +140,8 @@ public abstract class LfsProtocolServlet extends HttpServlet { } /** + * Whether operation is upload + * * @return true if the operation is upload. * @since 4.7 */ @@ -148,6 +150,8 @@ public abstract class LfsProtocolServlet extends HttpServlet { } /** + * Whether the operation is download + * * @return true if the operation is download. * @since 4.7 */ @@ -156,6 +160,8 @@ public abstract class LfsProtocolServlet extends HttpServlet { } /** + * Whether the operation is verify + * * @return true if the operation is verify. * @since 4.7 */ diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java index 3942e22a8e..9b44aebe2a 100644 --- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java +++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/s3/S3Config.java @@ -157,6 +157,8 @@ public class S3Config { } /** + * Whether SSL verification is disabled + * * @return {@code true} if Amazon server certificate and hostname * verification is disabled */ diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Protocol.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Protocol.java index f3edf86cf0..bcfd6e6576 100644 --- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Protocol.java +++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Protocol.java @@ -131,6 +131,8 @@ public interface Protocol { String OBJECTS_LFS_ENDPOINT = "/objects/batch"; //$NON-NLS-1$ /** + * Gson instance for handling this protocol + * * @return a {@link Gson} instance suitable for handling this * {@link Protocol} * 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 08fec341a8..d7d8d63775 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 @@ -253,6 +253,8 @@ public class LfsConnectionFactory { } /** + * Create request that can be serialized to JSON + * * @param operation * the operation to perform, e.g. Protocol.OPERATION_DOWNLOAD * @param resources 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 daea1fbe83..e46d703592 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 @@ -50,7 +50,7 @@ class ShowCommands extends TextBuiltin { } enum Format { - /** */ + /** Get usage */ USAGE { @Override void print(ThrowingPrintWriter err, CommandRef c) throws IOException { @@ -60,7 +60,7 @@ class ShowCommands extends TextBuiltin { } }, - /** */ + /** Get implementation class name */ CLASSES { @Override void print(ThrowingPrintWriter err, CommandRef c) throws IOException { @@ -68,7 +68,7 @@ class ShowCommands extends TextBuiltin { } }, - /** */ + /** Get URL of implementation class */ URLS { @Override void print(ThrowingPrintWriter err, CommandRef c) throws IOException { 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 087e546f22..7da2e987a3 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 @@ -175,6 +175,8 @@ public class OpenSshConfig implements ConfigRepository { } /** + * Get the value StrictHostKeyChecking property + * * @return the value StrictHostKeyChecking property, the valid values * are "yes" (unknown hosts are not accepted), "no" (unknown * hosts are always accepted), and "ask" (user should be asked @@ -185,6 +187,8 @@ public class OpenSshConfig implements ConfigRepository { } /** + * Get hostname + * * @return the real IP address or host name to connect to; never null. */ public String getHostName() { @@ -192,6 +196,8 @@ public class OpenSshConfig implements ConfigRepository { } /** + * Get port + * * @return the real port number to connect to; never 0. */ public int getPort() { @@ -199,6 +205,8 @@ public class OpenSshConfig implements ConfigRepository { } /** + * Get identity file + * * @return path of the private key file to use for authentication; null * if the caller should use default authentication strategies. */ @@ -207,6 +215,8 @@ public class OpenSshConfig implements ConfigRepository { } /** + * Get user + * * @return the real user name to connect as; never null. */ public String getUser() { @@ -214,6 +224,8 @@ public class OpenSshConfig implements ConfigRepository { } /** + * Get preferred authentication methods + * * @return the preferred authentication methods, separated by commas if * more than one authentication method is preferred. */ @@ -222,6 +234,8 @@ public class OpenSshConfig implements ConfigRepository { } /** + * Whether batch mode is preferred + * * @return true if batch (non-interactive) mode is preferred for this * host connection. */ @@ -230,6 +244,8 @@ public class OpenSshConfig implements ConfigRepository { } /** + * Get connection attempts + * * @return the number of tries (one per second) to connect before * exiting. The argument must be an integer. This may be useful * in scripts if the connection sometimes fails. The default is 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 4efc6a7a46..81b3611774 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/ArchiveCommand.java @@ -177,6 +177,8 @@ public class ArchiveCommand extends GitCommand<OutputStream> { } /** + * Get the problematic format name + * * @return the problematic format name */ public String getFormat() { 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 2bc14ff72c..a03ea01864 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java @@ -325,6 +325,8 @@ public class CheckoutCommand extends GitCommand<Ref> { } /** + * Set progress monitor + * * @param monitor * a progress monitor * @return this instance diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java index 55d86b7402..995f890389 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CherryPickResult.java @@ -25,21 +25,21 @@ public class CherryPickResult { * The cherry-pick status */ public enum CherryPickStatus { - /** */ + /** Cherry-pick succeeded */ OK { @Override public String toString() { return "Ok"; //$NON-NLS-1$ } }, - /** */ + /** Cherry-pick failed */ FAILED { @Override public String toString() { return "Failed"; //$NON-NLS-1$ } }, - /** */ + /** Cherry-pick found conflicts to be resolved */ CONFLICTING { @Override public String toString() { 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 ecc3b40fb7..0fa11f2cbb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeResult.java @@ -31,7 +31,9 @@ public class MergeResult { * The status the merge resulted in. */ public enum MergeStatus { - /** */ + /** + * Merge is a fast-forward + */ FAST_FORWARD { @Override public String toString() { @@ -44,6 +46,8 @@ public class MergeResult { } }, /** + * Merge is a fast-forward, squashed + * * @since 2.0 */ FAST_FORWARD_SQUASHED { @@ -57,7 +61,9 @@ public class MergeResult { return true; } }, - /** */ + /** + * Already up to date, merge was a no-op + */ ALREADY_UP_TO_DATE { @Override public String toString() { @@ -69,7 +75,9 @@ public class MergeResult { return true; } }, - /** */ + /** + * Merge failed + */ FAILED { @Override public String toString() { @@ -81,7 +89,9 @@ public class MergeResult { return false; } }, - /** */ + /** + * Merged + */ MERGED { @Override public String toString() { @@ -94,6 +104,8 @@ public class MergeResult { } }, /** + * Merged, squashed, not updating HEAD + * * @since 2.0 */ MERGED_SQUASHED { @@ -108,6 +120,8 @@ public class MergeResult { } }, /** + * Merged, squashed, not committed + * * @since 3.0 */ MERGED_SQUASHED_NOT_COMMITTED { @@ -121,7 +135,9 @@ public class MergeResult { return true; } }, - /** */ + /** + * Merge raised conflicts to be resolved + */ CONFLICTING { @Override public String toString() { @@ -134,6 +150,8 @@ public class MergeResult { } }, /** + * Merge was aborted + * * @since 2.2 */ ABORTED { @@ -148,6 +166,8 @@ public class MergeResult { } }, /** + * Merged, not committed + * * @since 3.0 **/ MERGED_NOT_COMMITTED { @@ -161,7 +181,7 @@ public class MergeResult { return true; } }, - /** */ + /** Not yet supported */ NOT_SUPPORTED { @Override public String toString() { @@ -191,6 +211,8 @@ public class MergeResult { }; /** + * Whether the merge was successful + * * @return whether the status indicates a successful result */ public abstract boolean isSuccessful(); 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 83c0dc2ef2..2aa64df46f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseResult.java @@ -146,6 +146,8 @@ public class RebaseResult { }; /** + * Whether the rebase was successful + * * @return whether the status indicates a successful result */ public abstract boolean isSuccessful(); 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 717d8989ec..f8c5399983 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffEntry.java @@ -379,6 +379,8 @@ public class DiffEntry { } /** + * Get diff attribute + * * @return the {@link Attribute} determining filters to be applied. * @since 4.11 */ 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 7835582437..76dc87e72b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java @@ -106,6 +106,8 @@ public class RawText extends Sequence { } /** + * Get the raw content + * * @return the raw, unprocessed content read. * @since 4.11 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java index e3c5a881d5..c5e1e4e765 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java @@ -865,6 +865,8 @@ public class DirCacheEntry { } /** + * Whether the entry contains extended flags + * * @return true if the entry contains extended flags. */ boolean isExtended() { 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 64d285aca1..72d004bc47 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/events/IndexChangedEvent.java @@ -29,6 +29,8 @@ public class IndexChangedEvent extends RepositoryEvent<IndexChangedListener> { } /** + * Whether the index was changed by the same JGit process + * * @return {@code true} if the index was changed by the same JGit process * @since 5.0 */ 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 1ca3ce4501..95c1c8b22e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java @@ -201,6 +201,8 @@ public class RepoCommand extends GitCommand<RevCommit> { } /** + * Get file mode + * * @return Git file mode for this file (e.g. executable or regular) */ @NonNull 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 ec4049a63e..56e5fa46d3 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 @@ -48,6 +48,8 @@ public class FilteredRenameDetector { } /** + * Compute diff entries + * * @param diffs * The set of changes to check. * @param pathFilter 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 3a729fb95f..25b7b8e5ba 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 @@ -54,6 +54,8 @@ public class CommandExecutor { } /** + * Run command + * * @param command * the command string * @param workingDir @@ -104,6 +106,8 @@ public class CommandExecutor { } /** + * Check whether executable file is available + * * @param path * the executable path * @param workingDir diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandLineDiffTool.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandLineDiffTool.java index 00dec32718..1e09796d23 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandLineDiffTool.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandLineDiffTool.java @@ -205,6 +205,8 @@ public enum CommandLineDiffTool { private final String parameters; /** + * Get path + * * @return path */ public String getPath() { @@ -212,6 +214,8 @@ public enum CommandLineDiffTool { } /** + * Get parameters + * * @return parameters as one string */ public String getParameters() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandLineMergeTool.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandLineMergeTool.java index 668f46dd72..d8287f45d1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandLineMergeTool.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/CommandLineMergeTool.java @@ -287,6 +287,8 @@ public enum CommandLineMergeTool { private final boolean exitCodeTrustable; /** + * Get path + * * @return path */ public String getPath() { @@ -294,6 +296,8 @@ public enum CommandLineMergeTool { } /** + * Get parameters + * * @param withBase * return parameters with base present? * @return parameters with or without base present @@ -306,6 +310,8 @@ public enum CommandLineMergeTool { } /** + * Whether exit code can be trusted + * * @return parameters */ public boolean isExitCodeTrustable() { @@ -313,6 +319,8 @@ public enum CommandLineMergeTool { } /** + * Whether command with with base present is valid + * * @return true if command with base present is valid, false otherwise */ public boolean canMergeWithoutBasePresent() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffToolConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffToolConfig.java index c8b04f90f2..e74337a8a1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffToolConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/DiffToolConfig.java @@ -75,6 +75,8 @@ public class DiffToolConfig { } /** + * Get default tool name + * * @return the default diff tool name (diff.tool) */ public String getDefaultToolName() { @@ -82,6 +84,8 @@ public class DiffToolConfig { } /** + * Get default GUI tool name + * * @return the default GUI diff tool name (diff.guitool) */ public String getDefaultGuiToolName() { @@ -89,6 +93,8 @@ public class DiffToolConfig { } /** + * Get difftool.prompt option + * * @return the diff tool "prompt" option (difftool.prompt) */ public boolean isPrompt() { @@ -96,6 +102,8 @@ public class DiffToolConfig { } /** + * Get difftool.trustExitCode option + * * @return the diff tool "trust exit code" option (difftool.trustExitCode) */ public boolean isTrustExitCode() { @@ -103,6 +111,8 @@ public class DiffToolConfig { } /** + * Get tools map + * * @return the tools map */ public Map<String, ExternalDiffTool> getTools() { @@ -110,6 +120,8 @@ public class DiffToolConfig { } /** + * Get tool names + * * @return the tool names */ public Set<String> getToolNames() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalDiffTool.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalDiffTool.java index e01b892a53..e02697b772 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalDiffTool.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalDiffTool.java @@ -16,21 +16,29 @@ package org.eclipse.jgit.internal.diffmergetool; public interface ExternalDiffTool { /** + * Get tool name + * * @return the tool name */ String getName(); /** + * Get tool path + * * @return the tool path */ String getPath(); /** + * Get tool command + * * @return the tool command */ String getCommand(); /** + * Whether tool is available + * * @return availability of the tool: true if tool can be executed and false * if not */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalMergeTool.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalMergeTool.java index 0c3ddf9afe..022cd27f44 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalMergeTool.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ExternalMergeTool.java @@ -18,11 +18,15 @@ import org.eclipse.jgit.lib.internal.BooleanTriState; public interface ExternalMergeTool extends ExternalDiffTool { /** + * Get the tool "trust exit code" option + * * @return the tool "trust exit code" option */ BooleanTriState getTrustExitCode(); /** + * Get tool command + * * @param withBase * get command with base present (true) or without base present * (false) 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 367107d0e8..e5947102eb 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 @@ -117,6 +117,8 @@ public class ExternalToolUtils { } /** + * Quote path + * * @param path * the path to be quoted * @return quoted path if it contains spaces @@ -138,6 +140,8 @@ public class ExternalToolUtils { } /** + * Whether tool is available + * * @param fs * the file system abstraction * @param gitDir @@ -162,6 +166,8 @@ public class ExternalToolUtils { } /** + * Create sorted tool set + * * @param defaultName * the default tool name * @param userDefinedNames 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 0061e3f878..37eb2d9f7d 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 @@ -28,7 +28,6 @@ public class FileElement { /** * The file element type. - * */ public enum Type { /** @@ -91,6 +90,8 @@ public class FileElement { } /** + * Create file element + * * @param path * the file path * @param type @@ -111,6 +112,8 @@ public class FileElement { } /** + * Get path + * * @return the file path */ public String getPath() { @@ -118,6 +121,8 @@ public class FileElement { } /** + * Get type + * * @return the element type */ public Type getType() { @@ -125,6 +130,8 @@ public class FileElement { } /** + * Get file + * <p> * Return * <ul> * <li>a temporary file if already created and stream is not valid</li> diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeToolConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeToolConfig.java index 9625d5f101..40cb820602 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeToolConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/MergeToolConfig.java @@ -89,6 +89,8 @@ public class MergeToolConfig { } /** + * Get default tool name + * * @return the default merge tool name (merge.tool) */ public String getDefaultToolName() { @@ -96,6 +98,8 @@ public class MergeToolConfig { } /** + * Get default GUI tool name + * * @return the default GUI merge tool name (merge.guitool) */ public String getDefaultGuiToolName() { @@ -103,6 +107,8 @@ public class MergeToolConfig { } /** + * Get mergetool.prompt option + * * @return the merge tool "prompt" option (mergetool.prompt) */ public boolean isPrompt() { @@ -110,6 +116,8 @@ public class MergeToolConfig { } /** + * Get tool "keep backup" option + * * @return the tool "keep backup" option */ public boolean isKeepBackup() { @@ -117,6 +125,8 @@ public class MergeToolConfig { } /** + * Get tool "keep temporaries" option + * * @return the tool "keepTemporaries" option */ public boolean isKeepTemporaries() { @@ -124,6 +134,8 @@ public class MergeToolConfig { } /** + * Get the tool "write to temp" option + * * @return the tool "write to temp" option */ public boolean isWriteToTemp() { @@ -131,6 +143,8 @@ public class MergeToolConfig { } /** + * Get the tools map + * * @return the tools map */ public Map<String, ExternalMergeTool> getTools() { @@ -138,6 +152,8 @@ public class MergeToolConfig { } /** + * Get tool names + * * @return the tool names */ public Set<String> getToolNames() { 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 f6ab15f9fb..213ce6871e 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 @@ -272,6 +272,8 @@ public class MergeTools { } /** + * Get predefined tool names + * * @return the predefined tool names */ public Set<String> getPredefinedToolNames() { @@ -331,6 +333,8 @@ public class MergeTools { } /** + * Get user defined tools + * * @return the user defined tools */ public Map<String, ExternalMergeTool> getUserDefinedTools() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ToolException.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ToolException.java index 73d3588906..cd11325433 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ToolException.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/ToolException.java @@ -34,13 +34,15 @@ public class ToolException extends Exception { private static final long serialVersionUID = 1L; /** - * + * Create tool exception */ public ToolException() { this(null, null, false); } /** + * Create tool exception + * * @param message * the exception message */ @@ -49,6 +51,8 @@ public class ToolException extends Exception { } /** + * Create tool exception + * * @param message * the exception message * @param result @@ -64,6 +68,8 @@ public class ToolException extends Exception { } /** + * Create tool exception + * * @param message * the exception message * @param cause @@ -76,6 +82,8 @@ public class ToolException extends Exception { } /** + * Create tool exception + * * @param cause * the cause for throw */ @@ -86,6 +94,8 @@ public class ToolException extends Exception { } /** + * Whether result is valid + * * @return true if result is valid, false else */ public boolean isResult() { @@ -93,6 +103,8 @@ public class ToolException extends Exception { } /** + * Get execution result + * * @return the execution result */ public ExecutionResult getResult() { @@ -100,6 +112,8 @@ public class ToolException extends Exception { } /** + * Whether execution failed with an error + * * @return true if command execution error appears, false otherwise */ public boolean isCommandExecutionError() { @@ -107,6 +121,8 @@ public class ToolException extends Exception { } /** + * Get buffered stderr as a String + * * @return the result Stderr */ public String getResultStderr() { @@ -123,6 +139,8 @@ public class ToolException extends Exception { } /** + * Get buffered stdout as a String + * * @return the result Stdout */ public String getResultStdout() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/UserDefinedDiffTool.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/UserDefinedDiffTool.java index eb72d01cdb..62bde28feb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/UserDefinedDiffTool.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/diffmergetool/UserDefinedDiffTool.java @@ -110,6 +110,8 @@ public class UserDefinedDiffTool implements ExternalDiffTool { } /** + * Set whether tool is available + * * @param available * true if tool can be found and false if not */ 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 17d5b0b673..b1a5a22ef5 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 @@ -49,6 +49,8 @@ public class UserDefinedMergeTool extends UserDefinedDiffTool } /** + * Set "trust exit code" flag + * * @param trustExitCode * the new "trust exit code" flag */ @@ -57,6 +59,8 @@ public class UserDefinedMergeTool extends UserDefinedDiffTool } /** + * Get command + * * @param withBase * not used, because user-defined merge tool can only define one * cmd -> it must handle with and without base present (empty) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java index 8c1f773e19..e173ab5edc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckError.java @@ -46,17 +46,29 @@ public class FsckError { this.errorType = errorType; } - /** @return identifier of the object. */ + /** + * Get Id + * + * @return identifier of the object. + */ public ObjectId getId() { return id; } - /** @return type of the object. */ + /** + * Get type + * + * @return type of the object. + */ public int getType() { return type; } - /** @return error type of the corruption. */ + /** + * Get error type + * + * @return error type of the corruption. + */ @Nullable public ObjectChecker.ErrorType getErrorType() { return errorType; @@ -81,12 +93,20 @@ public class FsckError { this.errorType = errorType; } - /** @return the file name of the index file. */ + /** + * Get file name + * + * @return the file name of the index file. + */ public String getFileName() { return fileName; } - /** @return the error type of the corruption. */ + /** + * Get error type + * + * @return the error type of the corruption. + */ public ErrorType getErrorType() { return errorType; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphBuilder.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphBuilder.java index 8f02770745..5e993eab22 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphBuilder.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/commitgraph/CommitGraphBuilder.java @@ -41,7 +41,11 @@ class CommitGraphBuilder { private byte[] bloomFilterData; - /** @return A builder of {@link CommitGraph}. */ + /** + * Create builder + * + * @return A builder of {@link CommitGraph}. + */ static CommitGraphBuilder builder() { return new CommitGraphBuilder(OBJECT_ID_LENGTH); } 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 99b9d556ad..f7c460c1a8 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 @@ -845,6 +845,8 @@ public final class DfsBlockCache { @FunctionalInterface interface ReadableChannelSupplier { /** + * Get ReadableChannel + * * @return ReadableChannel * @throws IOException * if an IO error occurred diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java index 69a37058bf..77273cec61 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java @@ -338,6 +338,8 @@ public class DfsBlockCacheConfig { } /** + * Whether evicted events should be reported + * * @return true if reporting evicted events is enabled. */ default boolean shouldReportEvictedEvent() { 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 d6d3fbfd30..af8cd46d01 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 @@ -28,6 +28,8 @@ public class DfsCachedPack extends CachedPack { } /** + * Get pack file + * * @return the pack passed to the constructor */ public DfsPackFile getPackFile() { 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 7d0391d846..2375698303 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 @@ -675,7 +675,11 @@ public abstract class DfsObjDatabase extends ObjectDatabase { this.reftables = reftables; } - /** @return last modified time of all packs, in milliseconds. */ + /** + * Get last modified time of all packs + * + * @return last modified time of all packs, in milliseconds. + */ public long getLastModified() { if (lastModified < 0) { long max = 0; 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 b52456225c..4547bcab5d 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 @@ -34,7 +34,6 @@ import org.eclipse.jgit.util.RefMap; /** * Abstract DfsRefDatabase class. - * */ public abstract class DfsRefDatabase extends RefDatabase { private final DfsRepository repository; @@ -359,7 +358,11 @@ public abstract class DfsRefDatabase extends RefDatabase { this(ids, old.sym); } - /** @return number of references in this cache. */ + /** + * Get number of references + * + * @return number of references in this cache. + */ public int size() { return ids.size(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java index 734a5fca3d..fe8dc17b3d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/InMemoryRepository.java @@ -122,6 +122,8 @@ public class InMemoryRepository extends DfsRepository { } /** + * Set readable channel block size + * * @param blockSize * force a different block size for testing. */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java index 53e36956c8..906faded81 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/BasePackBitmapIndex.java @@ -92,7 +92,11 @@ abstract class BasePackBitmapIndex extends PackBitmapIndex { } } - /** @return the flags associated with the bitmap */ + /** + * Get flags + * + * @return the flags associated with the bitmap + */ int getFlags() { return flags; } 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 3abd71aee6..ed2516ddd0 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 @@ -92,6 +92,8 @@ public class FileReftableDatabase extends RefDatabase { } /** + * Whether the given repo uses reftable for refdb storage + * * @param repoDir * the repository's metadata directory * @return whether the given repo uses reftable for refdb storage. @@ -598,6 +600,8 @@ public class FileReftableDatabase extends RefDatabase { } /** + * Convert FileRepository to a FileReftableDatabase + * * @param repo * the repository * @param writeLogs 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 d48a2d7265..0f5ff0f9f7 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 @@ -246,6 +246,8 @@ public class FileReftableStack implements AutoCloseable { } /** + * Get merged reftable + * * @return the merged reftable */ public MergedReftable getMergedReftable() { 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 9a85752062..c88ac984ec 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 @@ -299,6 +299,8 @@ public class FileSnapshot { } /** + * Get file size in bytes of last snapshot update + * * @return file size in bytes of last snapshot update */ public long size() { @@ -425,38 +427,47 @@ public class FileSnapshot { } /** - * @return {@code true} if FileSnapshot.isModified(File) found the file size - * changed + * Whether #isModified(File) found the file size changed + * + * @return {@code true} if #isModified(File) found the file size changed */ boolean wasSizeChanged() { return sizeChanged; } /** - * @return {@code true} if FileSnapshot.isModified(File) found the file key - * changed + * Whether #isModified(File) found the file key changed + * + * @return {@code true} if #isModified(File) found the file key changed */ boolean wasFileKeyChanged() { return fileKeyChanged; } /** - * @return {@code true} if FileSnapshot.isModified(File) found the file's - * lastModified changed + * Whether #isModified(File) found the file's lastModified changed + * + * @return {@code true} if #isModified(File) found the file's lastModified + * changed */ boolean wasLastModifiedChanged() { return lastModifiedChanged; } /** - * @return {@code true} if FileSnapshot.isModified(File) detected that - * lastModified is racily clean + * Whether #isModified(File) detected that lastModified is racily clean + * + * @return {@code true} if #isModified(File) detected that lastModified is + * racily clean */ boolean wasLastModifiedRacilyClean() { return wasRacyClean; } /** + * Get the delta in nanoseconds between lastModified and lastRead during + * last racy check + * * @return the delta in nanoseconds between lastModified and lastRead during * last racy check */ @@ -465,6 +476,8 @@ public class FileSnapshot { } /** + * Get the racyLimitNanos threshold in nanoseconds during last racy check + * * @return the racyLimitNanos threshold in nanoseconds during last racy * check */ 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 6933bfb3d4..32d85f3326 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 @@ -1729,6 +1729,8 @@ public class GC { } /** + * Whether number of packs exceeds gc.autopacklimit + * * @return {@code true} if number of packs > gc.autopacklimit (default * 50) */ 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 0c3e724ed8..2334bd4851 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 @@ -14,6 +14,7 @@ import java.io.File; import java.io.IOException; import java.io.InputStream; import java.text.MessageFormat; +import java.util.function.Supplier; import org.eclipse.jgit.errors.CorruptObjectException; import org.eclipse.jgit.internal.JGitText; @@ -203,6 +204,10 @@ public abstract class PackBitmapIndex { @FunctionalInterface public interface SupplierWithIOException<T> { /** + * Get result. + * + * @see Supplier#get() + * * @return result * @throws IOException * if an IO error occurred 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 1d1ad983a8..a47f2dfcc8 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 @@ -342,22 +342,38 @@ public class PackBitmapIndexBuilder extends BasePackBitmapIndex { this.flags = flags; } - /** @return the bitmap */ + /** + * Get the bitmap + * + * @return the bitmap + */ public EWAHCompressedBitmap getBitmap() { return bitmap; } - /** @return the xorOffset */ + /** + * Get the xorOffset + * + * @return the xorOffset + */ public int getXorOffset() { return xorOffset; } - /** @return the flags */ + /** + * Get the flags + * + * @return the flags + */ public int getFlags() { return flags; } - /** @return the ObjectId */ + /** + * Get the ObjectId + * + * @return the ObjectId + */ public long getObjectId() { return objectId; } 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 c97d9f07ef..91c3683501 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 @@ -167,7 +167,11 @@ public class PackBitmapIndexRemapper extends PackBitmapIndex this.flags = flags; } - /** @return the flags associated with the bitmap. */ + /** + * Get flags + * + * @return the flags associated with the bitmap. + */ public int getFlags() { return flags; } 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 7778cb5133..99987cd635 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 @@ -290,6 +290,8 @@ public abstract class PackIndex int matchLimit) throws IOException; /** + * Get pack checksum + * * @return the checksum of the pack; caller must not modify it * @since 5.5 */ @@ -316,19 +318,31 @@ public abstract class PackIndex return offset; } - /** @return hex string describing the object id of this entry. */ + /** + * Get hex string representation of the entry's object id + * + * @return hex string describing the object id of this entry. + */ public String name() { ensureId(); return idBuffer.name(); } - /** @return a copy of the object id. */ + /** + * Create a copy of the object id + * + * @return a copy of the object id. + */ public ObjectId toObjectId() { ensureId(); return idBuffer.toObjectId(); } - /** @return a complete copy of this entry, that won't modify */ + /** + * Clone the entry + * + * @return a complete copy of this entry, that won't modify + */ public MutableEntry cloneEntry() { final MutableEntry r = new MutableEntry(); ensureId(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java index 1045de4b17..30f8240aa9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/WindowCache.java @@ -373,6 +373,8 @@ public class WindowCache { } /** + * Get singleton instance + * * @return the cached instance. */ public static WindowCache getInstance() { @@ -491,6 +493,8 @@ public class WindowCache { } /** + * Get cache statistics + * * @return cache statistics for the WindowCache */ public WindowCacheStats getStats() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/CachedPackUriProvider.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/CachedPackUriProvider.java index 0b419da467..32cd635edf 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/CachedPackUriProvider.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/CachedPackUriProvider.java @@ -21,14 +21,18 @@ import org.eclipse.jgit.annotations.Nullable; public interface CachedPackUriProvider { /** - * @param pack the cached pack for which to check if a corresponding URI - * exists - * @param protocolsSupported the protocols that the client has declared - * support for; if a URI is returned, it must be of one of these - * protocols - * @throws IOException implementations may throw this - * @return if a URI corresponds to the cached pack, an object - * containing the URI and some other information; null otherwise + * Get pack info + * + * @param pack + * the cached pack for which to check if a corresponding URI + * exists + * @param protocolsSupported + * the protocols that the client has declared support for; if a + * URI is returned, it must be of one of these protocols + * @throws IOException + * implementations may throw this + * @return if a URI corresponds to the cached pack, an object containing the + * URI and some other information; null otherwise * @since 5.5 */ @Nullable @@ -62,6 +66,8 @@ public interface CachedPackUriProvider { } /** + * Get the hash of the packfile + * * @return the hash of the packfile as a hexadecimal string */ public String getHash() { @@ -69,6 +75,8 @@ public interface CachedPackUriProvider { } /** + * Get the URI corresponding to the packfile + * * @return the URI corresponding to the packfile */ public String getUri() { @@ -76,6 +84,8 @@ public interface CachedPackUriProvider { } /** + * Get the size of the packfile in bytes + * * @return the size of the packfile in bytes (-1 if unknown) */ public long getSize() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindowEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindowEntry.java index 7f8504d6c0..b3f0574164 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindowEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaWindowEntry.java @@ -27,22 +27,38 @@ final class DeltaWindowEntry { this.buffer = null; } - /** @return current delta chain depth of this object. */ + /** + * Get delta chain depth + * + * @return current delta chain depth of this object. + */ final int depth() { return object.getDeltaDepth(); } - /** @return type of the object in this window entry. */ + /** + * Get object type in this window entry + * + * @return type of the object in this window entry. + */ final int type() { return object.getType(); } - /** @return estimated unpacked size of the object, in bytes . */ + /** + * Get estimated unpacked object size + * + * @return estimated unpacked size of the object, in bytes . + */ final int size() { return object.getWeight(); } - /** @return true if there is no object stored in this entry. */ + /** + * Whether the entry is empty + * + * @return true if there is no object stored in this entry. + */ final boolean empty() { return object == null; } 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 fe3ab8b599..6e02b36ccb 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 @@ -681,7 +681,10 @@ public class PackWriter implements AutoCloseable { } /** - * @param filter the filter which indicates what and what not this writer + * Set filter spec + * + * @param filter + * the filter which indicates what and what not this writer * should include */ public void setFilterSpec(@NonNull FilterSpec filter) { @@ -689,7 +692,10 @@ public class PackWriter implements AutoCloseable { } /** - * @param config configuration related to packfile URIs + * Set packfile URI config + * + * @param config + * configuration related to packfile URIs * @since 5.5 */ public void setPackfileUriConfig(PackfileUriConfig config) { @@ -2616,17 +2622,29 @@ public class PackWriter implements AutoCloseable { this.bytesUsed = bytesUsed; } - /** @return the PackConfig used to build the writer. */ + /** + * Get pack config + * + * @return the PackConfig used to build the writer. + */ public PackConfig getConfig() { return config; } - /** @return the current phase of the writer. */ + /** + * Get packing phase + * + * @return the current phase of the writer. + */ public PackingPhase getPhase() { return phase; } - /** @return an estimate of the total memory used by the writer. */ + /** + * Get estimate of memory by the writer + * + * @return an estimate of the total memory used by the writer. + */ public long estimateBytesUsed() { return bytesUsed; } 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 6e83778c78..882e537734 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,8 +138,11 @@ public abstract class Reftable { public abstract RefCursor byObjectId(AnyObjectId id) throws IOException; /** + * 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. + * @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/ReftableDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java index 2b98348602..bd4e2d6763 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableDatabase.java @@ -52,6 +52,8 @@ public abstract class ReftableDatabase { protected abstract MergedReftable openMergedReftable() throws IOException; /** + * Get next update index + * * @return the next available logical timestamp for an additional reftable * in the stack. * @throws java.io.IOException @@ -67,6 +69,8 @@ public abstract class ReftableDatabase { } /** + * Get ReflogReader + * * @return a ReflogReader for the given ref * @param refname * the name of the ref. @@ -83,6 +87,8 @@ public abstract class ReftableDatabase { } /** + * Create a ReceiveCommand for the change from oldRef to newRef + * * @return a ReceiveCommand for the change from oldRef to newRef * @param oldRef * a ref @@ -136,6 +142,8 @@ public abstract class ReftableDatabase { } /** + * Get lock + * * @return the lock protecting underlying ReftableReaders against concurrent * reads. */ @@ -144,6 +152,8 @@ public abstract class ReftableDatabase { } /** + * Get reader for merged reftable + * * @return the merged reftable that is implemented by the stack of * reftables. Return value must be accessed under lock. * @throws IOException @@ -161,6 +171,8 @@ public abstract class ReftableDatabase { } /** + * Whether refName is conflicting + * * @return whether the given refName would be illegal in a repository that * uses loose refs. * @param refName @@ -319,8 +331,11 @@ public abstract class ReftableDatabase { } /** + * Whether there is a fast SHA1 to ref map + * * @return whether there is a fast SHA1 to ref map. - * @throws IOException in case of I/O problems. + * @throws IOException + * in case of I/O problems. */ public boolean hasFastTipsWithSha1() throws IOException { lock.lock(); 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 86e16ec863..4aea3e684e 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 @@ -84,7 +84,11 @@ class ReftableOutputStream extends OutputStream { return paddingUsed; } - /** @return bytes flushed; excludes {@link #bytesWrittenInBlock()}. */ + /** + * Get size + * + * @return bytes flushed; excludes {@link #bytesWrittenInBlock()}. + */ long size() { return out.getCount(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableWriter.java index f4df0b28f7..b47f58e1a5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/reftable/ReftableWriter.java @@ -565,92 +565,163 @@ public class ReftableWriter { objIndexLevels = objIdx != null ? objIdx.levels : 0; } - /** @return number of bytes in a ref block. */ + /** + * Get ref block size + * + * @return number of bytes in a ref block. + */ public int refBlockSize() { return refBlockSize; } - /** @return number of bytes to compress into a log block. */ + /** + * Get log block size + * + * @return number of bytes to compress into a log block. + */ public int logBlockSize() { return logBlockSize; } - /** @return number of references between binary search markers. */ + /** + * Get restart interval + * + * @return number of references between binary search markers. + */ public int restartInterval() { return restartInterval; } - /** @return smallest update index contained in this reftable. */ + /** + * Get smallest update index + * + * @return smallest update index contained in this reftable. + */ public long minUpdateIndex() { return minUpdateIndex; } - /** @return largest update index contained in this reftable. */ + /** + * Get largest updated index + * + * @return largest update index contained in this reftable. + */ public long maxUpdateIndex() { return maxUpdateIndex; } - /** @return total number of references in the reftable. */ + /** + * Get number of refs + * + * @return total number of references in the reftable. + */ public long refCount() { return refCnt; } - /** @return number of unique objects in the reftable. */ + /** + * Get number of unique objects + * + * @return number of unique objects in the reftable. + */ public long objCount() { return objCnt; } - /** @return total number of log records in the reftable. */ + /** + * Get number of log records + * + * @return total number of log records in the reftable. + */ public long logCount() { return logCnt; } - /** @return number of bytes for references, including ref index. */ + /** + * Get number of bytes for references + * + * @return number of bytes for references, including ref index. + */ public long refBytes() { return refBytes; } - /** @return number of bytes for objects, including object index. */ + /** + * Get number of bytes for objects + * + * @return number of bytes for objects, including object index. + */ public long objBytes() { return objBytes; } - /** @return number of bytes for log, including log index. */ + /** + * Get number of bytes for log + * + * @return number of bytes for log, including log index. + */ public long logBytes() { return logBytes; } - /** @return total number of bytes in the reftable. */ + /** + * Get total number of bytes + * + * @return total number of bytes in the reftable. + */ public long totalBytes() { return totalBytes; } - /** @return bytes of padding used to maintain block alignment. */ + /** + * Get number of padding bytes + * + * @return bytes of padding used to maintain block alignment. + */ public long paddingBytes() { return paddingUsed; } - /** @return number of bytes in the ref index; 0 if no index was used. */ + /** + * Get size of ref index + * + * @return number of bytes in the ref index; 0 if no index was used. + */ public int refIndexSize() { return refIndexSize; } - /** @return number of levels in the ref index. */ + /** + * Get number of ref index levels + * + * @return number of levels in the ref index. + */ public int refIndexLevels() { return refIndexLevels; } - /** @return number of bytes in the object index; 0 if no index. */ + /** + * Get size of object index + * + * @return number of bytes in the object index; 0 if no index. + */ public int objIndexSize() { return objIndexSize; } - /** @return number of levels in the object index. */ + /** + * Get number of levels in object index + * + * @return number of levels in the object index. + */ public int objIndexLevels() { return objIndexLevels; } /** + * Get number of bytes required to uniquely identify all objects in the + * reftable + * * @return number of bytes required to uniquely identify all objects in * the reftable. Unique abbreviations in hex would be * {@code 2 * objIdLength()}. 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 ff8308df40..a4740c9bf6 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 @@ -56,6 +56,8 @@ public class SubmoduleValidator { /** + * Get the error identifier + * * @return the error identifier */ public ObjectChecker.ErrorType getFsckMessageId() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileCache.java index 69a8273158..930bcea75b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileCache.java @@ -39,6 +39,8 @@ public class NetscapeCookieFileCache { } /** + * Get singleton instance + * * @param config * the config which defines the limit for this cache * @return the singleton instance of the cookie file cache. If the cache has @@ -54,6 +56,8 @@ public class NetscapeCookieFileCache { } /** + * Get a cache entry + * * @param path * the path of the cookie file to retrieve * @return the cache entry belonging to the requested file diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstCommand.java index c75cf5d618..a196fbe418 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstCommand.java @@ -69,13 +69,21 @@ public final class FirstCommand { this.capabilities = capabilities; } - /** @return non-capabilities part of the line. */ + /** + * Get line + * + * @return non-capabilities part of the line. + */ @NonNull public String getLine() { return line; } - /** @return capabilities parsed from the line, as an immutable map. */ + /** + * Get capabilities + * + * @return capabilities parsed from the line, as an immutable map. + */ @NonNull public Map<String, String> getCapabilities() { return capabilities; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstWant.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstWant.java index 30d629665f..e214cdae8b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstWant.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/transport/parser/FirstWant.java @@ -102,12 +102,18 @@ public class FirstWant { this.clientSID = clientSID; } - /** @return non-capabilities part of the line. */ + /** + * Get line + * + * @return non-capabilities part of the line. + */ public String getLine() { return line; } /** + * Get capabilities + * * @return capabilities parsed from the line as an immutable set (excluding * agent and session-id). */ @@ -115,13 +121,21 @@ public class FirstWant { return capabilities; } - /** @return client user agent parsed from the line. */ + /** + * Get agent + * + * @return client user agent parsed from the line. + */ @Nullable public String getAgent() { return agent; } - /** @return client session-id parsed from the line. */ + /** + * Get client session-id + * + * @return client session-id parsed from the line. + */ @Nullable public String getClientSID() { return clientSID; diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/util/Optionally.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/util/Optionally.java index 987584f640..3447f669ab 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/util/Optionally.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/util/Optionally.java @@ -102,6 +102,8 @@ public interface Optionally<T> { public static final Optionally<?> EMPTY = new Empty<>(); /** + * Get empty Optionally + * * @param <T> * type of the empty Optionally * @return the empty Optionally @@ -113,7 +115,6 @@ public interface Optionally<T> { /** * Clear the object - * */ void clear(); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java index b11b230a8f..97b5847f91 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/BitmapIndex.java @@ -159,7 +159,11 @@ public interface BitmapIndex { @Override BitmapBuilder xor(Bitmap other); - /** @return the fully built immutable bitmap */ + /** + * Build the bitmap + * + * @return the fully built immutable bitmap + */ Bitmap build(); /** @@ -174,7 +178,11 @@ public interface BitmapIndex { */ boolean removeAllOrNone(PackBitmapIndex bitmapIndex); - /** @return the number of elements in the bitmap. */ + /** + * Get number of elements in the bitmap + * + * @return the number of elements in the bitmap. + */ int cardinality(); /** diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitmoduleEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitmoduleEntry.java index aa0a9dd663..d03db772ea 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitmoduleEntry.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/GitmoduleEntry.java @@ -36,6 +36,8 @@ public final class GitmoduleEntry { } /** + * Get Id of a .gitmodules file found in the pack + * * @return Id of a .gitmodules file found in the pack */ public AnyObjectId getBlobId() { @@ -43,6 +45,8 @@ public final class GitmoduleEntry { } /** + * Get Id of a tree object where the .gitmodules file was found + * * @return Id of a tree object where the .gitmodules file was found */ public AnyObjectId getTreeId() { 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 b009ea1af7..8e965c5e9d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/IndexDiff.java @@ -122,6 +122,8 @@ public class IndexDiff { } /** + * Whether there is a "base" stage entry + * * @return whether there is a "base" stage entry */ public boolean hasBase() { @@ -129,6 +131,8 @@ public class IndexDiff { } /** + * Whether there is an "ours" stage entry + * * @return whether there is an "ours" stage entry */ public boolean hasOurs() { @@ -136,6 +140,8 @@ public class IndexDiff { } /** + * Whether there is a "theirs" stage entry + * * @return whether there is a "theirs" stage entry */ public boolean hasTheirs() { @@ -314,6 +320,8 @@ public class IndexDiff { */ public interface WorkingTreeIteratorFactory { /** + * Get working tree iterator + * * @param repo * the repository * @return working tree iterator 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 a1d6d92ec2..1a6c8ad0d2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectChecker.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectChecker.java @@ -116,46 +116,103 @@ public class ObjectChecker { * @since 4.2 */ public enum ErrorType { - // @formatter:off // These names match git-core so that fsck section keys also match. - /***/ NULL_SHA1, - /***/ DUPLICATE_ENTRIES, - /***/ TREE_NOT_SORTED, - /***/ ZERO_PADDED_FILEMODE, - /***/ EMPTY_NAME, - /***/ FULL_PATHNAME, - /***/ HAS_DOT, - /***/ HAS_DOTDOT, - /***/ HAS_DOTGIT, - /***/ BAD_OBJECT_SHA1, - /***/ BAD_PARENT_SHA1, - /***/ BAD_TREE_SHA1, - /***/ MISSING_AUTHOR, - /***/ MISSING_COMMITTER, - /***/ MISSING_OBJECT, - /***/ MISSING_TREE, - /***/ MISSING_TYPE_ENTRY, - /***/ MISSING_TAG_ENTRY, - /***/ BAD_DATE, - /***/ BAD_EMAIL, - /***/ BAD_TIMEZONE, - /***/ MISSING_EMAIL, - /***/ MISSING_SPACE_BEFORE_DATE, - /** @since 5.2 */ GITMODULES_BLOB, - /** @since 5.2 */ GITMODULES_LARGE, - /** @since 5.2 */ GITMODULES_NAME, - /** @since 5.2 */ GITMODULES_PARSE, - /** @since 5.2 */ GITMODULES_PATH, - /** @since 5.2 */ GITMODULES_SYMLINK, - /** @since 5.2 */ GITMODULES_URL, - /***/ UNKNOWN_TYPE, + // See https://git-scm.com/docs/git-fsck#_fsck_messages + /** (WARN) Tree contains entries pointing to a null sha1. */ + NULL_SHA1, + /** (ERROR) A tree contains duplicate file entries. */ + DUPLICATE_ENTRIES, + /** (ERROR) A tree is not properly sorted. */ + TREE_NOT_SORTED, + /** (WARN) Found a zero padded filemode in a tree. */ + ZERO_PADDED_FILEMODE, + /** (WARN) A path contains an empty name. */ + EMPTY_NAME, + /** (WARN) A path contains the full path starting with "/". */ + FULL_PATHNAME, + /** (WARN) A tree contains an entry named . */ + HAS_DOT, + /** (WARN) A tree contains an entry named .. */ + HAS_DOTDOT, + /** (WARN) A tree contains an entry named .git */ + HAS_DOTGIT, + /** (ERROR) An object has a bad sha1. */ + BAD_OBJECT_SHA1, + /** (ERROR) A commit object has a bad parent sha1. */ + BAD_PARENT_SHA1, + /** (ERROR) A tree has an invalid format. */ + BAD_TREE_SHA1, + /** (ERROR) Author is missing. */ + MISSING_AUTHOR, + /** (ERROR) Committer is missing. */ + MISSING_COMMITTER, + /** (ERROR) Missing object line in tag object. */ + MISSING_OBJECT, + /** (ERROR) Missing tree line in a commit object. */ + MISSING_TREE, + /** (ERROR) Missing type line in a tag object. */ + MISSING_TYPE_ENTRY, + /** (ERROR) Missing tag line in a tag object. */ + MISSING_TAG_ENTRY, + /** (ERROR) Invalid date format in an author/committer line. */ + BAD_DATE, + /** (ERROR) Invalid email format in an author/committer line. */ + BAD_EMAIL, + /** (ERROR) Found an invalid time zone in an author/committer line. */ + BAD_TIMEZONE, + /** (ERROR) Email is missing in an author/committer line. */ + MISSING_EMAIL, + /** (ERROR) Missing space before date in an author/committer line. */ + MISSING_SPACE_BEFORE_DATE, + /** + * (ERROR) A non-blob found at .gitmodules. + * @since 5.2 + */ + GITMODULES_BLOB, + /** + * (ERROR) The .gitmodules file is too large to parse. + * @since 5.2 + */ + GITMODULES_LARGE, + /** + * (ERROR) A submodule name is invalid. + * @since 5.2 + */ + GITMODULES_NAME, + /** + * (INFO) Could not parse .gitmodules blob. + * @since 5.2 + */ + GITMODULES_PARSE, + /** + * (ERROR) .gitmodules path is invalid. + * @since 5.2 + */ + GITMODULES_PATH, + /** + * (ERROR) .gitmodules is a symlink. + * @since 5.2 + */ + GITMODULES_SYMLINK, + /** + * (ERROR) Found an invalid submodule url. + * @since 5.2 + */ + GITMODULES_URL, + /** (ERROR) Found an unknown object type. */ + UNKNOWN_TYPE, // These are unique to JGit. - /***/ WIN32_BAD_NAME, - /***/ BAD_UTF8; - // @formatter:on - - /** @return camelCaseVersion of the name. */ + /** (ERROR) Windows: Invalid name */ + WIN32_BAD_NAME, + /** (ERROR) Byte sequence is not a valid UTF-8 character */ + BAD_UTF8; + + /** + * Get camelCaseVersion of the name + * + * @return camelCaseVersion of the name. + */ public String getMessageId() { String n = name(); StringBuilder r = new StringBuilder(n.length()); diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java index a39766cbd0..a8cc9a8529 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectDatabase.java @@ -77,9 +77,12 @@ public abstract class ObjectDatabase implements AutoCloseable { public abstract ObjectReader newReader(); /** + * Get the shallow commits of the current repository + * * @return the shallow commits of the current repository * - * @throws IOException the database could not be read + * @throws IOException + * the database could not be read * * @since 6.3 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java index 000899d767..f6c52e292a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectInserter.java @@ -66,7 +66,11 @@ public abstract class ObjectInserter implements AutoCloseable { /** Wraps a delegate ObjectInserter. */ public abstract static class Filter extends ObjectInserter { - /** @return delegate ObjectInserter to handle all processing. */ + /** + * Get delegate ObjectInserter to handle all processing + * + * @return delegate ObjectInserter to handle all processing. + */ protected abstract ObjectInserter delegate(); @Override diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java index 67b8a2c249..d0564265dc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectLoader.java @@ -302,6 +302,8 @@ public abstract class ObjectLoader { */ public abstract static class Filter extends ObjectLoader { /** + * Get delegate ObjectLoader to handle all processing. + * * @return delegate ObjectLoader to handle all processing. * @since 4.10 */ 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 3e2998530f..b916d1e8e9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectReader.java @@ -583,6 +583,8 @@ public abstract class ObjectReader implements AutoCloseable { */ public abstract static class Filter extends ObjectReader { /** + * Get delegate ObjectReader to handle all processing + * * @return delegate ObjectReader to handle all processing. * @since 4.4 */ 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 878cfc8f9d..082b324d1a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RebaseTodoLine.java @@ -57,6 +57,8 @@ public class RebaseTodoLine { } /** + * Get full action token name + * * @return full action token name */ public String toToken() { @@ -69,6 +71,8 @@ public class RebaseTodoLine { } /** + * Parse a token + * * @param token * token to parse * @return the Action diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java index 218c0a8e8e..9c374760b0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Ref.java @@ -78,6 +78,8 @@ public interface Ref { } /** + * Whether this storage has a loose file + * * @return true if this storage has a loose file. */ public boolean isLoose() { @@ -85,6 +87,8 @@ public interface Ref { } /** + * Whether this storage is inside the packed file + * * @return true if this storage is inside the packed file. */ public boolean isPacked() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java index 41f291b57b..6288447a8d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryCache.java @@ -382,6 +382,8 @@ public class RepositoryCache { private final FS fs; /** + * Create a pointer to a location on disk. + * * @param directory * exact location of the repository. * @param fs @@ -401,7 +403,11 @@ public class RepositoryCache { } } - /** @return location supplied to the constructor. */ + /** + * Get directory containing the repository database + * + * @return directory containing the repository database. + */ public final File getFile() { return path; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java index 98d719183d..eaa15fbc99 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/RepositoryState.java @@ -355,27 +355,37 @@ public enum RepositoryState { public abstract boolean canCheckout(); /** + * Whether we can commit + * * @return true if we can commit */ public abstract boolean canCommit(); /** + * Whether reset to another HEAD is considered SAFE + * * @return true if reset to another HEAD is considered SAFE */ public abstract boolean canResetHead(); /** + * Whether amending is considered SAFE + * * @return true if amending is considered SAFE */ public abstract boolean canAmend(); /** + * Whether a rebase is in progress + * * @return true if the repository is currently in a rebase * @since 3.0 */ public abstract boolean isRebasing(); /** + * Get a human readable description of the state + * * @return a human readable description of the state. */ public abstract String getDescription(); 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 1ddac18e56..8857ef8571 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/EolAwareOutputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/EolAwareOutputStream.java @@ -74,7 +74,11 @@ class EolAwareOutputStream extends OutputStream { write('\n'); } - /** @return true if a new line has just begun. */ + /** + * Whether a new line has just begun + * + * @return true if a new line has just begun. + */ boolean isBeginln() { return bol; } 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 6eea7b88d9..13cccee16b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java @@ -113,6 +113,8 @@ public class ResolveMerger extends ThreeWayMerger { private ObjectId treeId = null; /** + * Get modified tree id if any + * * @return Modified tree ID if any, or null otherwise. */ public ObjectId getTreeId() { @@ -120,6 +122,8 @@ public class ResolveMerger extends ThreeWayMerger { } /** + * Get path of files that couldn't be deleted + * * @return Files that couldn't be deleted. */ public List<String> getFailedToDelete() { @@ -127,6 +131,8 @@ public class ResolveMerger extends ThreeWayMerger { } /** + * Get path of modified files + * * @return Files modified during this operation. */ public List<String> getModifiedFiles() { 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 b872750212..ed45f81476 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/notes/NoteMap.java @@ -348,7 +348,11 @@ public class NoteMap implements Iterable<Note> { return root.writeTree(inserter); } - /** @return the root note bucket */ + /** + * Get the root note bucket + * + * @return the root note bucket + */ InMemoryNoteBucket getRoot() { return root; } 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 1359f66062..9e98f9f272 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/HunkHeader.java @@ -42,27 +42,47 @@ public class HunkHeader { /** Number of lines added by the post-image not in this file. */ int nAdded; - /** @return first line number the hunk starts on in this file. */ + /** + * Get line number where hunk starts + * + * @return first line number the hunk starts on in this file. + */ public int getStartLine() { return startLine; } - /** @return total number of lines this hunk covers in this file. */ + /** + * Get number of lines this hunk covers + * + * @return total number of lines this hunk covers in this file. + */ public int getLineCount() { return lineCount; } - /** @return number of lines deleted by the post-image from this file. */ + /** + * Get number of lines deleted by the post-image + * + * @return number of lines deleted by the post-image from this file. + */ public int getLinesDeleted() { return nDeleted; } - /** @return number of lines added by the post-image not in this file. */ + /** + * Get number of lines added by the post-image + * + * @return number of lines added by the post-image not in this file. + */ public int getLinesAdded() { return nAdded; } - /** @return object id of the pre-image file. */ + /** + * Get id of the pre-image file + * + * @return object id of the pre-image file. + */ public abstract AbbreviatedObjectId getId(); } 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 02c066cb24..1edd85421a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/patch/PatchApplier.java @@ -196,6 +196,8 @@ public class PatchApplier { private List<Error> errors = new ArrayList<>(); /** + * Get modified paths + * * @return List of modified paths. */ public List<String> getPaths() { @@ -203,6 +205,8 @@ public class PatchApplier { } /** + * Get tree ID + * * @return The applied tree ID. */ public ObjectId getTreeId() { @@ -210,6 +214,8 @@ public class PatchApplier { } /** + * Get errors + * * @return Errors occurred while applying the patch. * * @since 6.6 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 f74666bd86..a7ffd34233 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/DepthWalk.java @@ -35,6 +35,8 @@ public interface DepthWalk { int getDepth(); /** + * Get deepen-since value + * * @return the deepen-since value; if not 0, this walk only returns commits * whose commit time is at or after this limit * @since 5.2 @@ -44,6 +46,8 @@ public interface DepthWalk { } /** + * Get deepen-not values + * * @return the objects specified by the client using --shallow-exclude * @since 5.2 */ @@ -51,7 +55,11 @@ public interface DepthWalk { return Collections.emptyList(); } - /** @return flag marking commits that should become unshallow. */ + /** + * Get unshallow flag + * + * @return flag marking commits that should become unshallow. + */ /** * Get flag marking commits that should become unshallow. * @@ -67,7 +75,10 @@ public interface DepthWalk { RevFlag getReinterestingFlag(); /** - * @return flag marking commits that are to be excluded because of --shallow-exclude + * Get deepen-not flag + * + * @return flag marking commits that are to be excluded because of + * --shallow-exclude * @since 5.2 */ RevFlag getDeepenNotFlag(); @@ -85,12 +96,18 @@ public interface DepthWalk { */ boolean makesChildBoundary; - /** @return depth of this commit, as found by the shortest path. */ + /** + * Get depth + * + * @return depth of this commit, as found by the shortest path. + */ public int getDepth() { return depth; } /** + * Whether at least one commit was excluded due to shallow fetch + * * @return true if at least one of this commit's parents was excluded * due to a shallow fetch setting, false otherwise * @since 5.2 @@ -126,8 +143,12 @@ public interface DepthWalk { private final RevFlag DEEPEN_NOT; /** - * @param repo Repository to walk - * @param depth Maximum depth to return + * Create RevWalk + * + * @param repo + * Repository to walk + * @param depth + * Maximum depth to return */ public RevWalk(Repository repo, int depth) { super(repo); @@ -140,8 +161,12 @@ public interface DepthWalk { } /** - * @param or ObjectReader to use - * @param depth Maximum depth to return + * Create RevWalk + * + * @param or + * ObjectReader to use + * @param depth + * Maximum depth to return */ public RevWalk(ObjectReader or, int depth) { super(or); @@ -231,6 +256,8 @@ public interface DepthWalk { } /** + * Convert to ObjectWalk with same objects + * * @since 4.5 */ @Override @@ -259,8 +286,12 @@ public interface DepthWalk { private final RevFlag DEEPEN_NOT; /** - * @param repo Repository to walk - * @param depth Maximum depth to return + * Create ObjectWalk + * + * @param repo + * Repository to walk + * @param depth + * Maximum depth to return */ public ObjectWalk(Repository repo, int depth) { super(repo); @@ -273,8 +304,12 @@ public interface DepthWalk { } /** - * @param or Object Reader - * @param depth Maximum depth to return + * Create ObjectWalk + * + * @param or + * Object Reader + * @param depth + * Maximum depth to return */ public ObjectWalk(ObjectReader or, int depth) { super(or); 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 64b2fcd66a..82671d9abb 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/ObjectWalk.java @@ -642,6 +642,8 @@ public class ObjectWalk extends RevWalk { } /** + * Get the current traversal depth from the root tree object + * * @return the current traversal depth from the root tree object * @since 5.4 */ 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 27a09f4956..0d9ccdbc1b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java @@ -821,6 +821,8 @@ public class RevWalk implements Iterable<RevCommit>, AutoCloseable { } /** + * Whether only first-parent links should be followed when walking + * * @return whether only first-parent links should be followed when walking. * * @since 5.5 diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheStats.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheStats.java index ae329b686a..7cb8618302 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheStats.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/WindowCacheStats.java @@ -23,6 +23,8 @@ import org.eclipse.jgit.internal.storage.file.WindowCache; @MXBean public interface WindowCacheStats { /** + * Get number of open files + * * @return the number of open files. * @deprecated use {@link #getOpenFileCount()} instead */ @@ -32,6 +34,8 @@ public interface WindowCacheStats { } /** + * Get number of open bytes + * * @return the number of open bytes. * @deprecated use {@link #getOpenByteCount()} instead */ @@ -41,6 +45,8 @@ public interface WindowCacheStats { } /** + * Get cache statistics + * * @return cache statistics for the WindowCache * @since 5.1.13 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java index 4d18337fae..64a1eb2e1a 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackStatistics.java @@ -111,6 +111,8 @@ public class PackStatistics { } /** + * Get total number of objects output + * * @return total number of objects output. This total includes the value * of {@link #getDeltas()}. */ @@ -119,6 +121,8 @@ public class PackStatistics { } /** + * Get total number of deltas output + * * @return total number of deltas output. This may be lower than the * actual number of deltas if a cached pack was reused. */ @@ -127,6 +131,9 @@ public class PackStatistics { } /** + * Get number of objects whose existing representation was reused in the + * output + * * @return number of objects whose existing representation was reused in * the output. This count includes {@link #getReusedDeltas()}. */ @@ -135,6 +142,9 @@ public class PackStatistics { } /** + * Get number of deltas whose existing representation was reused in the + * output + * * @return number of deltas whose existing representation was reused in * the output, as their base object was also output or was * assumed present for a thin pack. This may be lower than the @@ -145,6 +155,8 @@ public class PackStatistics { } /** + * Get total number of bytes written + * * @return total number of bytes written. This size includes the object * headers as well as the compressed data. This size also * includes all of {@link #getDeltaBytes()}. @@ -154,6 +166,8 @@ public class PackStatistics { } /** + * Get number of delta bytes written + * * @return number of delta bytes written. This size includes the object * headers for the delta objects. */ @@ -641,6 +655,8 @@ public class PackStatistics { } /** + * Get number of trees traversed + * * @return number of trees traversed in the walk when writing the pack. * @since 5.4 */ @@ -649,6 +665,8 @@ public class PackStatistics { } /** + * Get amount of packfiles offloaded + * * @return amount of packfiles offloaded (sent as "packfile-uri")/ * @since 5.6 */ @@ -657,6 +675,8 @@ public class PackStatistics { } /** + * Get total size (in bytes) offloaded + * * @return total size (in bytes) offloaded to HTTP downloads. * @since 5.6 */ 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 f09e1a5171..e324ab1afc 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleConflict.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/submodule/SubmoduleConflict.java @@ -71,8 +71,10 @@ public class SubmoduleConflict extends Sequence { } /** - * @return the object id for the conflicting submodule - */ + * Get objectId for the conflicting submodule + * + * @return the object id for the conflicting submodule + */ public ObjectId getObjectId() { return objectId; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CapabilitiesV2Request.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/CapabilitiesV2Request.java index 9c5a54e9cb..27afdc29be 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CapabilitiesV2Request.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/CapabilitiesV2Request.java @@ -21,7 +21,11 @@ public final class CapabilitiesV2Request { private CapabilitiesV2Request() { } - /** @return A builder of {@link CapabilitiesV2Request}. */ + /** + * Create builder + * + * @return A builder of {@link CapabilitiesV2Request}. + */ public static Builder builder() { return new Builder(); } @@ -31,7 +35,11 @@ public final class CapabilitiesV2Request { private Builder() { } - /** @return CapabilitiesV2Request */ + /** + * Build the request + * + * @return CapabilitiesV2Request + */ public CapabilitiesV2Request build() { return new CapabilitiesV2Request(); } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ConnectivityChecker.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ConnectivityChecker.java index dcffe48be8..cbb3420db2 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ConnectivityChecker.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ConnectivityChecker.java @@ -60,6 +60,8 @@ public interface ConnectivityChecker { private RevWalk walk; /** + * Get database we write the stored objects into + * * @return database we write the stored objects into. */ public Repository getRepository() { @@ -67,6 +69,8 @@ public interface ConnectivityChecker { } /** + * Set database we write the stored objects into + * * @param repository * set database we write the stored objects into. */ @@ -75,6 +79,8 @@ public interface ConnectivityChecker { } /** + * Get the parser used to parse pack + * * @return the parser used to parse pack. */ public PackParser getParser() { @@ -82,6 +88,8 @@ public interface ConnectivityChecker { } /** + * Set the parser + * * @param parser * the parser to set */ @@ -90,6 +98,8 @@ public interface ConnectivityChecker { } /** + * Whether checker should check objects + * * @return if checker should check objects. */ public boolean isCheckObjects() { @@ -97,6 +107,8 @@ public interface ConnectivityChecker { } /** + * Set whether objects should be checked + * * @param checkObjects * set if checker should check referenced objects outside of * the received pack are reachable. @@ -106,21 +118,27 @@ public interface ConnectivityChecker { } /** - * @return command received by the current request. + * Get commands received by the current request + * + * @return commands received by the current request. */ public List<ReceiveCommand> getCommands() { return commands; } /** + * Set commands received by the current request + * * @param commands - * set command received by the current request. + * commands received by the current request. */ public void setCommands(List<ReceiveCommand> commands) { this.commands = commands; } /** + * Set the walk to parse commits + * * @param walk * the walk to parse commits */ @@ -129,6 +147,8 @@ public interface ConnectivityChecker { } /** + * Get the walk to parse commits + * * @return the walk to parse commits */ public RevWalk getWalk() { 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 78c5c6374f..32852890c0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialItem.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/CredentialItem.java @@ -109,12 +109,18 @@ public abstract class CredentialItem { value = null; } - /** @return the current value */ + /** + * Get value + * + * @return the current value + */ public String getValue() { return value; } /** + * Set value + * * @param newValue * the new value */ @@ -214,7 +220,11 @@ public abstract class CredentialItem { value = false; } - /** @return the current value */ + /** + * Get value + * + * @return the current value + */ public boolean getValue() { return value; } diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchRequest.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchRequest.java index 009a70b7b3..91eed96d4e 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchRequest.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchRequest.java @@ -85,6 +85,8 @@ abstract class FetchRequest { } /** + * Get object ids in the "want" lines + * * @return object ids in the "want" (and "want-ref") lines of the request */ @NonNull @@ -93,6 +95,8 @@ abstract class FetchRequest { } /** + * Get the depth set in a "deepen" line + * * @return the depth set in a "deepen" line. 0 by default. */ int getDepth() { @@ -112,6 +116,8 @@ abstract class FetchRequest { } /** + * Get the filter spec given in a "filter" line + * * @return the filter spec given in a "filter" line */ @NonNull @@ -152,6 +158,8 @@ abstract class FetchRequest { } /** + * Get refs received in "deepen-not" lines + * * @return refs received in "deepen-not" lines. */ @NonNull @@ -160,6 +168,8 @@ abstract class FetchRequest { } /** + * Get string identifying the agent + * * @return string identifying the agent (as sent in the request body by the * client) */ @@ -169,8 +179,10 @@ abstract class FetchRequest { } /** - * @return string identifying the client session ID (as sent in the request body by the - * client) + * Get string identifying the client session ID + * + * @return string identifying the client session ID (as sent in the request + * body by the client) */ @Nullable String getClientSID() { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV0Request.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV0Request.java index ca3639d03c..53b3e19263 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV0Request.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV0Request.java @@ -58,6 +58,8 @@ final class FetchV0Request extends FetchRequest { String clientSID; /** + * Add wantId + * * @param objectId * object id received in a "want" line * @return this builder @@ -68,6 +70,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Set depth + * * @param d * depth set in a "deepen" line * @return this builder @@ -78,6 +82,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Get depth + * * @return depth set in the request (via a "deepen" line). Defaulting to * 0 if not set. */ @@ -86,6 +92,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Whether there's at least one "deepen not" line + * * @return true if there has been at least one "deepen not" line in the * request so far */ @@ -94,6 +102,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Add "deepen not" + * * @param deepenNot * reference received in a "deepen not" line * @return this builder @@ -104,6 +114,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Set "deepen since" + * * @param value * Unix timestamp received in a "deepen since" line * @return this builder @@ -114,6 +126,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Get "deepen since + * * @return shallow since value, sent before in a "deepen since" line. 0 * by default. */ @@ -122,6 +136,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Add client shallow commit + * * @param shallowOid * object id received in a "shallow" line * @return this builder @@ -132,6 +148,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Add client capabilities + * * @param clientCapabilities * client capabilities sent by the client in the first want * line of the request @@ -143,6 +161,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Set agent + * * @param clientAgent * agent line sent by the client in the request body * @return this builder @@ -153,6 +173,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Set client session id + * * @param clientSID * session-id line sent by the client in the request body * @return this builder @@ -163,6 +185,8 @@ final class FetchV0Request extends FetchRequest { } /** + * Set filter spec + * * @param filter * the filter set in a filter line * @return this builder diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java index 3d4f38131c..21284db2c1 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FetchV2Request.java @@ -70,6 +70,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Get object ids received in the "have" lines + * * @return object ids received in the "have" lines */ @NonNull @@ -78,6 +80,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Get list of references received in "want-ref" lines + * * @return list of references received in "want-ref" lines * * @since 5.4 @@ -88,6 +92,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Whether the request had a "done" line + * * @return true if the request had a "done" line */ boolean wasDoneReceived() { @@ -95,6 +101,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Whether the request had a "wait-for-done" line + * * @return true if the request had a "wait-for-done" line */ boolean wasWaitForDoneReceived() { @@ -115,6 +123,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Whether "sideband-all" was received + * * @return true if "sideband-all" was received */ boolean getSidebandAll() { @@ -126,7 +136,11 @@ public final class FetchV2Request extends FetchRequest { return packfileUriProtocols; } - /** @return A builder of {@link FetchV2Request}. */ + /** + * Get builder + * + * @return A builder of {@link FetchV2Request}. + */ static Builder builder() { return new Builder(); } @@ -171,6 +185,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Add object the peer has + * * @param objectId * object id received in a "have" line * @return this builder @@ -181,7 +197,7 @@ public final class FetchV2Request extends FetchRequest { } /** - * Ref received in "want-ref" line and the object-id it refers to + * Add Ref received in "want-ref" line and the object-id it refers to * * @param refName * reference name @@ -193,6 +209,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Add client capability + * * @param clientCapability * capability line sent by the client * @return this builder @@ -203,6 +221,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Add object received in "want" line + * * @param wantId * object id received in a "want" line * @return this builder @@ -213,6 +233,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Add Object received in a "shallow" line + * * @param shallowOid * object id received in a "shallow" line * @return this builder @@ -223,6 +245,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Set depth received in "deepen" line + * * @param d * Depth received in a "deepen" line * @return this builder @@ -233,6 +257,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Get depth set in request + * * @return depth set in the request (via a "deepen" line). Defaulting to * 0 if not set. */ @@ -241,6 +267,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Whether there has been at least one ""deepen not" line + * * @return true if there has been at least one "deepen not" line in the * request so far */ @@ -249,6 +277,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Add reference received in a "deepen not" line + * * @param deepenNot * reference received in a "deepen not" line * @return this builder @@ -259,6 +289,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Set Unix timestamp received in a "deepen since" line + * * @param value * Unix timestamp received in a "deepen since" line * @return this builder @@ -269,6 +301,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Get shallow since value + * * @return shallow since value, sent before in a "deepen since" line. 0 * by default. */ @@ -277,6 +311,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Set filter spec + * * @param filter * spec set in a "filter" line * @return this builder @@ -321,6 +357,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Set value of client-supplied session capability + * * @param clientSIDValue * the client-supplied session capability, without the * leading "session-id=" @@ -347,7 +385,10 @@ public final class FetchV2Request extends FetchRequest { } /** - * @param value true if client sent "sideband-all" + * Set whether client sent "sideband-all + * + * @param value + * true if client sent "sideband-all" * @return this builder */ Builder setSidebandAll(boolean value) { @@ -361,6 +402,8 @@ public final class FetchV2Request extends FetchRequest { } /** + * Build initialized fetch request + * * @return Initialized fetch request */ FetchV2Request build() { 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 12a7dd3af4..442b963440 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FilterSpec.java @@ -137,6 +137,8 @@ public final class FilterSpec { } /** + * Specify permitted object types + * * @param types * set of permitted object types, for use in "blob:none" and * "object:none" filters @@ -147,6 +149,8 @@ public final class FilterSpec { } /** + * Specify blob limit + * * @param blobLimit * the blob limit in a "blob:[limit]" filter line * @return a filter spec which filters blobs above a certain size @@ -160,6 +164,8 @@ public final class FilterSpec { } /** + * Specify tree depth limit + * * @param treeDepthLimit * the tree depth limit in a "tree:[depth]" filter line * @return a filter spec which filters blobs and trees beyond a certain tree @@ -179,6 +185,8 @@ public final class FilterSpec { public static final FilterSpec NO_FILTER = new FilterSpec(ObjectTypes.ALL, -1, -1); /** + * Whether object type is allowed + * * @param type * a Git object type, such as * {@link org.eclipse.jgit.lib.Constants#OBJ_BLOB} @@ -191,6 +199,8 @@ public final class FilterSpec { } /** + * Get blob size limit + * * @return -1 if this filter does not filter blobs based on size, or a * non-negative integer representing the max size of blobs to allow */ @@ -199,6 +209,8 @@ public final class FilterSpec { } /** + * Get tree depth limit + * * @return -1 if this filter does not filter blobs and trees based on depth, * or a non-negative integer representing the max tree depth of * blobs and trees to fetch @@ -208,6 +220,8 @@ public final class FilterSpec { } /** + * Whether this filter is a no-op + * * @return true if this filter doesn't filter out anything */ public boolean isNoOp() { @@ -215,7 +229,10 @@ public final class FilterSpec { } /** - * @return the filter line which describes this spec, e.g. "filter blob:limit=42" + * Get filter line describing this spec + * + * @return the filter line which describes this spec, e.g. "filter + * blob:limit=42" */ @Nullable public String filterLine() { 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 6d5b5e61ec..5d334e67f7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/FtpChannel.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/FtpChannel.java @@ -81,6 +81,8 @@ public interface FtpChannel { void disconnect(); /** + * Whether the FtpChannel is connected + * * @return whether the {@link FtpChannel} is connected */ boolean isConnected(); @@ -96,6 +98,8 @@ public interface FtpChannel { void cd(String path) throws IOException; /** + * Get current remote directory path + * * @return the current remote directory path * @throws IOException * if an IO error occurred 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 b2799e1362..008f1d9b20 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/LsRefsV2Request.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/LsRefsV2Request.java @@ -53,22 +53,36 @@ public final class LsRefsV2Request { this.clientSID = clientSID; } - /** @return ref prefixes that the client requested. */ + /** + * Get ref prefixes + * + * @return ref prefixes that the client requested. + */ public List<String> getRefPrefixes() { return refPrefixes; } - /** @return true if the client requests symbolic references. */ + /** + * Whether the client requests symbolic references + * + * @return true if the client requests symbolic references. + */ public boolean getSymrefs() { return symrefs; } - /** @return true if the client requests tags to be peeled. */ + /** + * Whether the client requests tags to be peeled + * + * @return true if the client requests tags to be peeled. + */ public boolean getPeel() { return peel; } /** + * Get agent reported by the client + * * @return agent as reported by the client * * @since 5.2 @@ -79,6 +93,8 @@ public final class LsRefsV2Request { } /** + * Get session-id reported by the client + * * @return session-id as reported by the client * * @since 6.4 @@ -106,7 +122,11 @@ public final class LsRefsV2Request { return serverOptions; } - /** @return A builder of {@link LsRefsV2Request}. */ + /** + * Create builder + * + * @return A builder of {@link LsRefsV2Request}. + */ public static Builder builder() { return new Builder(); } @@ -129,6 +149,8 @@ public final class LsRefsV2Request { } /** + * Set ref prefixes + * * @param value * ref prefix values * @return the Builder @@ -139,6 +161,8 @@ public final class LsRefsV2Request { } /** + * Set symrefs + * * @param value * of symrefs * @return the Builder @@ -149,6 +173,8 @@ public final class LsRefsV2Request { } /** + * Set whether to peel tags + * * @param value * of peel * @return the Builder 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 2a52d7fd7f..241f1e749f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ObjectInfoRequest.java @@ -34,12 +34,20 @@ public final class ObjectInfoRequest { this.objectIDs = objectIDs; } - /** @return object IDs that the client requested. */ + /** + * Get object ids requested by the client + * + * @return object IDs that the client requested. + */ public List<ObjectId> getObjectIDs() { return this.objectIDs; } - /** @return A builder of {@link ObjectInfoRequest}. */ + /** + * Create builder + * + * @return A builder of {@link ObjectInfoRequest}. + */ public static Builder builder() { return new Builder(); } @@ -52,6 +60,8 @@ public final class ObjectInfoRequest { } /** + * Set object ids + * * @param value * of objectIds * @return the Builder 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 fe9ddabf8e..c6bf77db24 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackParser.java @@ -1668,17 +1668,27 @@ public abstract class PackParser { long sizeBeforeInflating; - /** @return offset within the input stream. */ + /** + * Get offset within the input stream + * + * @return offset within the input stream. + */ public long getOffset() { return position; } - /** @return the CRC-32 checksum of the stored delta data. */ + /** + * Get the CRC-32 checksum of the stored delta data + * + * @return the CRC-32 checksum of the stored delta data. + */ public int getCRC() { return crc; } /** + * Set the CRC-32 checksum of the stored delta data + * * @param crc32 * the CRC-32 checksum of the stored delta data. */ 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 d7ef4f8f0a..fae26cda95 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PackedObjectInfo.java @@ -148,6 +148,8 @@ public class PackedObjectInfo extends ObjectIdOwnerMap.Entry { } /** + * Get full size (inflated, undeltified) + * * @return size of the object (inflated, undeltified) * * @since 6.4 diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineOut.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineOut.java index 77f0a7a516..43b742b02d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineOut.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/PacketLineOut.java @@ -85,8 +85,10 @@ public class PacketLineOut { } /** + * Whether is using sideband + * * @return whether to add a sideband designator to each non-flush and - * non-delim packet + * non-delim packet * @see #setUsingSideband * @since 5.5 */ @@ -95,11 +97,14 @@ public class PacketLineOut { } /** - * @param value If true, when writing packet lines, add, as the first - * byte, a sideband designator to each non-flush and non-delim - * packet. See pack-protocol.txt and protocol-v2.txt from the Git - * project for more information, specifically the "side-band" and - * "sideband-all" sections. + * Set whether to use sideband + * + * @param value + * If true, when writing packet lines, add, as the first byte, a + * sideband designator to each non-flush and non-delim packet. + * See pack-protocol.txt and protocol-v2.txt from the Git project + * for more information, specifically the "side-band" and + * "sideband-all" sections. * @since 5.5 */ public void setUsingSideband(boolean value) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Hook.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Hook.java index d7626df3fa..2caecbe843 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Hook.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ProtocolV2Hook.java @@ -24,6 +24,8 @@ public interface ProtocolV2Hook { }; /** + * Handle capabilities request + * * @param req * the capabilities request * @throws ServiceMayNotContinueException @@ -36,6 +38,8 @@ public interface ProtocolV2Hook { } /** + * Handle ls-refs request + * * @param req * the ls-refs request * @throws ServiceMayNotContinueException @@ -48,8 +52,12 @@ public interface ProtocolV2Hook { } /** - * @param req the fetch request - * @throws ServiceMayNotContinueException abort; the message will be sent to the user + * Handle fetch request + * + * @param req + * the fetch request + * @throws ServiceMayNotContinueException + * abort; the message will be sent to the user */ default void onFetch(FetchV2Request req) throws ServiceMayNotContinueException { @@ -57,6 +65,8 @@ public interface ProtocolV2Hook { } /** + * Handle object-info request + * * @param req * the object-info request * @throws ServiceMayNotContinueException 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 9a61774334..ddde6038e9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivePack.java @@ -108,12 +108,20 @@ public class ReceivePack { command = FirstCommand.fromLine(line); } - /** @return non-capabilities part of the line. */ + /** + * Get non-capabilities part of the line + * + * @return non-capabilities part of the line. + */ public String getLine() { return command.getLine(); } - /** @return capabilities parsed from the line. */ + /** + * Get capabilities parsed from the line + * + * @return capabilities parsed from the line. + */ public Set<String> getCapabilities() { Set<String> reconstructedCapabilites = new HashSet<>(); for (Map.Entry<String, String> e : command.getCapabilities() @@ -2130,8 +2138,10 @@ public class ReceivePack { } /** + * Set the unpackErrorHandler + * * @param unpackErrorHandler - * the unpackErrorHandler to set + * the unpackErrorHandler * @since 5.7 */ public void setUnpackErrorHandler(UnpackErrorHandler unpackErrorHandler) { @@ -2155,6 +2165,8 @@ public class ReceivePack { } /** + * Get the client session-id + * * @return The client session-id. * @since 6.4 */ diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivedPackStatistics.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivedPackStatistics.java index d7bc40006b..8887e263ea 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivedPackStatistics.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/ReceivedPackStatistics.java @@ -174,7 +174,10 @@ public class ReceivedPackStatistics { private long numDeltaTag; /** - * @param numBytesRead number of bytes read from the input stream + * Set number of bytes read from the input stream + * + * @param numBytesRead + * number of bytes read from the input stream * @return this */ public Builder setNumBytesRead(long numBytesRead) { @@ -183,6 +186,8 @@ public class ReceivedPackStatistics { } /** + * Increment additional bytes already in the local database + * * @param size * additional bytes already in the local database * @return this @@ -220,13 +225,21 @@ public class ReceivedPackStatistics { return this; } - /** @return this */ + /** + * Increment offset delta + * + * @return this + */ public Builder addOffsetDelta() { numOfsDelta++; return this; } - /** @return this */ + /** + * Increment ref delta + * + * @return this + */ public Builder addRefDelta() { numRefDelta++; return this; 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 6b022ea5d1..f72c421920 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/RefAdvertiser.java @@ -161,9 +161,11 @@ public abstract class RefAdvertiser { } /** + * Set whether this advertiser should use protocol v2 + * * @param b - * true if this advertiser should advertise using the protocol - * v2 format, false otherwise + * true if this advertiser should advertise using the protocol v2 + * format, false otherwise * @since 5.0 */ public void setUseProtocolV2(boolean b) { diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java index 064201a629..5333beff4b 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransferConfig.java @@ -297,6 +297,8 @@ public class TransferConfig { } /** + * Whether clients are allowed to specify "filter" line + * * @return true if clients are allowed to specify a "filter" line * @since 5.0 */ @@ -305,6 +307,8 @@ public class TransferConfig { } /** + * Whether clients are allowed to specify "want-ref" line + * * @return true if clients are allowed to specify a "want-ref" line * @since 5.1 */ @@ -313,6 +317,8 @@ public class TransferConfig { } /** + * Whether the server accepts sideband-all requests + * * @return true if the server accepts sideband-all requests (see * {{@link #isAdvertiseSidebandAll()} for the advertisement) * @since 5.5 @@ -322,6 +328,8 @@ public class TransferConfig { } /** + * Whether to advertise sideband all to the clients + * * @return true to advertise sideband all to the clients * @since 5.6 */ @@ -330,6 +338,8 @@ public class TransferConfig { } /** + * Whether to advertise wait-for-done all to the clients + * * @return true to advertise wait-for-done all to the clients * @since 5.13 */ @@ -338,6 +348,8 @@ public class TransferConfig { } /** + * Whether to advertise object-info to all clients + * * @return true to advertise object-info to all clients * @since 5.13 */ @@ -346,6 +358,8 @@ public class TransferConfig { } /** + * Whether to advertise and receive session-id capability + * * @return true to advertise and receive session-id capability * @since 6.4 */ 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 50eca21c66..4a02d6d452 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/Transport.java @@ -1145,6 +1145,8 @@ public abstract class Transport implements AutoCloseable { } /** + * Get filter spec + * * @return the last filter spec set with {@link #setFilterSpec(FilterSpec)}, * or {@link FilterSpec#NO_FILTER} if it was never invoked. * @since 5.4 @@ -1154,7 +1156,10 @@ public abstract class Transport implements AutoCloseable { } /** - * @param filter a new filter to use for this transport + * Set filter spec + * + * @param filter + * a new filter to use for this transport * @since 5.4 */ public final void setFilterSpec(@NonNull FilterSpec filter) { @@ -1203,6 +1208,8 @@ public abstract class Transport implements AutoCloseable { } /** + * Get deepen-since + * * @return the deepen-since for a shallow clone * @since 6.3 */ @@ -1221,7 +1228,9 @@ public abstract class Transport implements AutoCloseable { } /** - * @return the deepen-not for a shallow clone + * Get list of deepen-not + * + * @return the list of deepen-not for a shallow clone * @since 6.3 */ public final List<String> getDeepenNots() { 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 78e9110c7c..5220057f4f 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java @@ -194,12 +194,20 @@ public class UploadPack implements Closeable { } } - /** @return non-capabilities part of the line. */ + /** + * Get non-capabilities part of the line + * + * @return non-capabilities part of the line. + */ public String getLine() { return firstWant.getLine(); } - /** @return capabilities parsed from the line. */ + /** + * Get capabilities parsed from the line + * + * @return capabilities parsed from the line. + */ public Set<String> getOptions() { if (firstWant.getAgent() != null) { Set<String> caps = new HashSet<>(firstWant.getCapabilities()); @@ -732,8 +740,11 @@ public class UploadPack implements Closeable { } /** - * @param p provider of URIs corresponding to cached packs (to support - * the packfile URIs feature) + * Set provider of cached pack URIs + * + * @param p + * provider of URIs corresponding to cached packs (to support the + * packfile URIs feature) * @since 5.5 */ public void setCachedPackUriProvider(@Nullable CachedPackUriProvider p) { 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 1cad8cde66..aaac2a72e0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/TreeWalk.java @@ -78,6 +78,8 @@ public class TreeWalk implements AutoCloseable, AttributesProvider { private static final AbstractTreeIterator[] NO_TREES = {}; /** + * Type of operation to retrieve git attributes for. + * * @since 4.2 */ public enum OperationType { 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 203669eb7a..ac973a9c1d 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -166,6 +166,8 @@ public abstract class FS { } /** + * Get buffered standard output stream + * * @return buffered standard output stream */ public TemporaryBuffer getStdout() { @@ -173,6 +175,8 @@ public abstract class FS { } /** + * Get buffered standard error stream + * * @return buffered standard error stream */ public TemporaryBuffer getStderr() { @@ -180,6 +184,8 @@ public abstract class FS { } /** + * Get the return code of the process + * * @return the return code of the process */ public int getRc() { @@ -832,6 +838,8 @@ public abstract class FS { private Duration minimalRacyInterval; /** + * Get the minimal racy interval + * * @return the measured minimal interval after a file has been modified * in which we cannot rely on lastModified to detect * modifications @@ -841,6 +849,8 @@ public abstract class FS { } /** + * Get the measured filesystem timestamp resolution + * * @return the measured filesystem timestamp resolution */ @NonNull @@ -1828,6 +1838,8 @@ public abstract class FS { } /** + * Whether the file was created successfully + * * @return {@code true} if the file was created successfully */ public boolean isCreated() { @@ -2367,6 +2379,8 @@ public abstract class FS { public static class Attributes { /** + * Whether this are attributes of a directory + * * @return true if this are the attributes of a directory */ public boolean isDirectory() { @@ -2374,6 +2388,8 @@ public abstract class FS { } /** + * Whether this are attributes of an executable file + * * @return true if this are the attributes of an executable file */ public boolean isExecutable() { @@ -2381,6 +2397,8 @@ public abstract class FS { } /** + * Whether this are the attributes of a symbolic link + * * @return true if this are the attributes of a symbolic link */ public boolean isSymbolicLink() { @@ -2388,6 +2406,8 @@ public abstract class FS { } /** + * Whether this are the attributes of a regular file + * * @return true if this are the attributes of a regular file */ public boolean isRegularFile() { @@ -2395,6 +2415,8 @@ public abstract class FS { } /** + * Get the file creation time + * * @return the time when the file was created */ public long getCreationTime() { @@ -2402,6 +2424,9 @@ public abstract class FS { } /** + * Get the time when the file was last modified in milliseconds since + * the epoch + * * @return the time (milliseconds since 1970-01-01) when this object was * last modified * @deprecated use getLastModifiedInstant instead @@ -2412,6 +2437,8 @@ public abstract class FS { } /** + * Get the time when this object was last modified + * * @return the time when this object was last modified * @since 5.1.9 */ @@ -2472,6 +2499,8 @@ public abstract class FS { } /** + * Get the length of this file + * * @return length of this file object */ public long getLength() { @@ -2481,6 +2510,8 @@ public abstract class FS { } /** + * Get the filename + * * @return the filename */ public String getName() { @@ -2488,6 +2519,8 @@ public abstract class FS { } /** + * Get the file the attributes apply to + * * @return the file the attributes apply to */ public File getFile() { 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 9d052d13fa..77c71e4bf0 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java @@ -851,6 +851,8 @@ public class FileUtils { } /** + * Whether the file exists + * * @param file * the file * @return {@code true} if the given file exists, not following symbolic @@ -964,6 +966,8 @@ public class FileUtils { } /** + * Get basic file attributes + * * @param fs * a {@link org.eclipse.jgit.util.FS} object. * @param file 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 d0b7b9fd2b..7b7c1d0886 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java @@ -43,6 +43,8 @@ public class LfsFactory { } /** + * Get the LFS factory instance + * * @return the current LFS implementation */ public static LfsFactory getInstance() { @@ -50,6 +52,8 @@ public class LfsFactory { } /** + * Set the LFS factory instance + * * @param instance * register a {@link LfsFactory} instance as the * {@link LfsFactory} implementation to use. @@ -59,6 +63,8 @@ public class LfsFactory { } /** + * Whether LFS support is available + * * @return whether LFS support is available */ public boolean isAvailable() { @@ -157,6 +163,8 @@ public class LfsFactory { } /** + * Whether LFS is enabled + * * @param db * the repository to check * @return whether LFS is enabled for the given repository locally or @@ -167,6 +175,8 @@ public class LfsFactory { } /** + * Get git attributes for given path + * * @param db * the repository * @param path @@ -289,6 +299,8 @@ public class LfsFactory { } /** + * Get stream length + * * @return the length of the stream */ public long getLength() { @@ -302,6 +314,8 @@ public class LfsFactory { */ public interface LfsInstallCommand extends Callable<Void> { /** + * Set the repository to enable LFS for + * * @param repo * the repository to enable support for. * @return The {@link LfsInstallCommand} for chaining. 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 2a287cfe78..350ec76cf9 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RefList.java @@ -357,7 +357,11 @@ public class RefList<T extends Ref> implements Iterable<Ref> { list = new Ref[Math.max(capacity, 16)]; } - /** @return number of items in this builder's internal collection. */ + /** + * Get size + * + * @return number of items in this builder's internal collection. + */ public int size() { return size; } @@ -480,7 +484,11 @@ public class RefList<T extends Ref> implements Iterable<Ref> { Arrays.fill(list, size, list.length, null); } - /** @return an unmodifiable list using this collection's backing array. */ + /** + * Get unmodifiable list based on this list + * + * @return an unmodifiable list using this collection's backing array. + */ public RefList<T> toRefList() { return new RefList<>(list, size); } |