Browse Source

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>
stable-5.8
Matthias Sohn 5 years ago
parent
commit
2161c1e5e4
  1. 2
      org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/glue/RegexPipeline.java
  2. 2
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/RepeatRule.java
  3. 2
      org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/LfsProtocolServlet.java
  4. 2
      org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectDownloadListener.java
  5. 2
      org.eclipse.jgit.lfs.server/src/org/eclipse/jgit/lfs/server/fs/ObjectUploadListener.java
  6. 2
      org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/CachingKeyPairProvider.java
  7. 2
      org.eclipse.jgit.ssh.apache/src/org/eclipse/jgit/internal/transport/sshd/proxy/HttpParser.java
  8. 2
      org.eclipse.jgit/src/org/eclipse/jgit/diff/RawText.java
  9. 3
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
  10. 4
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileReftableStack.java
  11. 4
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
  12. 2
      org.eclipse.jgit/src/org/eclipse/jgit/merge/ResolveMerger.java
  13. 4
      org.eclipse.jgit/src/org/eclipse/jgit/transport/UploadPack.java
  14. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java
  15. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/FS_Win32_Cygwin.java
  16. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/LfsFactory.java
  17. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/Monitoring.java
  18. 2
      org.eclipse.jgit/src/org/eclipse/jgit/util/sha1/SHA1.java

2
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;

2
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());
/**

2
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;

2
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;

2
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;

2
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());

2
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);

2
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) {

3
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java vendored

@ -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;

4
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();
}

4
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;

2
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}.

4
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);
}

2
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

2
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);

2
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);
}

2
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(

2
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 {

Loading…
Cancel
Save