summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2020-02-28 23:53:17 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2020-02-28 23:53:32 +0100
commit2161c1e5e4a53b3c56256389b3fc388b3c51d82d (patch)
treeeae18f22ac7ebdae4ab8bf2d9a9c0f18e87cb919
parent8244aa5faf0020df4a6346ef154213f2d84162e4 (diff)
parent6f268f8cebbc53a9810f0fe6ca1a961a32d8b074 (diff)
downloadjgit-2161c1e5e4a53b3c56256389b3fc388b3c51d82d.tar.gz
jgit-2161c1e5e4a53b3c56256389b3fc388b3c51d82d.zip
Merge branch 'stable-5.6'
* stable-5.6: Cygwin expects forward slashes for commands to be run via sh.exe Make Logger instances final Move array designators from the variable to the type Change-Id: I9a5dc570deb478525bf48ef526d8cba5b19418bf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java2
-rw-r--r--org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java2
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java2
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java2
-rw-r--r--org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java2
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java2
-rw-r--r--org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java3
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java4
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java2
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java2
18 files changed, 22 insertions, 21 deletions
diff --git a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
index 04266ec33c..431202b2ba 100644
--- a/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
+++ b/org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
@@ -105,7 +105,7 @@ class RegexPipeline extends UrlPipeline {
// build a request for them so RegexGroupFilter can pick
// a different capture group later. Continue using the
// first capture group as the path info.
- WrappedRequest groups[] = new WrappedRequest[cur.groupCount()];
+ WrappedRequest[] groups = new WrappedRequest[cur.groupCount()];
for (int groupId = 1; groupId <= cur.groupCount(); groupId++) {
final int s = cur.start(groupId);
final String path, info;
diff --git a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java
index 02734741cb..3db3ba90c2 100644
--- a/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java
+++ b/org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java
@@ -45,7 +45,7 @@ import org.junit.runners.model.Statement;
*/
public class RepeatRule implements TestRule {
- private static Logger LOG = Logger
+ private static final Logger LOG = Logger
.getLogger(RepeatRule.class.getName());
/**
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 eeacbc2f0d..3ec08ecc83 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
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
* @since 4.3
*/
public abstract class LfsProtocolServlet extends HttpServlet {
- private static Logger LOG = LoggerFactory
+ private static final Logger LOG = LoggerFactory
.getLogger(LfsProtocolServlet.class);
private static final long serialVersionUID = 1L;
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
index 28f3d94c9b..cc57947a79 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
@@ -34,7 +34,7 @@ import org.eclipse.jgit.util.HttpSupport;
*/
public class ObjectDownloadListener implements WriteListener {
- private static Logger LOG = Logger
+ private static final Logger LOG = Logger
.getLogger(ObjectDownloadListener.class.getName());
private final AsyncContext context;
diff --git a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java
index 95f941946c..f5212fe259 100644
--- a/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java
+++ b/org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java
@@ -38,7 +38,7 @@ import org.eclipse.jgit.lfs.lib.Constants;
*/
public class ObjectUploadListener implements ReadListener {
- private static Logger LOG = Logger
+ private static final Logger LOG = Logger
.getLogger(ObjectUploadListener.class.getName());
private final AsyncContext context;
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
index 457186ae57..2ce69901c1 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
@@ -88,7 +88,7 @@ public class CachingKeyPairProvider extends FileKeyPairProvider
if (cache == null) {
return loadKey(session, resource, path, getPasswordFinder());
}
- Throwable t[] = { null };
+ Throwable[] t = { null };
KeyPair key = cache.get(path, p -> {
try {
return loadKey(session, resource, p, getPasswordFinder());
diff --git a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java
index 357b7e4f72..d5b80374cb 100644
--- a/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java
+++ b/org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java
@@ -216,7 +216,7 @@ public final class HttpParser {
start = nextStart + 1;
} else {
if (header.charAt(nextStart) == '"') {
- int nextEnd[] = { nextStart + 1 };
+ int[] nextEnd = { nextStart + 1 };
String value = scanQuotedString(header, nextStart + 1,
nextEnd);
challenge.addArgument(header.substring(start, end), value);
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 6abefc02d7..9f4b1fa493 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
@@ -415,7 +415,7 @@ public class RawText extends Sequence {
}
}
- byte data[];
+ byte[] data;
try {
data = new byte[(int)sz];
} catch (OutOfMemoryError e) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
index fdc89cd54d..e8e1984306 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
@@ -79,7 +79,8 @@ import org.slf4j.LoggerFactory;
* This class handles checking out one or two trees merging with the index.
*/
public class DirCacheCheckout {
- private static Logger LOG = LoggerFactory.getLogger(DirCacheCheckout.class);
+ private static final Logger LOG = LoggerFactory
+ .getLogger(DirCacheCheckout.class);
private static final int MAX_EXCEPTION_TEXT_SIZE = 10 * 1024;
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 cded6700ad..bc2039c56b 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
@@ -649,7 +649,7 @@ public class FileReftableStack implements AutoCloseable {
}
}
- static List<Segment> segmentSizes(long sizes[]) {
+ static List<Segment> segmentSizes(long[] sizes) {
List<Segment> segments = new ArrayList<>();
Segment cur = new Segment();
for (int i = 0; i < sizes.length; i++) {
@@ -669,7 +669,7 @@ public class FileReftableStack implements AutoCloseable {
return segments;
}
- private static Optional<Segment> autoCompactCandidate(long sizes[]) {
+ private static Optional<Segment> autoCompactCandidate(long[] sizes) {
if (sizes.length == 0) {
return Optional.empty();
}
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 057970ecac..75dd345f46 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
@@ -191,7 +191,7 @@ public class PackWriter implements AutoCloseable {
}
@SuppressWarnings("unchecked")
- BlockList<ObjectToPack> objectsLists[] = new BlockList[OBJ_TAG + 1];
+ BlockList<ObjectToPack>[] objectsLists = new BlockList[OBJ_TAG + 1];
{
objectsLists[OBJ_COMMIT] = new BlockList<>();
objectsLists[OBJ_TREE] = new BlockList<>();
@@ -236,7 +236,7 @@ public class PackWriter implements AutoCloseable {
private List<ObjectToPack> sortedByName;
- private byte packcsum[];
+ private byte[] packcsum;
private boolean deltaBaseAsOffset;
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 4b301c41f4..575e7bd285 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
@@ -110,7 +110,7 @@ public class ResolveMerger extends ThreeWayMerger {
*
* @since 3.0
*/
- protected String commitNames[];
+ protected String[] commitNames;
/**
* Index of the base tree within the {@link #tw tree walk}.
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 09ca7ca60f..35196c6e34 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
@@ -2378,12 +2378,12 @@ public class UploadPack {
}
@Override
- public void write(byte b[]) throws IOException {
+ public void write(byte[] b) throws IOException {
out.write(b);
}
@Override
- public void write(byte b[], int off, int len) throws IOException {
+ public void write(byte[] b, int off, int len) throws IOException {
out.write(b, off, len);
}
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 f747d1a157..cae3c394c2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
@@ -2270,7 +2270,7 @@ public abstract class FS {
void copy() throws IOException {
boolean writeFailure = false;
- byte buffer[] = new byte[4096];
+ byte[] buffer = new byte[4096];
int readBytes;
while ((readBytes = in.read(buffer)) != -1) {
// Do not try to write again after a failure, but keep
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
index dd39416bb0..82b2818a40 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
@@ -117,7 +117,7 @@ public class FS_Win32_Cygwin extends FS_Win32 {
argv.add("sh.exe"); //$NON-NLS-1$
argv.add("-c"); //$NON-NLS-1$
argv.add("$0 \"$@\""); //$NON-NLS-1$
- argv.add(cmd);
+ argv.add(cmd.replace(File.separatorChar, '/'));
argv.addAll(Arrays.asList(args));
ProcessBuilder proc = new ProcessBuilder();
proc.command(argv);
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 230d89008a..7456c71f5f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java
@@ -280,7 +280,7 @@ public class LfsFactory {
}
@Override
- public int read(byte b[], int off, int len) throws IOException {
+ public int read(byte[] b, int off, int len) throws IOException {
return stream.read(b, off, len);
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java
index cd2a8e672d..500c236730 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java
@@ -49,7 +49,7 @@ public class Monitoring {
String metricName) {
boolean register = false;
try {
- Class<?> interfaces[] = mbean.getClass().getInterfaces();
+ Class<?>[] interfaces = mbean.getClass().getInterfaces();
for (Class<?> i : interfaces) {
register = SystemReader.getInstance().getUserConfig()
.getBoolean(
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java
index c896daf7e3..1420add662 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java
@@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
* @since 4.7
*/
public class SHA1 {
- private static Logger LOG = LoggerFactory.getLogger(SHA1.class);
+ private static final Logger LOG = LoggerFactory.getLogger(SHA1.class);
private static final boolean DETECT_COLLISIONS;
static {