aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.lfs
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit.lfs')
-rw-r--r--org.eclipse.jgit.lfs/META-INF/MANIFEST.MF28
-rw-r--r--org.eclipse.jgit.lfs/pom.xml2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java22
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Lfs.java29
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java27
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java14
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptLongObjectException.java7
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptMediaFile.java14
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/InvalidLongObjectIdException.java11
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsBandwidthLimitExceeded.java3
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsException.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsInsufficientStorage.java3
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRateLimitExceeded.java3
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryNotFound.java3
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryReadOnly.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnauthorized.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnavailable.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsValidationError.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java26
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsText.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java41
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java47
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/Constants.java13
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java7
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java4
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java34
26 files changed, 229 insertions, 121 deletions
diff --git a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
index cbd42788bc..f5ec32a55b 100644
--- a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
@@ -2,20 +2,20 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin_name
Bundle-SymbolicName: org.eclipse.jgit.lfs
-Bundle-Version: 4.9.3.qualifier
+Bundle-Version: 4.10.0.qualifier
Bundle-Localization: plugin
Bundle-Vendor: %provider_name
-Export-Package: org.eclipse.jgit.lfs;version="4.9.3",
- org.eclipse.jgit.lfs.errors;version="4.9.3",
- org.eclipse.jgit.lfs.internal;version="4.9.3";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
- org.eclipse.jgit.lfs.lib;version="4.9.3"
+Export-Package: org.eclipse.jgit.lfs;version="4.10.0",
+ org.eclipse.jgit.lfs.errors;version="4.10.0",
+ org.eclipse.jgit.lfs.internal;version="4.10.0";x-friends:="org.eclipse.jgit.lfs.test,org.eclipse.jgit.lfs.server.fs,org.eclipse.jgit.lfs.server",
+ org.eclipse.jgit.lfs.lib;version="4.10.0"
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.jgit.annotations;version="[4.9.3,4.10.0)";resolution:=optional,
- org.eclipse.jgit.attributes;version="[4.9.3,4.10.0)",
- org.eclipse.jgit.errors;version="[4.9.3,4.10.0)",
- org.eclipse.jgit.internal.storage.file;version="[4.9.3,4.10.0)",
- org.eclipse.jgit.lib;version="[4.9.3,4.10.0)",
- org.eclipse.jgit.nls;version="[4.9.3,4.10.0)",
- org.eclipse.jgit.treewalk;version="[4.9.3,4.10.0)",
- org.eclipse.jgit.treewalk.filter;version="[4.9.3,4.10.0)",
- org.eclipse.jgit.util;version="[4.9.3,4.10.0)"
+Import-Package: org.eclipse.jgit.annotations;version="[4.10.0,4.11.0)";resolution:=optional,
+ org.eclipse.jgit.attributes;version="[4.10.0,4.11.0)",
+ org.eclipse.jgit.errors;version="[4.10.0,4.11.0)",
+ org.eclipse.jgit.internal.storage.file;version="[4.10.0,4.11.0)",
+ org.eclipse.jgit.lib;version="[4.10.0,4.11.0)",
+ org.eclipse.jgit.nls;version="[4.10.0,4.11.0)",
+ org.eclipse.jgit.treewalk;version="[4.10.0,4.11.0)",
+ org.eclipse.jgit.treewalk.filter;version="[4.10.0,4.11.0)",
+ org.eclipse.jgit.util;version="[4.10.0,4.11.0)"
diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml
index 9fbf776639..ca0f410498 100644
--- a/org.eclipse.jgit.lfs/pom.xml
+++ b/org.eclipse.jgit.lfs/pom.xml
@@ -50,7 +50,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>4.9.3-SNAPSHOT</version>
+ <version>4.10.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs</artifactId>
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
index b78ee047e5..4a98286ddb 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
@@ -66,7 +66,7 @@ import org.eclipse.jgit.util.FileUtils;
* content with content of a so-called LFS pointer file. The pointer file
* content will then be added to the git repository. Additionally this filter
* writes the original content in a so-called 'media file' to '.git/lfs/objects/
- * <first-two-characters-of-contentid>/<rest-of-contentid>'
+ * &lt;first-two-characters-of-contentid&gt;/&lt;rest-of-contentid&gt;'
*
* @see <a href="https://github.com/github/git-lfs/blob/master/docs/spec.md">Git
* LFS Specification</a>
@@ -74,7 +74,8 @@ import org.eclipse.jgit.util.FileUtils;
*/
public class CleanFilter extends FilterCommand {
/**
- * The factory is responsible for creating instances of {@link CleanFilter}
+ * The factory is responsible for creating instances of
+ * {@link org.eclipse.jgit.lfs.CleanFilter}
*/
public final static FilterCommandFactory FACTORY = new FilterCommandFactory() {
@@ -109,27 +110,30 @@ public class CleanFilter extends FilterCommand {
private Path tmpFile;
/**
+ * Constructor for CleanFilter.
+ *
* @param db
* the repository
* @param in
- * an {@link InputStream} providing the original content
+ * an {@link java.io.InputStream} providing the original content
* @param out
- * the {@link OutputStream} into which the content of the pointer
- * file should be written. That's the content which will be added
- * to the git repository
- * @throws IOException
+ * the {@link java.io.OutputStream} into which the content of the
+ * pointer file should be written. That's the content which will
+ * be added to the git repository
+ * @throws java.io.IOException
* when the creation of the temporary file fails or when no
- * {@link OutputStream} for this file can be created
+ * {@link java.io.OutputStream} for this file can be created
*/
public CleanFilter(Repository db, InputStream in, OutputStream out)
throws IOException {
super(in, out);
- lfsUtil = new Lfs(db.getDirectory().toPath().resolve("lfs")); //$NON-NLS-1$
+ lfsUtil = new Lfs(FileUtils.toPath(db.getDirectory()).resolve("lfs")); //$NON-NLS-1$
Files.createDirectories(lfsUtil.getLfsTmpDir());
tmpFile = lfsUtil.createTmpFile();
this.aOut = new AtomicObjectOutputStream(tmpFile.toAbsolutePath());
}
+ /** {@inheritDoc} */
@Override
public int run() throws IOException {
try {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Lfs.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Lfs.java
index 75e34e0f63..138996d82f 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Lfs.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Lfs.java
@@ -49,7 +49,7 @@ import java.nio.file.Path;
import org.eclipse.jgit.lfs.lib.AnyLongObjectId;
/**
- * Class which represents the lfs folder hierarchy inside a .git folder
+ * Class which represents the lfs folder hierarchy inside a {@code .git} folder
*
* @since 4.6
*/
@@ -61,14 +61,19 @@ public class Lfs {
private Path tmpDir;
/**
+ * Constructor for Lfs.
+ *
* @param root
- * the path to the LFS media directory. Will be "<repo>/.git/lfs"
+ * the path to the LFS media directory. Will be
+ * {@code "<repo>/.git/lfs"}
*/
public Lfs(Path root) {
this.root = root;
}
/**
+ * Get the LFS root directory
+ *
* @return the path to the LFS directory
*/
public Path getLfsRoot() {
@@ -76,8 +81,10 @@ public class Lfs {
}
/**
- * @return the path to the temp directory used by LFS. Will be
- * "<repo>/.git/lfs/tmp"
+ * Get the path to the temporary directory used by LFS.
+ *
+ * @return the path to the temporary directory used by LFS. Will be
+ * {@code <repo>/.git/lfs/tmp}
*/
public Path getLfsTmpDir() {
if (tmpDir == null) {
@@ -87,8 +94,10 @@ public class Lfs {
}
/**
+ * Get the object directory used by LFS
+ *
* @return the path to the object directory used by LFS. Will be
- * "<repo>/.git/lfs/objects"
+ * {@code <repo>/.git/lfs/objects}
*/
public Path getLfsObjDir() {
if (objDir == null) {
@@ -98,11 +107,13 @@ public class Lfs {
}
/**
+ * Get the media file which stores the original content
+ *
* @param id
* the id of the mediafile
- * @return the file which stores the original content. This will be files
- * underneath
- * "<repo>/.git/lfs/objects/<firstTwoLettersOfID>/<remainingLettersOfID>"
+ * @return the file which stores the original content. Its path will look
+ * like
+ * {@code "<repo>/.git/lfs/objects/<firstTwoLettersOfID>/<remainingLettersOfID>"}
*/
public Path getMediaFile(AnyLongObjectId id) {
String idStr = id.name();
@@ -114,7 +125,7 @@ public class Lfs {
* Create a new temp file in the LFS directory
*
* @return a new temporary file in the LFS directory
- * @throws IOException
+ * @throws java.io.IOException
* when the temp file could not be created
*/
public Path createTmpFile() throws IOException {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
index 0f62025be5..360453116f 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
@@ -42,6 +42,8 @@
*/
package org.eclipse.jgit.lfs;
+import static java.nio.charset.StandardCharsets.UTF_8;
+
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
@@ -49,7 +51,6 @@ import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
-import java.nio.charset.StandardCharsets;
import java.nio.charset.UnsupportedCharsetException;
import java.util.Locale;
@@ -87,6 +88,8 @@ public class LfsPointer {
private long size;
/**
+ * <p>Constructor for LfsPointer.</p>
+ *
* @param oid
* the id of the content
* @param size
@@ -98,6 +101,8 @@ public class LfsPointer {
}
/**
+ * <p>Getter for the field <code>oid</code>.</p>
+ *
* @return the id of the content
*/
public AnyLongObjectId getOid() {
@@ -105,6 +110,8 @@ public class LfsPointer {
}
/**
+ * <p>Getter for the field <code>size</code>.</p>
+ *
* @return the size of the content
*/
public long getSize() {
@@ -115,12 +122,12 @@ public class LfsPointer {
* Encode this object into the LFS format defined by {@link #VERSION}
*
* @param out
- * the {@link OutputStream} into which the encoded data should be
+ * the {@link java.io.OutputStream} into which the encoded data should be
* written
*/
public void encode(OutputStream out) {
try (PrintStream ps = new PrintStream(out, false,
- StandardCharsets.UTF_8.name())) {
+ UTF_8.name())) {
ps.print("version "); //$NON-NLS-1$
ps.print(VERSION + "\n"); //$NON-NLS-1$
ps.print("oid " + HASH_FUNCTION_NAME + ":"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -129,8 +136,7 @@ public class LfsPointer {
ps.print(size + "\n"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e) {
// should not happen, we are using a standard charset
- throw new UnsupportedCharsetException(
- StandardCharsets.UTF_8.name());
+ throw new UnsupportedCharsetException(UTF_8.name());
}
}
@@ -139,10 +145,10 @@ public class LfsPointer {
* {@link #VERSION}
*
* @param in
- * the {@link InputStream} from where to read the data
- * @return an {@link LfsPointer} or <code>null</code> if the stream was not
- * parseable as LfsPointer
- * @throws IOException
+ * the {@link java.io.InputStream} from where to read the data
+ * @return an {@link org.eclipse.jgit.lfs.LfsPointer} or <code>null</code>
+ * if the stream was not parseable as LfsPointer
+ * @throws java.io.IOException
*/
@Nullable
public static LfsPointer parseLfsPointer(InputStream in)
@@ -152,7 +158,7 @@ public class LfsPointer {
long sz = -1;
try (BufferedReader br = new BufferedReader(
- new InputStreamReader(in, StandardCharsets.UTF_8.name()))) {
+ new InputStreamReader(in, UTF_8))) {
for (String s = br.readLine(); s != null; s = br.readLine()) {
if (s.startsWith("#") || s.length() == 0) { //$NON-NLS-1$
continue;
@@ -173,6 +179,7 @@ public class LfsPointer {
return null;
}
+ /** {@inheritDoc} */
@Override
public String toString() {
return "LfsPointer: oid=" + oid.name() + ", size=" //$NON-NLS-1$ //$NON-NLS-2$
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
index 233247779d..941edec1d8 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
@@ -53,6 +53,7 @@ import org.eclipse.jgit.attributes.FilterCommandFactory;
import org.eclipse.jgit.attributes.FilterCommandRegistry;
import org.eclipse.jgit.lfs.lib.Constants;
import org.eclipse.jgit.lib.Repository;
+import org.eclipse.jgit.util.FileUtils;
/**
* Built-in LFS smudge filter
@@ -69,7 +70,8 @@ import org.eclipse.jgit.lib.Repository;
*/
public class SmudgeFilter extends FilterCommand {
/**
- * The factory is responsible for creating instances of {@link SmudgeFilter}
+ * The factory is responsible for creating instances of
+ * {@link org.eclipse.jgit.lfs.SmudgeFilter}
*/
public final static FilterCommandFactory FACTORY = new FilterCommandFactory() {
@Override
@@ -92,15 +94,20 @@ public class SmudgeFilter extends FilterCommand {
private Lfs lfs;
/**
+ * Constructor for SmudgeFilter.
+ *
* @param db
+ * a {@link org.eclipse.jgit.lib.Repository} object.
* @param in
+ * a {@link java.io.InputStream} object.
* @param out
- * @throws IOException
+ * a {@link java.io.OutputStream} object.
+ * @throws java.io.IOException
*/
public SmudgeFilter(Repository db, InputStream in, OutputStream out)
throws IOException {
super(in, out);
- lfs = new Lfs(db.getDirectory().toPath().resolve(Constants.LFS));
+ lfs = new Lfs(FileUtils.toPath(db.getDirectory()).resolve(Constants.LFS));
LfsPointer res = LfsPointer.parseLfsPointer(in);
if (res != null) {
Path mediaFile = lfs.getMediaFile(res.getOid());
@@ -110,6 +117,7 @@ public class SmudgeFilter extends FilterCommand {
}
}
+ /** {@inheritDoc} */
@Override
public int run() throws IOException {
int b;
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptLongObjectException.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptLongObjectException.java
index fea148b884..d45a0ee8c5 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptLongObjectException.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptLongObjectException.java
@@ -66,8 +66,7 @@ public class CorruptLongObjectException extends IllegalArgumentException {
* id of the long object
* @param contentHash
* hash of the long object's content
- *
- * @param message
+ * @param message a {@link java.lang.String} object.
*/
public CorruptLongObjectException(AnyLongObjectId id,
AnyLongObjectId contentHash,
@@ -78,6 +77,8 @@ public class CorruptLongObjectException extends IllegalArgumentException {
}
/**
+ * Get the <code>id</code> of the object.
+ *
* @return the id of the object, i.e. the expected hash of the object's
* content
*/
@@ -86,6 +87,8 @@ public class CorruptLongObjectException extends IllegalArgumentException {
}
/**
+ * Get the <code>contentHash</code>.
+ *
* @return the actual hash of the object's content which doesn't match the
* object's id when this exception is thrown which signals that the
* object has been corrupted
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptMediaFile.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptMediaFile.java
index f2b51c0442..08ef8074b2 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptMediaFile.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/CorruptMediaFile.java
@@ -63,9 +63,11 @@ public class CorruptMediaFile extends IOException {
private long size;
/**
- * @param mediaFile
- * @param expectedSize
- * @param size
+ * <p>Constructor for CorruptMediaFile.</p>
+ *
+ * @param mediaFile a {@link java.nio.file.Path} object.
+ * @param expectedSize a long.
+ * @param size a long.
*/
@SuppressWarnings("boxing")
public CorruptMediaFile(Path mediaFile, long expectedSize,
@@ -78,6 +80,8 @@ public class CorruptMediaFile extends IOException {
}
/**
+ * Get the <code>mediaFile</code>.
+ *
* @return the media file which seems to be corrupt
*/
public Path getMediaFile() {
@@ -85,6 +89,8 @@ public class CorruptMediaFile extends IOException {
}
/**
+ * Get the <code>expectedSize</code>.
+ *
* @return the expected size of the media file
*/
public long getExpectedSize() {
@@ -92,6 +98,8 @@ public class CorruptMediaFile extends IOException {
}
/**
+ * Get the <code>size</code>.
+ *
* @return the actual size of the media file in the file system
*/
public long getSize() {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/InvalidLongObjectIdException.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/InvalidLongObjectIdException.java
index 44ac317a16..f7bba858a8 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/InvalidLongObjectIdException.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/InvalidLongObjectIdException.java
@@ -45,7 +45,8 @@
package org.eclipse.jgit.lfs.errors;
-import java.io.UnsupportedEncodingException;
+import static java.nio.charset.StandardCharsets.US_ASCII;
+
import java.text.MessageFormat;
import org.eclipse.jgit.lfs.internal.LfsText;
@@ -71,6 +72,8 @@ public class InvalidLongObjectIdException extends IllegalArgumentException {
}
/**
+ * <p>Constructor for InvalidLongObjectIdException.</p>
+ *
* @param idString
* String containing the invalid id
*/
@@ -80,10 +83,8 @@ public class InvalidLongObjectIdException extends IllegalArgumentException {
private static String asAscii(byte[] bytes, int offset, int length) {
try {
- return new String(bytes, offset, length, "US-ASCII"); //$NON-NLS-1$
- } catch (UnsupportedEncodingException e2) {
- return ""; //$NON-NLS-1$
- } catch (StringIndexOutOfBoundsException e2) {
+ return new String(bytes, offset, length, US_ASCII);
+ } catch (StringIndexOutOfBoundsException e) {
return ""; //$NON-NLS-1$
}
}
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsBandwidthLimitExceeded.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsBandwidthLimitExceeded.java
index 1b1baec13c..949981f4d4 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsBandwidthLimitExceeded.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsBandwidthLimitExceeded.java
@@ -47,12 +47,13 @@ package org.eclipse.jgit.lfs.errors;
* Thrown when the bandwidth limit for the user or repository has been exceeded.
*
* @since 4.5
- *
*/
public class LfsBandwidthLimitExceeded extends LfsException {
private static final long serialVersionUID = 1L;
/**
+ * <p>Constructor for LfsBandwidthLimitExceeded.</p>
+ *
* @param message
* error message, which may be shown to an end-user.
*/
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsException.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsException.java
index 3b83639114..778a819d5f 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsException.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsException.java
@@ -52,6 +52,8 @@ public class LfsException extends Exception {
private static final long serialVersionUID = 1L;
/**
+ * <p>Constructor for LfsException.</p>
+ *
* @param message
* error message, which may be shown to an end-user.
*/
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsInsufficientStorage.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsInsufficientStorage.java
index 4faace9854..f8bb89cb78 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsInsufficientStorage.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsInsufficientStorage.java
@@ -47,12 +47,13 @@ package org.eclipse.jgit.lfs.errors;
* Thrown when there is insufficient storage on the server.
*
* @since 4.5
- *
*/
public class LfsInsufficientStorage extends LfsException {
private static final long serialVersionUID = 1L;
/**
+ * <p>Constructor for LfsInsufficientStorage.</p>
+ *
* @param message
* error message, which may be shown to an end-user.
*/
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRateLimitExceeded.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRateLimitExceeded.java
index 6067830418..7f7ed9b16d 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRateLimitExceeded.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRateLimitExceeded.java
@@ -47,12 +47,13 @@ package org.eclipse.jgit.lfs.errors;
* Thrown when the user has hit a rate limit with the server.
*
* @since 4.5
- *
*/
public class LfsRateLimitExceeded extends LfsException {
private static final long serialVersionUID = 1L;
/**
+ * <p>Constructor for LfsRateLimitExceeded.</p>
+ *
* @param message
* error message, which may be shown to an end-user.
*/
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryNotFound.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryNotFound.java
index 52c932a810..9fa11051af 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryNotFound.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryNotFound.java
@@ -56,9 +56,10 @@ public class LfsRepositoryNotFound extends LfsException {
private static final long serialVersionUID = 1L;
/**
+ * <p>Constructor for LfsRepositoryNotFound.</p>
+ *
* @param name
* the repository name.
- *
*/
public LfsRepositoryNotFound(String name) {
super(MessageFormat.format(LfsText.get().repositoryNotFound, name));
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryReadOnly.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryReadOnly.java
index 3610377a31..c3821fce03 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryReadOnly.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsRepositoryReadOnly.java
@@ -57,6 +57,8 @@ public class LfsRepositoryReadOnly extends LfsException {
private static final long serialVersionUID = 1L;
/**
+ * <p>Constructor for LfsRepositoryReadOnly.</p>
+ *
* @param name
* the repository name.
*/
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnauthorized.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnauthorized.java
index 62b0cde4c9..45e29ec58e 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnauthorized.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnauthorized.java
@@ -56,6 +56,8 @@ public class LfsUnauthorized extends LfsException {
private static final long serialVersionUID = 1L;
/**
+ * <p>Constructor for LfsUnauthorized.</p>
+ *
* @param operation
* the operation that was attempted.
* @param name
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnavailable.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnavailable.java
index ecb5e9ee56..285a172b8f 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnavailable.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsUnavailable.java
@@ -56,6 +56,8 @@ public class LfsUnavailable extends LfsException {
private static final long serialVersionUID = 1L;
/**
+ * Constructor for LfsUnavailable.
+ *
* @param name
* the repository name.
*/
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsValidationError.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsValidationError.java
index 5e445ecaa8..0492d3f1ab 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsValidationError.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/errors/LfsValidationError.java
@@ -53,6 +53,8 @@ public class LfsValidationError extends LfsException {
private static final long serialVersionUID = 1L;
/**
+ * Constructor for LfsValidationError.
+ *
* @param message
* error message, which may be shown to an end-user.
*/
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java
index 1598b9e818..0762ac5f14 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java
@@ -56,9 +56,9 @@ import org.eclipse.jgit.lfs.lib.Constants;
import org.eclipse.jgit.lfs.lib.LongObjectId;
/**
- * Output stream writing content to a {@link LockFile} which is committed on
- * close(). The stream checks if the hash of the stream content matches the
- * id.
+ * Output stream writing content to a
+ * {@link org.eclipse.jgit.internal.storage.file.LockFile} which is committed on
+ * close(). The stream checks if the hash of the stream content matches the id.
*/
public class AtomicObjectOutputStream extends OutputStream {
@@ -71,9 +71,13 @@ public class AtomicObjectOutputStream extends OutputStream {
private AnyLongObjectId id;
/**
+ * Constructor for AtomicObjectOutputStream.
+ *
* @param path
+ * a {@link java.nio.file.Path} object.
* @param id
- * @throws IOException
+ * a {@link org.eclipse.jgit.lfs.lib.AnyLongObjectId} object.
+ * @throws java.io.IOException
*/
public AtomicObjectOutputStream(Path path, AnyLongObjectId id)
throws IOException {
@@ -85,36 +89,46 @@ public class AtomicObjectOutputStream extends OutputStream {
}
/**
+ * Constructor for AtomicObjectOutputStream.
+ *
* @param path
- * @throws IOException
+ * a {@link java.nio.file.Path} object.
+ * @throws java.io.IOException
*/
public AtomicObjectOutputStream(Path path) throws IOException {
this(path, null);
}
/**
+ * Get the <code>id</code>.
+ *
* @return content hash of the object which was streamed through this
- * stream. May return {@code null} if called before closing this stream.
+ * stream. May return {@code null} if called before closing this
+ * stream.
*/
public @Nullable AnyLongObjectId getId() {
return id;
}
+ /** {@inheritDoc} */
@Override
public void write(int b) throws IOException {
out.write(b);
}
+ /** {@inheritDoc} */
@Override
public void write(byte[] b) throws IOException {
out.write(b);
}
+ /** {@inheritDoc} */
@Override
public void write(byte[] b, int off, int len) throws IOException {
out.write(b, off, len);
}
+ /** {@inheritDoc} */
@Override
public void close() throws IOException {
out.close();
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsText.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsText.java
index 44595887c4..ae5548c85c 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsText.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsText.java
@@ -51,6 +51,8 @@ import org.eclipse.jgit.nls.TranslationBundle;
public class LfsText extends TranslationBundle {
/**
+ * Get an instance of this translation bundle.
+ *
* @return an instance of this translation bundle
*/
public static LfsText get() {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
index e9eb0e3850..4529a25fc0 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
@@ -48,14 +48,11 @@ import java.text.MessageFormat;
import org.eclipse.jgit.lfs.errors.InvalidLongObjectIdException;
import org.eclipse.jgit.lfs.internal.LfsText;
-import org.eclipse.jgit.lib.AbbreviatedObjectId;
-import org.eclipse.jgit.lib.AnyObjectId;
-import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.util.NB;
import org.eclipse.jgit.util.RawParseUtils;
/**
- * A prefix abbreviation of an {@link LongObjectId}.
+ * A prefix abbreviation of an {@link org.eclipse.jgit.lfs.lib.LongObjectId}.
* <p>
* Enable abbreviating SHA-256 strings used by Git LFS, using sufficient leading
* digits from the LongObjectId name to still be unique within the repository
@@ -65,7 +62,7 @@ import org.eclipse.jgit.util.RawParseUtils;
* This class converts the hex string into a binary form, to make it more
* efficient for matching against an object.
*
- * Ported to SHA-256 from {@link AbbreviatedObjectId}
+ * Ported to SHA-256 from {@link org.eclipse.jgit.lib.AbbreviatedObjectId}
*
* @since 4.3
*/
@@ -117,13 +114,14 @@ public final class AbbreviatedLongObjectId implements Serializable {
}
/**
- * Convert an AbbreviatedObjectId from an {@link AnyObjectId}.
+ * Convert an AbbreviatedObjectId from an
+ * {@link org.eclipse.jgit.lib.AnyObjectId}.
* <p>
* This method copies over all bits of the Id, and is therefore complete
* (see {@link #isComplete()}).
*
* @param id
- * the {@link ObjectId} to convert from.
+ * the {@link org.eclipse.jgit.lib.ObjectId} to convert from.
* @return the converted object id.
*/
public static final AbbreviatedLongObjectId fromLongObjectId(
@@ -213,17 +211,29 @@ public final class AbbreviatedLongObjectId implements Serializable {
w4 = new_4;
}
- /** @return number of hex digits appearing in this id */
+ /**
+ * Get length
+ *
+ * @return number of hex digits appearing in this id.
+ */
public int length() {
return nibbles;
}
- /** @return true if this ObjectId is actually a complete id. */
+ /**
+ * Check if this id is complete
+ *
+ * @return true if this ObjectId is actually a complete id.
+ */
public boolean isComplete() {
return length() == Constants.LONG_OBJECT_ID_STRING_LENGTH;
}
- /** @return a complete ObjectId; null if {@link #isComplete()} is false */
+ /**
+ * Convert to LongObjectId
+ *
+ * @return a complete ObjectId; null if {@link #isComplete()} is false.
+ */
public LongObjectId toLongObjectId() {
return isComplete() ? new LongObjectId(w1, w2, w3, w4) : null;
}
@@ -321,7 +331,11 @@ public final class AbbreviatedLongObjectId implements Serializable {
return NB.compareUInt64(w4, mask(4, bs[p + 3]));
}
- /** @return value for a fan-out style map, only valid of length &gt;= 2. */
+ /**
+ * Get the first byte of this id
+ *
+ * @return value for a fan-out style map, only valid of length &gt;= 2.
+ */
public final int getFirstByte() {
return (int) (w1 >>> 56);
}
@@ -330,11 +344,13 @@ public final class AbbreviatedLongObjectId implements Serializable {
return mask(nibbles, word, v);
}
+ /** {@inheritDoc} */
@Override
public int hashCode() {
return (int) (w1 >> 32);
}
+ /** {@inheritDoc} */
@Override
public boolean equals(final Object o) {
if (o instanceof AbbreviatedLongObjectId) {
@@ -346,6 +362,8 @@ public final class AbbreviatedLongObjectId implements Serializable {
}
/**
+ * <p>name.</p>
+ *
* @return string form of the abbreviation, in lower case hexadecimal.
*/
public final String name() {
@@ -367,6 +385,7 @@ public final class AbbreviatedLongObjectId implements Serializable {
return new String(b, 0, nibbles);
}
+ /** {@inheritDoc} */
@SuppressWarnings("nls")
@Override
public String toString() {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
index caf034d933..96d6938529 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
@@ -49,17 +49,17 @@ import java.io.Writer;
import java.nio.ByteBuffer;
import org.eclipse.jgit.lib.AnyObjectId;
-import org.eclipse.jgit.lib.ObjectReader;
import org.eclipse.jgit.util.NB;
/**
* A (possibly mutable) SHA-256 abstraction.
* <p>
- * If this is an instance of {@link MutableLongObjectId} the concept of equality
+ * If this is an instance of
+ * {@link org.eclipse.jgit.lfs.lib.MutableLongObjectId} the concept of equality
* with this instance can alter at any time, if this instance is modified to
* represent a different object name.
*
- * Ported to SHA-256 from {@link AnyObjectId}
+ * Ported to SHA-256 from {@link org.eclipse.jgit.lib.AnyObjectId}
*
* @since 4.3
*/
@@ -132,14 +132,15 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @param index
* index of the byte to obtain from the raw form of the
* LongObjectId. Must be in range [0,
- * {@link Constants#LONG_OBJECT_ID_LENGTH}).
+ * {@link org.eclipse.jgit.lfs.lib.Constants#LONG_OBJECT_ID_LENGTH}).
* @return the value of the requested byte at {@code index}. Returned values
* are unsigned and thus are in the range [0,255] rather than the
* signed byte range of [-128, 127].
- * @throws ArrayIndexOutOfBoundsException
+ * @throws java.lang.ArrayIndexOutOfBoundsException
* {@code index} is less than 0, equal to
- * {@link Constants#LONG_OBJECT_ID_LENGTH}, or greater than
- * {@link Constants#LONG_OBJECT_ID_LENGTH}.
+ * {@link org.eclipse.jgit.lfs.lib.Constants#LONG_OBJECT_ID_LENGTH},
+ * or greater than
+ * {@link org.eclipse.jgit.lfs.lib.Constants#LONG_OBJECT_ID_LENGTH}.
*/
public final int getByte(int index) {
long w;
@@ -164,12 +165,9 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
}
/**
- * Compare this LongObjectId to another and obtain a sort ordering.
+ * {@inheritDoc}
*
- * @param other
- * the other id to compare to. Must not be null.
- * @return &lt; 0 if this id comes before other; 0 if this id is equal to
- * other; &gt; 0 if this id comes after other.
+ * Compare this LongObjectId to another and obtain a sort ordering.
*/
@Override
public final int compareTo(final AnyLongObjectId other) {
@@ -263,6 +261,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
return abbr.prefixCompare(this) == 0;
}
+ /** {@inheritDoc} */
@Override
public final int hashCode() {
return (int) (w1 >> 32);
@@ -279,6 +278,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
return other != null ? equals(this, other) : false;
}
+ /** {@inheritDoc} */
@Override
public final boolean equals(final Object o) {
if (o instanceof AnyLongObjectId)
@@ -335,7 +335,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
*
* @param w
* the stream to write to.
- * @throws IOException
+ * @throws java.io.IOException
* the stream writing failed.
*/
public void copyRawTo(final OutputStream w) throws IOException {
@@ -362,7 +362,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
*
* @param w
* the stream to copy to.
- * @throws IOException
+ * @throws java.io.IOException
* the stream writing failed.
*/
public void copyTo(final OutputStream w) throws IOException {
@@ -421,7 +421,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
*
* @param w
* the stream to copy to.
- * @throws IOException
+ * @throws java.io.IOException
* the stream writing failed.
*/
public void copyTo(final Writer w) throws IOException {
@@ -437,7 +437,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* of object id (64 characters or larger).
* @param w
* the stream to copy to.
- * @throws IOException
+ * @throws java.io.IOException
* the stream writing failed.
*/
public void copyTo(final char[] tmp, final Writer w) throws IOException {
@@ -486,6 +486,7 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
dst[o--] = '0';
}
+ /** {@inheritDoc} */
@SuppressWarnings("nls")
@Override
public String toString() {
@@ -493,6 +494,8 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
}
/**
+ * Get string form of the SHA-256
+ *
* @return string form of the SHA-256, in lower case hexadecimal.
*/
public final String name() {
@@ -500,6 +503,8 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
}
/**
+ * Get string form of the SHA-256
+ *
* @return string form of the SHA-256, in lower case hexadecimal.
*/
public final String getName() {
@@ -510,8 +515,10 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* Return an abbreviation (prefix) of this object SHA-256.
* <p>
* This implementation does not guarantee uniqueness. Callers should instead
- * use {@link ObjectReader#abbreviate(AnyObjectId, int)} to obtain a unique
- * abbreviation within the scope of a particular object database.
+ * use
+ * {@link org.eclipse.jgit.lib.ObjectReader#abbreviate(AnyObjectId, int)} to
+ * obtain a unique abbreviation within the scope of a particular object
+ * database.
*
* @param len
* length of the abbreviated string.
@@ -529,8 +536,8 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* Obtain an immutable copy of this current object.
* <p>
* Only returns <code>this</code> if this instance is an unsubclassed
- * instance of {@link LongObjectId}; otherwise a new instance is returned
- * holding the same value.
+ * instance of {@link org.eclipse.jgit.lfs.lib.LongObjectId}; otherwise a
+ * new instance is returned holding the same value.
* <p>
* This method is useful to shed any additional memory that may be tied to
* the subclass, yet retain the unique identity of the object id for future
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/Constants.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/Constants.java
index 0220743724..d5b96ab0fd 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/Constants.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/Constants.java
@@ -52,7 +52,7 @@ import org.eclipse.jgit.lfs.internal.LfsText;
* Misc. constants used throughout JGit LFS extension.
*
* @since 4.3
- **/
+ */
@SuppressWarnings("nls")
public final class Constants {
/**
@@ -111,7 +111,7 @@ public final class Constants {
* Create a new digest function for objects.
*
* @return a new digest object.
- * @throws RuntimeException
+ * @throws java.lang.RuntimeException
* this Java virtual machine does not support the required hash
* function. Very unlikely given that JGit uses a hash function
* that is in the Java reference specification.
@@ -133,14 +133,15 @@ public final class Constants {
}
/**
- * Content type used by LFS REST API as defined in
- * {@link "https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md"}
+ * Content type used by LFS REST API as defined in <a href=
+ * "https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md">
+ * https://github.com/github/git-lfs/blob/master/docs/api/v1/http-v1-batch.md</a>
*/
public static final String CONTENT_TYPE_GIT_LFS_JSON = "application/vnd.git-lfs+json";
/**
- * "arbitrary binary data" as defined in RFC 2046
- * {@link "https://www.ietf.org/rfc/rfc2046.txt"}
+ * "Arbitrary binary data" as defined in
+ * <a href="https://www.ietf.org/rfc/rfc2046.txt">RFC 2046</a>
*/
public static final String HDR_APPLICATION_OCTET_STREAM = "application/octet-stream";
}
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java
index 6f672b88f0..dcc915d9fd 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java
@@ -66,12 +66,15 @@ public class LfsPointerFilter extends TreeFilter {
private LfsPointer pointer;
/**
- * @return {@link LfsPointer} or {@code null}
+ * Get the field <code>pointer</code>.
+ *
+ * @return {@link org.eclipse.jgit.lfs.LfsPointer} or {@code null}
*/
public LfsPointer getPointer() {
return pointer;
}
+ /** {@inheritDoc} */
@Override
public boolean include(TreeWalk walk) throws MissingObjectException,
IncorrectObjectTypeException, IOException {
@@ -91,11 +94,13 @@ public class LfsPointerFilter extends TreeFilter {
}
}
+ /** {@inheritDoc} */
@Override
public boolean shouldBeRecursive() {
return false;
}
+ /** {@inheritDoc} */
@Override
public TreeFilter clone() {
return new LfsPointerFilter();
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
index c4a4e43b12..ec1e1791db 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
@@ -49,14 +49,13 @@ import java.io.ObjectOutputStream;
import java.io.Serializable;
import org.eclipse.jgit.lfs.errors.InvalidLongObjectIdException;
-import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.util.NB;
import org.eclipse.jgit.util.RawParseUtils;
/**
* A SHA-256 abstraction.
*
- * Ported to SHA-256 from {@link ObjectId}
+ * Ported to SHA-256 from {@link org.eclipse.jgit.lib.ObjectId}
*
* @since 4.3
*/
@@ -288,6 +287,7 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
w4 = src.w4;
}
+ /** {@inheritDoc} */
@Override
public LongObjectId toObjectId() {
return this;
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
index 130e94ed0b..7b0c49444a 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
@@ -47,14 +47,13 @@ import java.text.MessageFormat;
import org.eclipse.jgit.lfs.errors.InvalidLongObjectIdException;
import org.eclipse.jgit.lfs.internal.LfsText;
-import org.eclipse.jgit.lib.MutableObjectId;
import org.eclipse.jgit.util.NB;
import org.eclipse.jgit.util.RawParseUtils;
/**
* A mutable SHA-256 abstraction.
*
- * Ported to SHA-256 from {@link MutableObjectId}
+ * Ported to SHA-256 from {@link org.eclipse.jgit.lib.MutableObjectId}
*
* @since 4.3
*/
@@ -81,15 +80,17 @@ public class MutableLongObjectId extends AnyLongObjectId {
*
* @param index
* index of the byte to set in the raw form of the ObjectId. Must
- * be in range [0, {@link Constants#LONG_OBJECT_ID_LENGTH}).
+ * be in range [0,
+ * {@link org.eclipse.jgit.lfs.lib.Constants#LONG_OBJECT_ID_LENGTH}).
* @param value
* the value of the specified byte at {@code index}. Values are
* unsigned and thus are in the range [0,255] rather than the
* signed byte range of [-128, 127].
- * @throws ArrayIndexOutOfBoundsException
+ * @throws java.lang.ArrayIndexOutOfBoundsException
* {@code index} is less than 0, equal to
- * {@link Constants#LONG_OBJECT_ID_LENGTH}, or greater than
- * {@link Constants#LONG_OBJECT_ID_LENGTH}.
+ * {@link org.eclipse.jgit.lfs.lib.Constants#LONG_OBJECT_ID_LENGTH},
+ * or greater than
+ * {@link org.eclipse.jgit.lfs.lib.Constants#LONG_OBJECT_ID_LENGTH}.
*/
public void setByte(int index, int value) {
switch (index >> 3) {
@@ -135,7 +136,10 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
}
- /** Make this id match {@link LongObjectId#zeroId()}. */
+ /**
+ * Make this id match
+ * {@link org.eclipse.jgit.lfs.lib.LongObjectId#zeroId()}.
+ */
public void clear() {
w1 = 0;
w2 = 0;
@@ -144,7 +148,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
/**
- * Copy an LongObjectId into this mutable buffer.
+ * Copy a LongObjectId into this mutable buffer.
*
* @param src
* the source id to copy from.
@@ -157,7 +161,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
/**
- * Convert an LongObjectId from raw binary representation.
+ * Convert a LongObjectId from raw binary representation.
*
* @param bs
* the raw byte buffer to read from. At least 32 bytes must be
@@ -168,7 +172,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
/**
- * Convert an LongObjectId from raw binary representation.
+ * Convert a LongObjectId from raw binary representation.
*
* @param bs
* the raw byte buffer to read from. At least 32 bytes after p
@@ -184,7 +188,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
/**
- * Convert an LongObjectId from binary representation expressed in integers.
+ * Convert a LongObjectId from binary representation expressed in integers.
*
* @param longs
* the raw long buffer to read from. At least 4 longs must be
@@ -195,14 +199,13 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
/**
- * Convert an LongObjectId from binary representation expressed in longs.
+ * Convert a LongObjectId from binary representation expressed in longs.
*
* @param longs
* the raw int buffer to read from. At least 4 longs after p must
* be available within this longs array.
* @param p
* position to read the first integer of data from.
- *
*/
public void fromRaw(final long[] longs, final int p) {
w1 = longs[p];
@@ -212,7 +215,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
/**
- * Convert an LongObjectId from hex characters (US-ASCII).
+ * Convert a LongObjectId from hex characters (US-ASCII).
*
* @param buf
* the US-ASCII buffer to read from. At least 32 bytes after
@@ -225,7 +228,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
/**
- * Convert an LongObjectId from hex characters.
+ * Convert a LongObjectId from hex characters.
*
* @param str
* the string to read from. Must be 64 characters long.
@@ -249,6 +252,7 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
}
+ /** {@inheritDoc} */
@Override
public LongObjectId toObjectId() {
return new LongObjectId(this);