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/.classpath2
-rw-r--r--org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--org.eclipse.jgit.lfs/META-INF/MANIFEST.MF53
-rw-r--r--org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF5
-rw-r--r--org.eclipse.jgit.lfs/OSGI-INF/l10n/plugin.properties (renamed from org.eclipse.jgit.lfs/plugin.properties)0
-rw-r--r--org.eclipse.jgit.lfs/build.properties2
-rw-r--r--org.eclipse.jgit.lfs/pom.xml4
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java1
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java4
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java1
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/Protocol.java4
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java2
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java6
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java6
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java12
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsText.java1
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java3
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java23
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java3
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java1
-rw-r--r--org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java1
21 files changed, 64 insertions, 78 deletions
diff --git a/org.eclipse.jgit.lfs/.classpath b/org.eclipse.jgit.lfs/.classpath
index 139a059adc..dde8e3fce5 100644
--- a/org.eclipse.jgit.lfs/.classpath
+++ b/org.eclipse.jgit.lfs/.classpath
@@ -2,7 +2,7 @@
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="resources"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17">
<attributes>
<attribute name="module" value="true"/>
</attributes>
diff --git a/org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs b/org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs
index 0857bc15f2..f810c7b1f7 100644
--- a/org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs
+++ b/org.eclipse.jgit.lfs/.settings/org.eclipse.jdt.core.prefs
@@ -7,9 +7,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=11
+org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=error
org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
-org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=all_standard_tags
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
@@ -115,7 +115,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
org.eclipse.jdt.core.compiler.release=enabled
-org.eclipse.jdt.core.compiler.source=11
+org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.formatter.align_assignment_statements_on_columns=false
org.eclipse.jdt.core.formatter.align_fields_grouping_blank_lines=2147483647
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
diff --git a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
index 0f3e36f573..538f556541 100644
--- a/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/MANIFEST.MF
@@ -3,32 +3,33 @@ Bundle-ManifestVersion: 2
Bundle-Name: %Bundle-Name
Automatic-Module-Name: org.eclipse.jgit.lfs
Bundle-SymbolicName: org.eclipse.jgit.lfs
-Bundle-Version: 6.6.0.qualifier
-Bundle-Localization: plugin
+Bundle-Version: 7.4.0.qualifier
+Bundle-Localization: OSGI-INF/l10n/plugin
Bundle-Vendor: %Bundle-Vendor
-Export-Package: org.eclipse.jgit.lfs;version="6.6.0",
- org.eclipse.jgit.lfs.errors;version="6.6.0",
- org.eclipse.jgit.lfs.internal;version="6.6.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="6.6.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-11
+Bundle-RequiredExecutionEnvironment: JavaSE-17
+Bundle-SCM: url=https://github.com/eclipse-jgit/jgit, connection=scm:git:https://eclipse.gerrithub.io/eclipse-jgit/jgit.git, developerConnection=scm:git:https://eclipse.gerrithub.io/a/eclipse-jgit/jgit.git
+Export-Package: org.eclipse.jgit.lfs;version="7.4.0",
+ org.eclipse.jgit.lfs.errors;version="7.4.0",
+ org.eclipse.jgit.lfs.internal;version="7.4.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="7.4.0"
Import-Package: com.google.gson;version="[2.8.2,3.0.0)",
com.google.gson.stream;version="[2.8.2,3.0.0)",
- org.eclipse.jgit.annotations;version="[6.6.0,6.7.0)";resolution:=optional,
- org.eclipse.jgit.api.errors;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.attributes;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.diff;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.dircache;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.errors;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.hooks;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.internal.storage.file;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.lib;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.nls;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.revwalk;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.storage.file;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.storage.pack;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.transport;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.transport.http;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.treewalk;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.treewalk.filter;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.util;version="[6.6.0,6.7.0)",
- org.eclipse.jgit.util.io;version="[6.6.0,6.7.0)"
+ org.eclipse.jgit.annotations;version="[7.4.0,7.5.0)";resolution:=optional,
+ org.eclipse.jgit.api.errors;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.attributes;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.diff;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.dircache;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.errors;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.hooks;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.internal.storage.file;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.lib;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.nls;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.revwalk;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.storage.file;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.storage.pack;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.transport;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.transport.http;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.treewalk;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.treewalk.filter;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.util;version="[7.4.0,7.5.0)",
+ org.eclipse.jgit.util.io;version="[7.4.0,7.5.0)"
diff --git a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
index 05e9544840..72b715cf75 100644
--- a/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
+++ b/org.eclipse.jgit.lfs/META-INF/SOURCE-MANIFEST.MF
@@ -3,5 +3,6 @@ Bundle-ManifestVersion: 2
Bundle-Name: org.eclipse.jgit.lfs - Sources
Bundle-SymbolicName: org.eclipse.jgit.lfs.source
Bundle-Vendor: Eclipse.org - JGit
-Bundle-Version: 6.6.0.qualifier
-Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="6.6.0.qualifier";roots="."
+Bundle-Version: 7.4.0.qualifier
+Bundle-SCM: url=https://github.com/eclipse-jgit/jgit, connection=scm:git:https://eclipse.gerrithub.io/eclipse-jgit/jgit.git, developerConnection=scm:git:https://eclipse.gerrithub.io/a/eclipse-jgit/jgit.git
+Eclipse-SourceBundle: org.eclipse.jgit.lfs;version="7.4.0.qualifier";roots="."
diff --git a/org.eclipse.jgit.lfs/plugin.properties b/org.eclipse.jgit.lfs/OSGI-INF/l10n/plugin.properties
index 76ead9b94f..76ead9b94f 100644
--- a/org.eclipse.jgit.lfs/plugin.properties
+++ b/org.eclipse.jgit.lfs/OSGI-INF/l10n/plugin.properties
diff --git a/org.eclipse.jgit.lfs/build.properties b/org.eclipse.jgit.lfs/build.properties
index 8148271ef3..b483ecd96b 100644
--- a/org.eclipse.jgit.lfs/build.properties
+++ b/org.eclipse.jgit.lfs/build.properties
@@ -2,6 +2,6 @@ source.. = src/,\
resources/
output.. = bin/
bin.includes = META-INF/,\
+ OSGI-INF/,\
.,\
- plugin.properties,\
about.html
diff --git a/org.eclipse.jgit.lfs/pom.xml b/org.eclipse.jgit.lfs/pom.xml
index b210bad2fe..28aa4ea7a2 100644
--- a/org.eclipse.jgit.lfs/pom.xml
+++ b/org.eclipse.jgit.lfs/pom.xml
@@ -17,7 +17,7 @@
<parent>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit-parent</artifactId>
- <version>6.6.0-SNAPSHOT</version>
+ <version>7.4.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jgit.lfs</artifactId>
@@ -71,7 +71,7 @@
<target>
<copy file="META-INF/SOURCE-MANIFEST.MF" tofile="${source-bundle-manifest}" overwrite="true"/>
<replace file="${source-bundle-manifest}">
- <replacefilter token=".qualifier" value=".${maven.build.timestamp}"/>
+ <replacefilter token=".qualifier" value=".${commit.time.version}"/>
</replace>
</target>
</configuration>
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
index f0526ff8a2..13b74dff7d 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/CleanFilter.java
@@ -95,7 +95,6 @@ public class CleanFilter extends FilterCommand {
this.aOut = new AtomicObjectOutputStream(tmpFile.toAbsolutePath());
}
- /** {@inheritDoc} */
@Override
public int run() throws IOException {
try {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
index 0a8a3faec3..72aad9b0c9 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
@@ -136,6 +136,7 @@ public class LfsPointer implements Comparable<LfsPointer> {
* @return an {@link org.eclipse.jgit.lfs.LfsPointer} or {@code null} if the
* stream was not parseable as LfsPointer
* @throws java.io.IOException
+ * if an IO error occurred
*/
@Nullable
public static LfsPointer parseLfsPointer(InputStream in)
@@ -264,7 +265,6 @@ public class LfsPointer implements Comparable<LfsPointer> {
return VERSION.equals(rest) || VERSION_LEGACY.equals(rest);
}
- /** {@inheritDoc} */
@Override
public String toString() {
return "LfsPointer: oid=" + oid.name() + ", size=" //$NON-NLS-1$ //$NON-NLS-2$
@@ -294,7 +294,7 @@ public class LfsPointer implements Comparable<LfsPointer> {
if (this == obj) {
return true;
}
- if (obj == null || getClass() != obj.getClass()) {
+ if (!(obj instanceof LfsPointer)) {
return false;
}
LfsPointer other = (LfsPointer) obj;
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
index 9b3d60812a..802835cadd 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPrePushHook.java
@@ -246,6 +246,7 @@ public class LfsPrePushHook extends PrePushHook {
.getLfsContentConnection(getRepository(), uploadAction,
METHOD_PUT);
contentServer.setDoOutput(true);
+ contentServer.setChunkedStreamingMode(256 << 10);
try (OutputStream out = contentServer
.getOutputStream()) {
long size = Files.copy(path, out);
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 f9bd1ba0f8..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
@@ -87,6 +87,8 @@ public interface Protocol {
}
/** Describes an error to be returned by the LFS batch API */
+ // TODO(ms): rename this class in next major release
+ @SuppressWarnings("JavaLangClash")
class Error {
public int code;
@@ -129,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/SmudgeFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
index c26a1bfbb3..b6515b92e1 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java
@@ -127,6 +127,7 @@ public class SmudgeFilter extends FilterCommand {
* the objects to download
* @return the paths of all mediafiles which have been downloaded
* @throws IOException
+ * if an IO error occurred
* @since 4.11
*/
public static Collection<Path> downloadLfsResource(Lfs lfs, Repository db,
@@ -217,7 +218,6 @@ public class SmudgeFilter extends FilterCommand {
return downloadedPaths;
}
- /** {@inheritDoc} */
@Override
public int run() throws IOException {
try {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java
index 3f1f0acac4..009250294e 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/AtomicObjectOutputStream.java
@@ -45,6 +45,7 @@ public class AtomicObjectOutputStream extends OutputStream {
* @param id
* a {@link org.eclipse.jgit.lfs.lib.AnyLongObjectId} object.
* @throws java.io.IOException
+ * if an IO error occurred
*/
public AtomicObjectOutputStream(Path path, AnyLongObjectId id)
throws IOException {
@@ -61,6 +62,7 @@ public class AtomicObjectOutputStream extends OutputStream {
* @param path
* a {@link java.nio.file.Path} object.
* @throws java.io.IOException
+ * if an IO error occurred
*/
public AtomicObjectOutputStream(Path path) throws IOException {
this(path, null);
@@ -78,25 +80,21 @@ public class AtomicObjectOutputStream extends OutputStream {
return id;
}
- /** {@inheritDoc} */
@Override
public void write(int b) throws IOException {
out.write(b);
}
- /** {@inheritDoc} */
@Override
public void write(byte[] b) throws IOException {
out.write(b);
}
- /** {@inheritDoc} */
@Override
public void write(byte[] b, int off, int len) throws IOException {
out.write(b, off, len);
}
- /** {@inheritDoc} */
@Override
public void close() throws IOException {
out.close();
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java
index 857ccbe056..0469337b1f 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConfig.java
@@ -70,6 +70,7 @@ public class LfsConfig {
*
* @return the delegate {@link Config}
* @throws IOException
+ * if an IO error occurred
*/
private Config getDelegate() throws IOException {
if (delegate == null) {
@@ -86,6 +87,7 @@ public class LfsConfig {
* @return The loaded lfs config
*
* @throws IOException
+ * if an IO error occurred
*/
private Config load() throws IOException {
Config result = null;
@@ -114,6 +116,7 @@ public class LfsConfig {
*
* @return the config, or <code>null</code>
* @throws IOException
+ * if an IO error occurred
*/
@Nullable
private Config loadFromWorkingTree()
@@ -139,6 +142,7 @@ public class LfsConfig {
*
* @return the config, or <code>null</code> if the entry does not exist
* @throws IOException
+ * if an IO error occurred
*/
@Nullable
private Config loadFromIndex()
@@ -162,6 +166,7 @@ public class LfsConfig {
*
* @return the config, or <code>null</code> if the file does not exist
* @throws IOException
+ * if an IO error occurred
*/
@Nullable
private Config loadFromHead() throws IOException {
@@ -207,6 +212,7 @@ public class LfsConfig {
* the key name
* @return a String value from the config, <code>null</code> if not found
* @throws IOException
+ * if an IO error occurred
*/
@Nullable
public String getString(final String section, final String subsection,
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java
index 12b688d157..1a4e85ded6 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
@@ -9,6 +9,7 @@
*/
package org.eclipse.jgit.lfs.internal;
+import static org.eclipse.jgit.lib.Constants.DEFAULT_REMOTE_NAME;
import static org.eclipse.jgit.util.HttpSupport.ENCODING_GZIP;
import static org.eclipse.jgit.util.HttpSupport.HDR_ACCEPT;
import static org.eclipse.jgit.util.HttpSupport.HDR_ACCEPT_ENCODING;
@@ -21,7 +22,7 @@ import java.net.URL;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.time.format.DateTimeFormatter;
-import java.util.LinkedList;
+import java.util.ArrayList;
import java.util.Map;
import java.util.TreeMap;
@@ -67,6 +68,7 @@ public class LfsConnectionFactory {
* @return the connection for the lfs server. e.g.
* "https://github.com/github/git-lfs.git/info/lfs"
* @throws IOException
+ * if an IO error occurred
*/
public static HttpConnection getLfsConnection(Repository db, String method,
String purpose) throws IOException {
@@ -127,8 +129,7 @@ public class LfsConnectionFactory {
// This could be done better (more precise logic), but according
// to https://github.com/git-lfs/git-lfs/issues/1759 git-lfs
// generally only supports 'origin' in an integrated workflow.
- if (lfsUrl == null && (remote.equals(
- org.eclipse.jgit.lib.Constants.DEFAULT_REMOTE_NAME))) {
+ if (lfsUrl == null && remote.equals(DEFAULT_REMOTE_NAME)) {
remoteUrl = config.getString(
ConfigConstants.CONFIG_KEY_REMOTE, remote,
ConfigConstants.CONFIG_KEY_URL);
@@ -252,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
@@ -263,7 +266,7 @@ public class LfsConnectionFactory {
Protocol.Request req = new Protocol.Request();
req.operation = operation;
if (resources != null) {
- req.objects = new LinkedList<>();
+ req.objects = new ArrayList<>();
for (LfsPointer res : resources) {
Protocol.ObjectSpec o = new Protocol.ObjectSpec();
o.oid = res.getOid().getName();
@@ -287,6 +290,7 @@ public class LfsConnectionFactory {
* no timeout can be determined, the token will be used only once.
*
* @param action
+ * action with an additional expiration timestamp
*/
public AuthCache(Protocol.ExpiringAction action) {
this.cachedAction = action;
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsText.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsText.java
index 8ef8f59f93..00b34ed3ea 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
@@ -15,6 +15,7 @@ import org.eclipse.jgit.nls.TranslationBundle;
/**
* Translation bundle for JGit LFS server
*/
+@SuppressWarnings("MissingSummary")
public class LfsText extends TranslationBundle {
/**
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
index 9016e53940..7ae805c33f 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
@@ -314,13 +314,11 @@ public final class AbbreviatedLongObjectId implements Serializable {
return mask(nibbles, word, v);
}
- /** {@inheritDoc} */
@Override
public int hashCode() {
return (int) (w1 >> 32);
}
- /** {@inheritDoc} */
@Override
public boolean equals(Object o) {
if (o instanceof AbbreviatedLongObjectId) {
@@ -355,7 +353,6 @@ public final class AbbreviatedLongObjectId implements Serializable {
return new String(b, 0, nibbles);
}
- /** {@inheritDoc} */
@SuppressWarnings("nls")
@Override
public String toString() {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AnyLongObjectId.java
index d866db4a2d..a13a60c2b8 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
@@ -41,24 +41,6 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
* @param secondObjectId
* the second identifier to compare. Must not be null.
* @return true if the two identifiers are the same.
- * @deprecated use {@link #isEqual(AnyLongObjectId, AnyLongObjectId)}
- * instead.
- */
- @Deprecated
- @SuppressWarnings("AmbiguousMethodReference")
- public static boolean equals(final AnyLongObjectId firstObjectId,
- final AnyLongObjectId secondObjectId) {
- return isEqual(firstObjectId, secondObjectId);
- }
-
- /**
- * Compare two object identifier byte sequences for equality.
- *
- * @param firstObjectId
- * the first identifier to compare. Must not be null.
- * @param secondObjectId
- * the second identifier to compare. Must not be null.
- * @return true if the two identifiers are the same.
* @since 5.4
*/
public static boolean isEqual(final AnyLongObjectId firstObjectId,
@@ -249,7 +231,6 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
return abbr.prefixCompare(this) == 0;
}
- /** {@inheritDoc} */
@Override
public final int hashCode() {
return (int) (w1 >> 32);
@@ -264,10 +245,9 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
*/
@SuppressWarnings({ "NonOverridingEquals", "AmbiguousMethodReference" })
public final boolean equals(AnyLongObjectId other) {
- return other != null ? equals(this, other) : false;
+ return other != null ? isEqual(this, other) : false;
}
- /** {@inheritDoc} */
@Override
public final boolean equals(Object o) {
if (o instanceof AnyLongObjectId) {
@@ -475,7 +455,6 @@ public abstract class AnyLongObjectId implements Comparable<AnyLongObjectId> {
dst[o--] = '0';
}
- /** {@inheritDoc} */
@SuppressWarnings("nls")
@Override
public String toString() {
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java
index 99bae49abb..75798ca0f1 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LfsPointerFilter.java
@@ -41,7 +41,6 @@ public class LfsPointerFilter extends TreeFilter {
return pointer;
}
- /** {@inheritDoc} */
@Override
public boolean include(TreeWalk walk) throws MissingObjectException,
IncorrectObjectTypeException, IOException {
@@ -63,13 +62,11 @@ public class LfsPointerFilter extends TreeFilter {
}
}
- /** {@inheritDoc} */
@Override
public boolean shouldBeRecursive() {
return false;
}
- /** {@inheritDoc} */
@Override
public TreeFilter clone() {
return new LfsPointerFilter();
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
index 15b3ca4c62..3959115462 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
@@ -256,7 +256,6 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
w4 = src.w4;
}
- /** {@inheritDoc} */
@Override
public LongObjectId toObjectId() {
return this;
diff --git a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
index 012e4ae915..5397d8135c 100644
--- a/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
+++ b/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
@@ -221,7 +221,6 @@ public class MutableLongObjectId extends AnyLongObjectId {
}
}
- /** {@inheritDoc} */
@Override
public LongObjectId toObjectId() {
return new LongObjectId(this);