Merge "ObjectWalk: Add null check before skip tree."
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 04266ec..431202b 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 @@
 				// 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 0273474..3db3ba9 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 @@
  */
 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 eeacbc2..3ec08ec 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 @@
  * @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 28f3d94..cc57947 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 @@
  */
 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 95f9419..f5212fe 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 @@
  */
 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.packaging/org.eclipse.jgit.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.properties
index d47cc01..848365e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.properties
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.feature/feature.properties
@@ -20,7 +20,7 @@
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2005, 2010 Shawn Pearce, Robin Rosenberg, et.al.\n\
+Copyright (c) 2005, 2020 Shawn Pearce, Robin Rosenberg, et.al.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Distribution License v1.0\n\
 which accompanies this distribution, and is available at\n\
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.properties
index b2fd6ed..782d5bf 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.properties
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.properties
@@ -20,7 +20,7 @@
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2005, 2013 Shawn Pearce, Robin Rosenberg, et.al.\n\
+Copyright (c) 2005, 2020 Shawn Pearce, Robin Rosenberg, et.al.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Distribution License v1.0\n\
 which accompanies this distribution, and is available at\n\
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.properties
index acf33a9..fb1de80 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.properties
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.junit.feature/feature.properties
@@ -20,7 +20,7 @@
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2010, Matthias Sohn <matthias.sohn@sap.com>\n\
+Copyright (c) 2010, 2020 Matthias Sohn <matthias.sohn@sap.com>\n\
 and other copyright owners as documented in the project's IP log.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Distribution License v1.0\n\
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.properties
index 5d953fa..858ba93 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.properties
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.lfs.feature/feature.properties
@@ -20,7 +20,7 @@
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2015, Matthias Sohn et.al.\n\
+Copyright (c) 2015, 2020 Matthias Sohn et.al.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Distribution License v1.0\n\
 which accompanies this distribution, and is available at\n\
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.properties
index 450cff4..6c1405d 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.properties
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.pgm.feature/feature.properties
@@ -20,7 +20,7 @@
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2005-2012 Shawn Pearce, Robin Rosenberg, et.al.\n\
+Copyright (c) 2005, 2020 Shawn Pearce, Robin Rosenberg, et.al.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Distribution License v1.0\n\
 which accompanies this distribution, and is available at\n\
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.properties
index 5043c32..b8e0417 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.properties
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.source.feature/feature.properties
@@ -21,7 +21,7 @@
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2005, 2010 Shawn Pearce, Robin Rosenberg, et.al.\n\
+Copyright (c) 2005, 2020 Shawn Pearce, Robin Rosenberg, et.al.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Distribution License v1.0\n\
 which accompanies this distribution, and is available at\n\
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.properties b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.properties
index e412fc2..8c38943 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.properties
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.ssh.apache.feature/feature.properties
@@ -20,7 +20,7 @@
 
 # "copyright" property - text of the "Feature Update Copyright"
 copyright=\
-Copyright (c) 2018 Thomas Wolf and others.\n\
+Copyright (c) 2018, 2020 Thomas Wolf and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Distribution License v1.0\n\
 which accompanies this distribution, and is available at\n\
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
index 1c6c95c..14ee36c 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.10" sequenceNumber="1582498070">
+<target name="jgit-4.10" sequenceNumber="1582931134">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
index e97b255..55270c8 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.11" sequenceNumber="1582498158">
+<target name="jgit-4.11" sequenceNumber="1582931154">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
index 4dff43f..81cf190 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.12" sequenceNumber="1582498158">
+<target name="jgit-4.12" sequenceNumber="1582931154">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
index a03d04c..5aa1657 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.13" sequenceNumber="1582498157">
+<target name="jgit-4.13" sequenceNumber="1582931154">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target
index ca47ea9..5b56043 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.14-staging" sequenceNumber="1582498156">
+<target name="jgit-4.14-staging" sequenceNumber="1582931151">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
index 4747817..840e093 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.6" sequenceNumber="1582498170">
+<target name="jgit-4.6" sequenceNumber="1582931168">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
index 46fead6..db50b3e 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.7" sequenceNumber="1582498162">
+<target name="jgit-4.7" sequenceNumber="1582931158">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
index d400753..c3aae7b 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.8" sequenceNumber="1582498158">
+<target name="jgit-4.8" sequenceNumber="1582931154">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
index 8c5e9ce..f2a1e15 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
 <?pde?>
 <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
-<target name="jgit-4.9" sequenceNumber="1582498159">
+<target name="jgit-4.9" sequenceNumber="1582931154">
   <locations>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@@ -84,7 +84,7 @@
       <unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/>
       <unit id="org.tukaani.xz" version="1.8.0.v20180207-1613"/>
       <unit id="org.tukaani.xz.source" version="1.8.0.v20180207-1613"/>
-      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository"/>
+      <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository"/>
     </location>
     <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
       <unit id="org.eclipse.osgi" version="0.0.0"/>
diff --git a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2020-03.tpd b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2020-03.tpd
index d010e5f..9de9957 100644
--- a/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2020-03.tpd
+++ b/org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2020-03.tpd
@@ -1,7 +1,7 @@
 target "staging-2020-03" with source configurePhase
 // see http://download.eclipse.org/tools/orbit/downloads/
 
-location "https://download.eclipse.org/tools/orbit/downloads/drops/S20200219023850/repository" {
+location "https://download.eclipse.org/tools/orbit/downloads/drops/S20200224183213/repository" {
 	com.google.gson [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
 	com.google.gson.source [2.8.2.v20180104-1110,2.8.2.v20180104-1110]
 	com.jcraft.jsch [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
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 457186a..2ce6990 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 @@
 		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 357b7e4..d5b8037 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 @@
 				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.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
index d1522e9..8623902 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RebaseCommandTest.java
@@ -563,10 +563,10 @@
 			RevCommit newD = rw.next();
 			assertDerivedFrom(newD, d);
 			assertEquals(2, newD.getParentCount());
-			RevCommit newE = rw.next();
-			assertEquals(e, newE);
 			RevCommit newC = rw.next();
 			assertDerivedFrom(newC, c);
+			RevCommit newE = rw.next();
+			assertEquals(e, newE);
 			assertEquals(newC, newD.getParent(0));
 			assertEquals(e, newD.getParent(1));
 			assertEquals(g, rw.next());
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java
index 45225a2..4e0bba2 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revplot/PlotCommitListTest.java
@@ -254,12 +254,12 @@
 			int posI = test.commit(i).lanePos(childPositions).parents(h)
 					.getLanePos();
 			test.commit(h).lanePos(posI).parents(f);
+			test.commit(g).lanePos(childPositions).parents(a);
 			test.commit(f).lanePos(posI).parents(e, d);
-			test.commit(d).lanePos(1).parents(b);
 			test.commit(e).lanePos(posI).parents(c);
+			test.commit(d).lanePos(2).parents(b);
 			test.commit(c).lanePos(posI).parents(b);
 			test.commit(b).lanePos(posI).parents(a);
-			test.commit(g).lanePos(childPositions).parents(a);
 			test.commit(a).lanePos(0).parents();
 		}
 	}
@@ -325,42 +325,42 @@
 					.lanePos(mainPos);
 			test.commit(merge_update_eclipse)
 					.parents(add_a_clear, update_eclipse).lanePos(mainPos);
-			test.commit(update_eclipse).parents(add_Maven).lanePos(2);
 			test.commit(add_a_clear).parents(fix_broken).lanePos(mainPos);
 			test.commit(fix_broken).parents(merge_disable_comment)
 					.lanePos(mainPos);
 			test.commit(merge_disable_comment)
 					.parents(merge_resolve_handler, disable_comment)
 					.lanePos(mainPos);
-			test.commit(disable_comment).parents(clone_operation).lanePos(3);
+			test.commit(disable_comment).parents(clone_operation).lanePos(2);
 			test.commit(merge_resolve_handler)
 					.parents(clone_operation, resolve_handler).lanePos(mainPos);
-			test.commit(resolve_handler).parents(merge_fix).lanePos(4);
+			test.commit(update_eclipse).parents(add_Maven).lanePos(3);
 			test.commit(clone_operation).parents(merge_changeset_implementation)
 					.lanePos(mainPos);
 			test.commit(merge_changeset_implementation)
 					.parents(merge_disable_source, changeset_implementation)
 					.lanePos(mainPos);
-			test.commit(changeset_implementation).parents(clear_repositorycache)
-					.lanePos(1);
 			test.commit(merge_disable_source)
 					.parents(update_eclipse_iplog2, disable_source)
 					.lanePos(mainPos);
-			test.commit(disable_source).parents(merge_use_remote).lanePos(3);
 			test.commit(update_eclipse_iplog2).parents(merge_use_remote)
 					.lanePos(mainPos);
+			test.commit(disable_source).parents(merge_use_remote).lanePos(1);
 			test.commit(merge_use_remote)
 					.parents(update_eclipse_iplog, use_remote).lanePos(mainPos);
-			test.commit(use_remote).parents(clear_repositorycache).lanePos(3);
+			test.commit(changeset_implementation).parents(clear_repositorycache)
+					.lanePos(2);
 			test.commit(update_eclipse_iplog).parents(merge_add_Maven)
 					.lanePos(mainPos);
 			test.commit(merge_add_Maven).parents(findToolBar_layout, add_Maven)
 					.lanePos(mainPos);
-			test.commit(add_Maven).parents(clear_repositorycache).lanePos(2);
 			test.commit(findToolBar_layout).parents(clear_repositorycache)
 					.lanePos(mainPos);
+			test.commit(use_remote).parents(clear_repositorycache).lanePos(1);
+			test.commit(add_Maven).parents(clear_repositorycache).lanePos(3);
 			test.commit(clear_repositorycache).parents(merge_remove)
 					.lanePos(mainPos);
+			test.commit(resolve_handler).parents(merge_fix).lanePos(4);
 			test.commit(merge_remove).parents(add_simple, remove_unused)
 					.lanePos(mainPos);
 			test.commit(remove_unused).parents(merge_fix).lanePos(1);
@@ -453,36 +453,33 @@
 			pcl.source(pw);
 			pcl.fillTo(Integer.MAX_VALUE);
 
-			Set<Integer> positions = asSet(0, 1);
-			CommitListAssert test = new CommitListAssert(pcl);
-			int posA = test.commit(a5).lanePos(positions).getLanePos();
-			test.commit(a4);
-			test.commit(a3).lanePos(posA);
-			test.commit(e);
-			test.commit(d);
-			test.commit(a2).lanePos(posA);
-			int posB = test.commit(b3).lanePos(positions).getLanePos();
-			test.commit(b2).lanePos(posB);
-			test.commit(b1).lanePos(posB);
-			test.commit(c);
-			test.commit(a1).lanePos(posA);
-			test.noMoreCommits();
-			assertNotEquals("a lane is the same as b lane", posA, posB);
+			// test that the commits b1, b2 and b3 are on the same position
+			int bPos = pcl.get(9).lane.position; // b1
+			assertEquals("b2 is an a different position", bPos,
+					pcl.get(7).lane.position);
+			assertEquals("b3 is on a different position", bPos,
+					pcl.get(4).lane.position);
+
+			// test that nothing blocks the connections between b1, b2 and b3
+			assertNotEquals("b lane is blocked by c", bPos,
+					pcl.get(8).lane.position);
+			assertNotEquals("b lane is blocked by a2", bPos,
+					pcl.get(6).lane.position);
+			assertNotEquals("b lane is blocked by d", bPos,
+					pcl.get(5).lane.position);
 		}
 	}
 
 	/**
 	 * <pre>
 	 *    b3
-	 * a5 |
-	 * |  |
 	 * a4 |
 	 * | \|
 	 * |  b2
 	 * a3 |
 	 * | \|
-	 * |  b1
 	 * a2 |
+	 * |  b1
 	 * | /
 	 * a1
 	 * </pre>
@@ -497,11 +494,10 @@
 		final RevCommit a3 = commit(a2, b1);
 		final RevCommit b2 = commit(b1);
 		final RevCommit a4 = commit(a3, b2);
-		final RevCommit a5 = commit(a4);
 		final RevCommit b3 = commit(b2);
 
 		try (PlotWalk pw = new PlotWalk(db)) {
-			pw.markStart(pw.lookupCommit(a5));
+			pw.markStart(pw.lookupCommit(a4));
 			pw.markStart(pw.lookupCommit(b3));
 			PlotCommitList<PlotLane> pcl = new PlotCommitList<>();
 			pcl.source(pw);
@@ -510,12 +506,11 @@
 			Set<Integer> positions = asSet(0, 1);
 			CommitListAssert test = new CommitListAssert(pcl);
 			int posB = test.commit(b3).lanePos(positions).getLanePos();
-			int posA = test.commit(a5).lanePos(positions).getLanePos();
-			test.commit(a4).lanePos(posA);
+			int posA = test.commit(a4).lanePos(positions).getLanePos();
 			test.commit(b2).lanePos(posB);
 			test.commit(a3).lanePos(posA);
-			test.commit(b1).lanePos(posB);
 			test.commit(a2).lanePos(posA);
+			test.commit(b1).lanePos(posB);
 			test.commit(a1).lanePos(posA);
 			test.noMoreCommits();
 		}
@@ -524,17 +519,13 @@
 	/**
 	 * <pre>
 	 * a4
-	 * |
-	 * a3
-	 * | \\
-	 * a2  \\
-	 * |    \\
-	 * |  b3 ||
-	 * |  |  ||
-	 * |  b2 ||
-	 * |  | //
-	 * |  b1
-	 * |  |
+	 * |   b3
+	 * a3  |
+	 * | \\|
+	 * |   |\\
+	 * |   b2||
+	 * a2  | //
+	 * |   b1
 	 * | /
 	 * a1
 	 * </pre>
@@ -561,10 +552,10 @@
 			Set<Integer> positions = asSet(0, 1);
 			CommitListAssert test = new CommitListAssert(pcl);
 			int posA = test.commit(a4).lanePos(positions).getLanePos();
-			test.commit(a3).lanePos(posA);
-			test.commit(a2).lanePos(posA);
 			int posB = test.commit(b3).lanePos(positions).getLanePos();
+			test.commit(a3).lanePos(posA);
 			test.commit(b2).lanePos(posB);
+			test.commit(a2).lanePos(posA);
 			// b1 is not repositioned, uses "detour lane"
 			// (drawn as a double arc in the ascii graph above)
 			test.commit(b1).lanePos(posB);
@@ -578,14 +569,13 @@
 	 *      b2
 	 * a4   |
 	 * |  \ |
-	 * |    b1
-	 * a3   |
+	 * a3  \|
 	 * | \  |
 	 * |  c |
 	 * | /  |
 	 * a2   |
-	 * |    |
-	 * |   /
+	 * |    b1
+	 *     /
 	 * |  /
 	 * a1
 	 * </pre>
@@ -614,10 +604,10 @@
 			CommitListAssert test = new CommitListAssert(pcl);
 			int posB = test.commit(b2).lanePos(positions).getLanePos();
 			int posA = test.commit(a4).lanePos(positions).getLanePos();
-			test.commit(b1).lanePos(posB); // repositioned to go around c
 			test.commit(a3).lanePos(posA);
 			test.commit(c).lanePos(positions);
 			test.commit(a2).lanePos(posA);
+			test.commit(b1).lanePos(posB); // repositioned to go around c
 			test.commit(a1).lanePos(posA);
 			test.noMoreCommits();
 		}
diff --git a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkSortTest.java b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkSortTest.java
index 3f29e09..6f110fa 100644
--- a/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkSortTest.java
+++ b/org.eclipse.jgit.test/tst/org/eclipse/jgit/revwalk/RevWalkSortTest.java
@@ -144,110 +144,4 @@
 		assertCommit(d, rw.next());
 		assertNull(rw.next());
 	}
-
-        @Test
-	public void testSort_TOPO_OutOfOrderCommitTimes() throws Exception {
-		// b is committed before c2 in a different line of history.
-		//
-		final RevCommit a = commit();
-		final RevCommit c1 = commit(a);
-		final RevCommit b = commit(a);
-		final RevCommit c2 = commit(c1);
-		final RevCommit d = commit(b, c2);
-
-		rw.sort(RevSort.TOPO);
-		markStart(d);
-		assertCommit(d, rw.next());
-		assertCommit(c2, rw.next());
-		assertCommit(c1, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		assertNull(rw.next());
-	}
-
-	@Test
-	public void testSort_TOPO_MultipleLinesOfHistory() throws Exception {
-		final RevCommit a1 = commit();
-		final RevCommit b1 = commit(a1);
-		final RevCommit a2 = commit(a1, b1);
-		final RevCommit b2 = commit(b1);
-		final RevCommit b3 = commit(b1);
-		final RevCommit a3 = commit(a2, b2);
-		final RevCommit a4 = commit(a3, b3);
-
-		rw.sort(RevSort.TOPO);
-		markStart(a4);
-		assertCommit(a4, rw.next());
-		assertCommit(b3, rw.next());
-		assertCommit(a3, rw.next());
-		assertCommit(b2, rw.next());
-		assertCommit(a2, rw.next());
-		assertCommit(b1, rw.next());
-		assertCommit(a1, rw.next());
-		assertNull(rw.next());
-	}
-
-	@Test
-	public void testSort_TOPO_REVERSE_MultipleLinesOfHistory()
-			throws Exception {
-		final RevCommit a1 = commit();
-		final RevCommit b1 = commit(a1);
-		final RevCommit a2 = commit(a1, b1);
-		final RevCommit b2 = commit(b1);
-		final RevCommit b3 = commit(b1);
-		final RevCommit a3 = commit(a2, b2);
-		final RevCommit a4 = commit(a3, b3);
-
-		rw.sort(RevSort.TOPO);
-		rw.sort(RevSort.REVERSE, true);
-		markStart(a4);
-		assertCommit(a1, rw.next());
-		assertCommit(b1, rw.next());
-		assertCommit(a2, rw.next());
-		assertCommit(b2, rw.next());
-		assertCommit(a3, rw.next());
-		assertCommit(b3, rw.next());
-		assertCommit(a4, rw.next());
-		assertNull(rw.next());
-	}
-
-	@Test
-	public void testSort_TOPO_ParentOfMultipleStartChildren() throws Exception {
-		final RevCommit a = commit();
-		final RevCommit b = commit(a);
-		final RevCommit c = commit(a);
-		final RevCommit d1 = commit(a);
-		final RevCommit d2 = commit(d1);
-		final RevCommit e = commit(a);
-
-		rw.sort(RevSort.TOPO);
-		markStart(b);
-		markStart(c);
-		markStart(d2);
-		markStart(e);
-		assertCommit(e, rw.next());
-		assertCommit(d2, rw.next());
-		assertCommit(d1, rw.next());
-		assertCommit(c, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a, rw.next());
-		assertNull(rw.next());
-	}
-
-	@Test
-	public void testSort_TOPO_Uninteresting() throws Exception {
-		final RevCommit a1 = commit();
-		final RevCommit a2 = commit(a1);
-		final RevCommit a3 = commit(a2);
-		final RevCommit b = commit(a1);
-		final RevCommit a4 = commit(a3, b);
-
-		rw.sort(RevSort.TOPO);
-		markStart(a4);
-		markUninteresting(a2);
-		assertCommit(a4, rw.next());
-		assertCommit(b, rw.next());
-		assertCommit(a3, rw.next());
-		assertNull(rw.next());
-	}
 }
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index b722fbe..6678af1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -338,8 +338,7 @@
 						steps, false);
 			}
 			checkSteps(steps);
-			for (int i = 0; i < steps.size(); i++) {
-				RebaseTodoLine step = steps.get(i);
+			for (RebaseTodoLine step : steps) {
 				popSteps(1);
 				RebaseResult result = processStep(step, true);
 				if (result != null) {
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 6abefc0..9f4b1fa 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 @@
 				}
 			}
 
-			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 fdc89cd..e8e1984 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 @@
  * 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/fnmatch/FileNameMatcher.java b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java
index 3a6c413..57b90e9 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/fnmatch/FileNameMatcher.java
@@ -380,8 +380,8 @@
 	 * @return a boolean.
 	 */
 	public boolean canAppendMatch() {
-		for (int i = 0; i < heads.size(); i++) {
-			if (heads.get(i) != LastHead.INSTANCE) {
+		for (Head head : heads) {
+			if (head != LastHead.INSTANCE) {
 				return true;
 			}
 		}
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 cded670..bc2039c 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 @@
 		}
 	}
 
-	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 @@
 		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/DeltaIndex.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndex.java
index 79eaea0..7ed5def 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndex.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/DeltaIndex.java
@@ -122,8 +122,8 @@
 		// logic linear in the size of the input rather than quadratic.
 		//
 		int cnt = 0;
-		for (int i = 0; i < table.length; i++) {
-			int h = table[i];
+		for (int element : table) {
+			int h = element;
 			if (h == 0)
 				continue;
 
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 057970e..75dd345 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 @@
 	}
 
 	@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 @@
 
 	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 4b301c4..575e7bd 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 @@
 	 *
 	 * @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/revwalk/RevObject.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java
index 1abcf69..5ce4bc3 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevObject.java
@@ -151,7 +151,7 @@
 	 *            buffer to append a debug description of core RevFlags onto.
 	 */
 	protected void appendCoreFlags(StringBuilder s) {
-		s.append((flags & RevWalk.TOPO_QUEUED) != 0 ? 'o' : '-');
+		s.append((flags & RevWalk.TOPO_DELAY) != 0 ? 'o' : '-');
 		s.append((flags & RevWalk.TEMP_MARK) != 0 ? 't' : '-');
 		s.append((flags & RevWalk.REWRITE) != 0 ? 'r' : '-');
 		s.append((flags & RevWalk.UNINTERESTING) != 0 ? 'u' : '-');
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
index 383428c..f425e87 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/RevWalk.java
@@ -125,11 +125,11 @@
 	/**
 	 * Temporary mark for use within {@link TopoSortGenerator}.
 	 * <p>
-	 * This mark indicates the commit has been queued for emission in
-	 * {@link TopoSortGenerator} and can be produced. This mark is removed when
-	 * the commit has been produced.
+	 * This mark indicates the commit could not produce when it wanted to, as at
+	 * least one child was behind it. Commits with this flag are delayed until
+	 * all children have been output first.
 	 */
-	static final int TOPO_QUEUED = 1 << 5;
+	static final int TOPO_DELAY = 1 << 5;
 
 	/** Number of flag bits we keep internal for our own use. See above flags. */
 	static final int RESERVED_FLAGS = 6;
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java
index 3c553b0..7a5db43 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/TopoSortGenerator.java
@@ -17,7 +17,7 @@
 
 /** Sorts commits in topological order. */
 class TopoSortGenerator extends Generator {
-	private static final int TOPO_QUEUED = RevWalk.TOPO_QUEUED;
+	private static final int TOPO_DELAY = RevWalk.TOPO_DELAY;
 
 	private final FIFORevQueue pending;
 
@@ -47,16 +47,12 @@
 			if (c == null) {
 				break;
 			}
-			if ((c.flags & TOPO_QUEUED) == 0) {
-				for (RevCommit p : c.parents) {
-					p.inDegree++;
-
-					if (firstParent) {
-						break;
-					}
+			for (RevCommit p : c.parents) {
+				p.inDegree++;
+				if (firstParent) {
+					break;
 				}
 			}
-			c.flags |= TOPO_QUEUED;
 			pending.add(c);
 		}
 	}
@@ -75,42 +71,34 @@
 	RevCommit next() throws MissingObjectException,
 			IncorrectObjectTypeException, IOException {
 		for (;;) {
-			RevCommit c = pending.next();
-			if (c == null) {
+			final RevCommit c = pending.next();
+			if (c == null)
 				return null;
-			}
 
 			if (c.inDegree > 0) {
 				// At least one of our children is missing. We delay
 				// production until all of our children are output.
 				//
+				c.flags |= TOPO_DELAY;
 				continue;
 			}
 
-			if ((c.flags & TOPO_QUEUED) == 0) {
-				// c is a parent that already produced or a parent that
-				// was never in the priority queue and should never produce.
-				//
-				continue;
-			}
-
+			// All of our children have already produced,
+			// so it is OK for us to produce now as well.
+			//
 			for (RevCommit p : c.parents) {
-				if (--p.inDegree == 0 && (p.flags & TOPO_QUEUED) != 0) {
-					// The parent has no unproduced interesting children. unpop
-					// the parent so it goes right behind this child. This means
-					// that this parent commit may appear in "pending" more than
-					// once, but this is safe since upon the second and
-					// subsequent iterations with this commit, it will no longer
-					// have TOPO_QUEUED set, and thus will be skipped.
+				if (--p.inDegree == 0 && (p.flags & TOPO_DELAY) != 0) {
+					// This parent tried to come before us, but we are
+					// his last child. unpop the parent so it goes right
+					// behind this child.
 					//
+					p.flags &= ~TOPO_DELAY;
 					pending.unpop(p);
 				}
 				if (firstParent) {
 					break;
 				}
 			}
-
-			c.flags &= ~TOPO_QUEUED;
 			return c;
 		}
 	}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/PatternMatchRevFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/PatternMatchRevFilter.java
index 0d782e0..efb5ee5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/PatternMatchRevFilter.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/revwalk/filter/PatternMatchRevFilter.java
@@ -42,8 +42,8 @@
 	protected static final String forceToRaw(String patternText) {
 		final byte[] b = Constants.encode(patternText);
 		final StringBuilder needle = new StringBuilder(b.length);
-		for (int i = 0; i < b.length; i++)
-			needle.append((char) (b[i] & 0xff));
+		for (byte element : b)
+			needle.append((char) (element & 0xff));
 		return needle.toString();
 	}
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
index adc85a1..aec5b89 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/HttpAuthMethod.java
@@ -423,8 +423,7 @@
 
 		private static String LHEX(byte[] bin) {
 			StringBuilder r = new StringBuilder(bin.length * 2);
-			for (int i = 0; i < bin.length; i++) {
-				byte b = bin[i];
+			for (byte b : bin) {
 				r.append(LHEX[(b >>> 4) & 0x0f]);
 				r.append(LHEX[b & 0x0f]);
 			}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
index faa917a..718c8f6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/JschConfigSessionFactory.java
@@ -219,7 +219,13 @@
 
 	private static void setPreferredKeyTypesOrder(Session session) {
 		HostKeyRepository hkr = session.getHostKeyRepository();
-		List<String> known = Stream.of(hkr.getHostKey(hostName(session), null))
+		HostKey[] hostKeys = hkr.getHostKey(hostName(session), null);
+
+		if (hostKeys == null) {
+			return;
+		}
+
+		List<String> known = Stream.of(hostKeys)
 				.map(HostKey::getType)
 				.collect(toList());
 
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
index 858d1f7..06520ec 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
@@ -303,8 +303,8 @@
 			return null;
 		ByteArrayOutputStream os = new ByteArrayOutputStream(s.length());
 		byte[] bytes = s.getBytes(UTF_8);
-		for (int i = 0; i < bytes.length; ++i) {
-			int b = bytes[i] & 0xFF;
+		for (byte c : bytes) {
+			int b = c & 0xFF;
 			if (b <= 32 || (encodeNonAscii && b > 127) || b == '%'
 					|| (escapeReservedChars && reservedChars.get(b))) {
 				os.write('%');
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 09ca7ca..35196c6 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 @@
 		}
 
 		@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 f747d1a..cae3c39 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 @@
 
 		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 dd39416..82b2818 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 @@
 		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 230d890..7456c71 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 @@
 		}
 
 		@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 cd2a8e6..500c236 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 @@
 			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/QuotedString.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/QuotedString.java
index c45f009..493ca31 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/QuotedString.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/QuotedString.java
@@ -243,8 +243,8 @@
 			final byte[] out = new byte[4 * in.length + 2];
 			int o = 0;
 			out[o++] = '"';
-			for (int i = 0; i < in.length; i++) {
-				final int c = in[i] & 0xff;
+			for (byte element : in) {
+				final int c = element & 0xff;
 				if (c < quote.length) {
 					final byte style = quote[c];
 					if (style == 0) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java
index 669f738..df9c6c7 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/RawParseUtils.java
@@ -559,8 +559,8 @@
 		}
 		while (ptr < b.length - (headerName.length + 1)) {
 			boolean found = true;
-			for (int i = 0; i < headerName.length; i++) {
-				if (headerName[i] != b[ptr++]) {
+			for (byte element : headerName) {
+				if (element != b[ptr++]) {
 					found = false;
 					break;
 				}
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 c896daf..1420add 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 @@
  * @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 {