Merge branch 'stable-5.7' into stable-5.8

* stable-5.7:
  Add missing @since tags
  Add missing @since tag
  Add missing @since tags
  Remove unused import in ApacheSshTest
  Update maven plugins
  Ignore missing javadoc in test bundles
  storage: file: De-duplicate File.exists()+File.isFile()
  RefDirectory.scanRef: Re-use file existence check done in snapshot
creation
  FileSnapshot: Lazy load file store attributes cache
  Update eclipse-jarsigner-plugin to 1.3.2
  Fix p2 repository URLs

Change-Id: Ibe46e8479b57a54591ad7bd3cc29bf4a5274e43d
This commit is contained in:
Matthias Sohn 2021-12-04 18:45:20 +01:00
commit 73b3cbd26b
34 changed files with 101 additions and 60 deletions

View File

@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
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.missingJavadocTags=error
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private

View File

@ -125,6 +125,7 @@ public void setUploadPackFactory(UploadPackFactory<HttpServletRequest> f) {
*
* @param h
* A custom error handler for git-upload-pack.
* @since 5.6
*/
public void setUploadPackErrorHandler(UploadPackErrorHandler h) {
assertNotInitialized();
@ -163,6 +164,7 @@ public void setReceivePackFactory(ReceivePackFactory<HttpServletRequest> f) {
*
* @param h
* A custom error handler for git-receive-pack.
* @since 5.7
*/
public void setReceivePackErrorHandler(ReceivePackErrorHandler h) {
assertNotInitialized();

View File

@ -31,7 +31,7 @@
* If a custom handler is not specified, JGit will use the default error
* handler.
*
* @since 5.6
* @since 5.7
*/
public interface ReceivePackErrorHandler {
/**

View File

@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
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.missingJavadocTags=error
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private

View File

@ -80,6 +80,7 @@ public String toString() {
* @param userGitConfig
* set another user-level git config
* @return the old user-level git config
* @since 5.1.9
*/
public FileBasedConfig setUserGitConfig(FileBasedConfig userGitConfig) {
FileBasedConfig old = this.userGitConfig;
@ -92,6 +93,7 @@ public FileBasedConfig setUserGitConfig(FileBasedConfig userGitConfig) {
*
* @param jgitConfig
* set the jgit configuration
* @since 5.5
*/
public void setJGitConfig(FileBasedConfig jgitConfig) {
this.jgitConfig = jgitConfig;
@ -103,6 +105,7 @@ public void setJGitConfig(FileBasedConfig jgitConfig) {
* @param systemGitConfig
* the new system-level git config
* @return the old system-level config
* @since 5.1.9
*/
public FileBasedConfig setSystemGitConfig(FileBasedConfig systemGitConfig) {
FileBasedConfig old = this.systemGitConfig;

View File

@ -60,6 +60,7 @@ public static class RepeatedTestException extends RuntimeException {
*
* @param message
* the error message
* @since 5.1.9
*/
public RepeatedTestException(String message) {
super(message);

View File

@ -329,6 +329,7 @@ public static String slashify(String str) {
* greater than then the lastmodification time of lastfile.
* @throws InterruptedException
* @throws IOException
* @since 5.1.9
*/
public static Instant fsTick(File lastFile)
throws InterruptedException,

View File

@ -21,6 +21,8 @@
* This class is used when it's required to load jgit classes in separate
* classloader for each test class. It can be needed to isolate static field
* initialization between separate tests.
*
* @since 5.5
*/
public class SeparateClassloaderTestRunner extends BlockJUnit4ClassRunner {

View File

@ -337,6 +337,7 @@ public RevObject get(RevTree tree, String path)
* zero or more IDs of the commit's parents.
* @return the ID of the new commit.
* @throws Exception
* @since 5.5
*/
public ObjectId unparsedCommit(ObjectId... parents) throws Exception {
return unparsedCommit(1, tree(), parents);
@ -429,6 +430,7 @@ public RevCommit commit(final int secDelta, final RevTree tree,
* zero or more IDs of the commit's parents.
* @return the ID of the new commit.
* @throws Exception
* @since 5.5
*/
public ObjectId unparsedCommit(final int secDelta, final RevTree tree,
final ObjectId... parents) throws Exception {

View File

@ -20,6 +20,8 @@
/**
* Utility methods for handling timestamps
*
* @since 5.1.9
*/
public class TimeUtil {
/**

View File

@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
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.missingJavadocTags=error
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private

View File

@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
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.missingJavadocTags=error
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private

View File

@ -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="1590935844">
<target name="jgit-4.10" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -6,3 +6,4 @@ include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2018-12/" {
org.eclipse.osgi lazy
}

View File

@ -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="1590935852">
<target name="jgit-4.11" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -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="1590935859">
<target name="jgit-4.12" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -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="1590935871">
<target name="jgit-4.13" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -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="1590935878">
<target name="jgit-4.14" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -1,4 +1,4 @@
target "jgit-4.14-staging" with source configurePhase
target "jgit-4.14" with source configurePhase
include "projects/jetty-9.4.x.tpd"
include "orbit/R20200529191137-2020-06.tpd"
@ -6,3 +6,4 @@ include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/releases/2019-12/201912181000/" {
org.eclipse.osgi lazy
}

View File

@ -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.15" sequenceNumber="1590935883">
<target name="jgit-4.15" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -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.15" sequenceNumber="1590935890">
<target name="jgit-4.16" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>
@ -88,7 +88,7 @@
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/>
<repository location="https://download.eclipse.org/staging/2020-06/"/>
<repository location="https://download.eclipse.org/releases/2020-06/"/>
</location>
</locations>
</target>

View File

@ -1,8 +1,8 @@
target "jgit-4.15" with source configurePhase
target "jgit-4.16" with source configurePhase
include "projects/jetty-9.4.x.tpd"
include "orbit/R20200529191137-2020-06.tpd"
location "https://download.eclipse.org/staging/2020-06/" {
location "https://download.eclipse.org/releases/2020-06/" {
org.eclipse.osgi lazy
}

View File

@ -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="1590935806">
<target name="jgit-4.6" sequenceNumber="1638640073">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -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="1590935820">
<target name="jgit-4.7" sequenceNumber="1638640069">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -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="1590935828">
<target name="jgit-4.8" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -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="1590935836">
<target name="jgit-4.9" sequenceNumber="1638640066">
<locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.28.v20200408"/>
@ -20,7 +20,7 @@
<unit id="org.eclipse.jetty.servlet.source" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util" version="9.4.28.v20200408"/>
<unit id="org.eclipse.jetty.util.source" version="9.4.28.v20200408"/>
<repository id="jetty-9.4.25" location="https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/"/>
<repository id="jetty-9.4.28" location="https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/"/>
</location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="com.google.gson" version="2.8.2.v20180104-1110"/>

View File

@ -1,6 +1,6 @@
target "jetty-9.4.x" with source configurePhase
location jetty-9.4.25 "https://download.eclipse.org/jetty/updates/jetty-bundles-9.x/9.4.28.v20200408/" {
location jetty-9.4.28 "https://archive.eclipse.org/jetty/updates/jetty-bundles-9.x/jetty-bundles-9.x/9.4.28.v20200408/" {
org.eclipse.jetty.client [9.4.28.v20200408,9.4.28.v20200408]
org.eclipse.jetty.client.source [9.4.28.v20200408,9.4.28.v20200408]
org.eclipse.jetty.continuation [9.4.28.v20200408,9.4.28.v20200408]

View File

@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
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.missingJavadocTags=error
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private

View File

@ -52,7 +52,7 @@ org.eclipse.jdt.core.compiler.problem.missingJavadocComments=ignore
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.missingJavadocTags=error
org.eclipse.jdt.core.compiler.problem.missingJavadocTags=ignore
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsMethodTypeParameters=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=private

View File

@ -4,7 +4,7 @@
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.jgit.transport.CredentialsProviderUserInfo"/>
<message_argument value="org.eclipse.jgit_5.8.0"/>
<message_argument value="org.eclipse.jgit_5.8.2"/>
</message_arguments>
</filter>
</resource>
@ -12,7 +12,7 @@
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.jgit.transport.DefaultSshSessionFactory"/>
<message_argument value="org.eclipse.jgit_5.8.0"/>
<message_argument value="org.eclipse.jgit_5.8.2"/>
</message_arguments>
</filter>
</resource>
@ -20,7 +20,7 @@
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.jgit.transport.JschConfigSessionFactory"/>
<message_argument value="org.eclipse.jgit_5.8.0"/>
<message_argument value="org.eclipse.jgit_5.8.2"/>
</message_arguments>
</filter>
</resource>
@ -28,7 +28,7 @@
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.jgit.transport.JschSession"/>
<message_argument value="org.eclipse.jgit_5.8.0"/>
<message_argument value="org.eclipse.jgit_5.8.2"/>
</message_arguments>
</filter>
</resource>
@ -36,7 +36,7 @@
<filter id="305324134">
<message_arguments>
<message_argument value="org.eclipse.jgit.transport.OpenSshConfig"/>
<message_argument value="org.eclipse.jgit_5.8.0"/>
<message_argument value="org.eclipse.jgit_5.8.2"/>
</message_arguments>
</filter>
</resource>

View File

@ -184,6 +184,12 @@ public static FileSnapshot save(Instant modified) {
/** measured FileStore attributes */
private FileStoreAttributes fileStoreAttributeCache;
/**
* if {@code true} read filesystem time resolution from configuration file
* otherwise use fallback resolution
*/
private boolean useConfig;
/**
* Object that uniquely identifies the given file, or {@code
* null} if a file key is not available
@ -220,9 +226,7 @@ protected FileSnapshot(File file) {
protected FileSnapshot(File file, boolean useConfig) {
this.file = file;
this.lastRead = Instant.now();
this.fileStoreAttributeCache = useConfig
? FS.getFileStoreAttributes(file.toPath().getParent())
: FALLBACK_FILESTORE_ATTRIBUTES;
this.useConfig = useConfig;
BasicFileAttributes fileAttributes = null;
try {
fileAttributes = FS.DETECTED.fileAttributes(file);
@ -366,7 +370,7 @@ public void setClean(FileSnapshot other) {
* if sleep was interrupted
*/
public void waitUntilNotRacy() throws InterruptedException {
long timestampResolution = fileStoreAttributeCache
long timestampResolution = fileStoreAttributeCache()
.getFsTimestampResolution().toNanos();
while (isRacyClean(Instant.now())) {
TimeUnit.NANOSECONDS.sleep(timestampResolution);
@ -403,6 +407,15 @@ public boolean equals(Object obj) {
return equals(other);
}
/**
* Check if the file exists
*
* @return true if the file exists
*/
public boolean fileExists() {
return !MISSING_FILEKEY.equals(this.fileKey);
}
/** {@inheritDoc} */
@Override
public int hashCode() {
@ -487,10 +500,10 @@ private boolean isRacyClean(Instant read) {
}
private long getEffectiveRacyThreshold() {
long timestampResolution = fileStoreAttributeCache
long timestampResolution = fileStoreAttributeCache()
.getFsTimestampResolution().toNanos();
long minRacyInterval = fileStoreAttributeCache.getMinimalRacyInterval()
.toNanos();
long minRacyInterval = fileStoreAttributeCache()
.getMinimalRacyInterval().toNanos();
long max = Math.max(timestampResolution, minRacyInterval);
// safety margin: factor 2.5 below 100ms otherwise 1.25
return max < 100_000_000L ? max * 5 / 2 : max * 5 / 4;
@ -550,4 +563,13 @@ private boolean isSizeChanged(long currSize) {
}
return changed;
}
private FileStoreAttributes fileStoreAttributeCache() {
if (fileStoreAttributeCache == null) {
fileStoreAttributeCache = useConfig
? FS.getFileStoreAttributes(file.toPath().getParent())
: FALLBACK_FILESTORE_ATTRIBUTES;
}
return fileStoreAttributeCache;
}
}

View File

@ -151,7 +151,7 @@ public long getPackSize() {
String p = pack.getAbsolutePath();
String i = p.substring(0, p.length() - ".pack".length()) + ".idx"; //$NON-NLS-1$ //$NON-NLS-2$
File idx = new File(i);
if (idx.exists() && idx.isFile())
if (idx.isFile())
size += idx.length();
return size;
}

View File

@ -1092,10 +1092,14 @@ LooseRef scanRef(LooseRef ref, String name) throws IOException {
final int limit = 4096;
final byte[] buf;
FileSnapshot otherSnapshot = FileSnapshot.save(path);
if (!otherSnapshot.fileExists()) {
return null;
}
try {
buf = IO.readSome(path, limit);
} catch (FileNotFoundException noFile) {
if (path.exists() && path.isFile()) {
if (path.isFile()) {
throw noFile;
}
return null; // doesn't exist or no file; not a reference.

24
pom.xml
View File

@ -168,14 +168,14 @@
<httpcore-version>4.4.12</httpcore-version>
<slf4j-version>1.7.2</slf4j-version>
<log4j-version>1.2.15</log4j-version>
<maven-javadoc-plugin-version>3.2.0</maven-javadoc-plugin-version>
<maven-javadoc-plugin-version>3.3.1</maven-javadoc-plugin-version>
<tycho-extras-version>1.7.0</tycho-extras-version>
<gson-version>2.8.2</gson-version>
<bouncycastle-version>1.65</bouncycastle-version>
<spotbugs-maven-plugin-version>4.0.0</spotbugs-maven-plugin-version>
<maven-project-info-reports-plugin-version>3.1.0</maven-project-info-reports-plugin-version>
<maven-jxr-plugin-version>3.0.0</maven-jxr-plugin-version>
<maven-surefire-plugin-version>3.0.0-M4</maven-surefire-plugin-version>
<spotbugs-maven-plugin-version>4.3.0</spotbugs-maven-plugin-version>
<maven-project-info-reports-plugin-version>3.1.2</maven-project-info-reports-plugin-version>
<maven-jxr-plugin-version>3.1.1</maven-jxr-plugin-version>
<maven-surefire-plugin-version>3.0.0-M5</maven-surefire-plugin-version>
<maven-surefire-report-plugin-version>${maven-surefire-plugin-version}</maven-surefire-report-plugin-version>
<maven-compiler-plugin-version>3.8.1</maven-compiler-plugin-version>
@ -246,7 +246,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.0</version>
</plugin>
<plugin>
@ -275,7 +275,7 @@
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</plugin>
<plugin>
@ -298,7 +298,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.13.0</version>
<version>3.15.0</version>
<configuration>
<sourceEncoding>utf-8</sourceEncoding>
<minimumTokens>100</minimumTokens>
@ -336,12 +336,12 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<version>0.8.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.9.0</version>
<version>3.9.1</version>
<dependencies>
<dependency><!-- add support for ssh/scp -->
<groupId>org.apache.maven.wagon</groupId>
@ -383,7 +383,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.1.0</version>
<version>3.2.0</version>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
@ -397,7 +397,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M3</version>
<version>3.0.0</version>
<executions>
<execution>
<id>enforce-maven</id>