Browse Source

Merge branch 'master' into stable-5.7

* master:
  Use lambdas where possible
  Upgrade maven-pmd-plugin to 3.13.0
  Include org.apache.commons.codec 1.13 in the JGit http.apache.feature
  Update Maven plugins
  AmazonS3: Speed up fetch, try recent packs first
  Update orbit to S20200128200239 for 2020-03 M2
  FS: re-order fields and use all uppercase for true constants
  FS: Don't use innocuous threads for CompletableFuture
  ErrorProne: Enable and fix UnusedException check
  Update Orbit to I20200126235943 and org.junit to 4.13.0.v20200126-2018
  Fix SshSessionFactory#setInstance to use service loader
  Use ServiceLoader to define the default SSH session factory.
  Remove Error-Prone ExpectedExceptionChecker
  ReceivePack: enable overriding filterCommands and executeCommands
  Replace ExpectedException which was deprecated in junit 4.13
  Add org.assertj 3.14.0.v20200120-1926 to target platform
  Replace deprecated junit assertion methods with hamcrest
  Update to Orbit I20200120214610 and JUnit to 4.13
  Update to Tycho 1.6.0
  Extract method refactoring in class DirCacheCheckout
  Update Orbit to I20200115225246 and update dependencies
  Update bazlets and bazel version

Change-Id: Ib6cd6593484cd79def9d5298181411189575c9f7
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
stable-5.7
Thomas Wolf 5 years ago
parent
commit
dab029f115
  1. 56
      WORKSPACE
  2. 9
      lib/BUILD
  3. 2
      org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF
  4. 3
      org.eclipse.jgit.benchmarks/pom.xml
  5. 3
      org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java
  6. 8
      org.eclipse.jgit.http.test/META-INF/MANIFEST.MF
  7. 2
      org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
  8. 26
      org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java
  9. 2
      org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF
  10. 10
      org.eclipse.jgit.junit/META-INF/MANIFEST.MF
  11. 2
      org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java
  12. 8
      org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF
  13. 26
      org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java
  14. 6
      org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF
  15. 2
      org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java
  16. 7
      org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java
  17. 8
      org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java
  18. 8
      org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java
  19. 7
      org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml
  20. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.target
  21. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd
  22. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.target
  23. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd
  24. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.target
  25. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd
  26. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.target
  27. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd
  28. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.target
  29. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.tpd
  30. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.target
  31. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd
  32. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.target
  33. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd
  34. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.target
  35. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd
  36. 30
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.target
  37. 2
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd
  38. 67
      org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2020-03.tpd
  39. 2
      org.eclipse.jgit.packaging/pom.xml
  40. 4
      org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF
  41. 26
      org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BlameTest.java
  42. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java
  43. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java
  44. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java
  45. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java
  46. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java
  47. 8
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java
  48. 2
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java
  49. 4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java
  50. 4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java
  51. 4
      org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java
  52. 6
      org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF
  53. 1
      org.eclipse.jgit.test/BUILD
  54. 12
      org.eclipse.jgit.test/META-INF/MANIFEST.MF
  55. 5
      org.eclipse.jgit.test/pom.xml
  56. 46
      org.eclipse.jgit.test/src/org/eclipse/jgit/lib/MoreAsserts.java
  57. 10
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RenameBranchCommandTest.java
  58. 132
      org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java
  59. 4
      org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffEntryTest.java
  60. 13
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfigTest.java
  61. 13
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableStackTest.java
  62. 2
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java
  63. 17
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java
  64. 3
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackInserterTest.java
  65. 13
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java
  66. 4
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/ReftableTest.java
  67. 36
      org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileTest.java
  68. 70
      org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java
  69. 20
      org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java
  70. 2
      org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java
  71. 19
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BundleWriterTest.java
  72. 2
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV0ParserTest.java
  73. 18
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java
  74. 206
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RequestValidatorTestCase.java
  75. 4
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java
  76. 9
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackReachabilityTest.java
  77. 2
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackRefSortingForReachabilityTest.java
  78. 4
      org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java
  79. 6
      org.eclipse.jgit.test/tst/org/eclipse/jgit/util/LRUMapTest.java
  80. 10
      org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_LineMapTest.java
  81. 8
      org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/TimeoutOutputStreamTest.java
  82. 1
      org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory
  83. 7
      org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java
  84. 2
      org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java
  85. 2
      org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java
  86. 5
      org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java
  87. 1
      org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java
  88. 131
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java
  89. 2
      org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java
  90. 2
      org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
  91. 7
      org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java
  92. 2
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java
  93. 3
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java
  94. 15
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java
  95. 5
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java
  96. 16
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java
  97. 28
      org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java
  98. 7
      org.eclipse.jgit/src/org/eclipse/jgit/internal/submodule/SubmoduleValidator.java
  99. 7
      org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java
  100. 5
      org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java
  101. Some files were not shown because too many files have changed in this diff Show More

56
WORKSPACE

@ -77,20 +77,20 @@ maven_jar(
maven_jar( maven_jar(
name = "javaewah", name = "javaewah",
artifact = "com.googlecode.javaewah:JavaEWAH:1.1.6", artifact = "com.googlecode.javaewah:JavaEWAH:1.1.7",
sha1 = "94ad16d728b374d65bd897625f3fbb3da223a2b6", sha1 = "570dde3cd706ae10c62fe19b150928cfdb415e87",
) )
maven_jar( maven_jar(
name = "httpclient", name = "httpclient",
artifact = "org.apache.httpcomponents:httpclient:4.5.6", artifact = "org.apache.httpcomponents:httpclient:4.5.10",
sha1 = "1afe5621985efe90a92d0fbc9be86271efbe796f", sha1 = "7ca2e4276f4ef95e4db725a8cd4a1d1e7585b9e5",
) )
maven_jar( maven_jar(
name = "httpcore", name = "httpcore",
artifact = "org.apache.httpcomponents:httpcore:4.4.10", artifact = "org.apache.httpcomponents:httpcore:4.4.12",
sha1 = "acc54d9b28bdffe4bbde89ed2e4a1e86b5285e2b", sha1 = "21ebaf6d532bc350ba95bd81938fa5f0e511c132",
) )
maven_jar( maven_jar(
@ -107,8 +107,8 @@ maven_jar(
maven_jar( maven_jar(
name = "commons-codec", name = "commons-codec",
artifact = "commons-codec:commons-codec:1.10", artifact = "commons-codec:commons-codec:1.13",
sha1 = "4b95f4897fa13f2cd904aee711aeafc0c5295cd8", sha1 = "3f18e1aa31031d89db6f01ba05d501258ce69d2c",
) )
maven_jar( maven_jar(
@ -137,8 +137,8 @@ maven_jar(
maven_jar( maven_jar(
name = "commons-compress", name = "commons-compress",
artifact = "org.apache.commons:commons-compress:1.18", artifact = "org.apache.commons:commons-compress:1.19",
sha1 = "1191f9f2bc0c47a8cce69193feb1ff0a8bcb37d5", sha1 = "7e65777fb451ddab6a9c054beb879e521b7eab78",
) )
maven_jar( maven_jar(
@ -155,8 +155,8 @@ maven_jar(
maven_jar( maven_jar(
name = "junit", name = "junit",
artifact = "junit:junit:4.12", artifact = "junit:junit:4.13",
sha1 = "2973d150c0dc1fefe998f834810d68f278ea58ec", sha1 = "e49ccba652b735c93bd6e6f59760d8254cf597dd",
) )
maven_jar( maven_jar(
@ -177,6 +177,12 @@ maven_jar(
sha1 = "497ddb32fd5d01f9dbe99a2ec790aeb931dff1b1", sha1 = "497ddb32fd5d01f9dbe99a2ec790aeb931dff1b1",
) )
maven_jar(
name = "assertj-core",
artifact = "org.assertj:assertj-core:3.14.0",
sha1 = "3b7b0fcac821f3d167764e9926573cd64f78f9e9",
)
BYTE_BUDDY_VERSION = "1.9.0" BYTE_BUDDY_VERSION = "1.9.0"
maven_jar( maven_jar(
@ -203,48 +209,48 @@ maven_jar(
sha1 = "3edcfe49d2c6053a70a2a47e4e1c2f94998a49cf", sha1 = "3edcfe49d2c6053a70a2a47e4e1c2f94998a49cf",
) )
JETTY_VER = "9.4.24.v20191120" JETTY_VER = "9.4.25.v20191220"
maven_jar( maven_jar(
name = "jetty-servlet", name = "jetty-servlet",
artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-servlet:" + JETTY_VER,
sha1 = "ca1803fde51b795c0a8346ca8bc6277d9d04d01d", sha1 = "bee77d6a4f87dc90d5bc142cbd6cef470ec46aae",
src_sha1 = "8781c162df92d27456d4370df943f6a5234f32c4", src_sha1 = "e8b09b6431fc9cfbff588698ac0262a745fe00e4",
) )
maven_jar( maven_jar(
name = "jetty-security", name = "jetty-security",
artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-security:" + JETTY_VER,
sha1 = "9fa640d36c088cf55843900043d28aef830ade4d", sha1 = "593ff5b5dfd5bf973184329f5d1209b9a411ec12",
src_sha1 = "40128e3547b43f09e176fb0738672f483c477119", src_sha1 = "369f869a13a33d25535db3176a84945e94a3718a",
) )
maven_jar( maven_jar(
name = "jetty-server", name = "jetty-server",
artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-server:" + JETTY_VER,
sha1 = "7885cc3d5d7701a444acada7ab97f89846514875", sha1 = "5b352c9f9135a1c20e4808e5cb1d84fbddfdc460",
src_sha1 = "709650068c26029303ab3776d1e5ed6a66e0b065", src_sha1 = "0f3acc2abcdb86491a2c37074592860cb1100269",
) )
maven_jar( maven_jar(
name = "jetty-http", name = "jetty-http",
artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-http:" + JETTY_VER,
sha1 = "d3f0b0fb016ef8d35ffb199d928ffbcbfa121c86", sha1 = "c3aa7da362f1a492667ce754ba16b2535b793668",
src_sha1 = "b29d870576e3edff354af0dae86c60d5956cd643", src_sha1 = "70ef1436dc895eafe2cc24cf59af6e2d2874d963",
) )
maven_jar( maven_jar(
name = "jetty-io", name = "jetty-io",
artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-io:" + JETTY_VER,
sha1 = "dcb6d4d505ef74898e3a64a38c40195c01e97119", sha1 = "3eb34b5481012701de0ea9dfaf2bdf1dbb947b16",
src_sha1 = "863a6c575eadb626b50cda13a6484609a9449934", src_sha1 = "ad129617793088aaf69eab18a13c9bce02cb1195",
) )
maven_jar( maven_jar(
name = "jetty-util", name = "jetty-util",
artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER, artifact = "org.eclipse.jetty:jetty-util:" + JETTY_VER,
sha1 = "3095acb088f4ff9e3fd9aedf98db73e3c18ea849", sha1 = "fd8b642cc16728f1c36ca6a64653cb1b26ec0232",
src_sha1 = "f503199317d9df74062d722db4a7af8cf5e59322", src_sha1 = "c84dc3026cc4aea013dc97b18228756816167745",
) )
BOUNCYCASTLE_VER = "1.64" BOUNCYCASTLE_VER = "1.64"

9
lib/BUILD

@ -213,6 +213,15 @@ java_library(
], ],
) )
java_library(
name = "assertj-core",
testonly = 1,
visibility = ["//visibility:public"],
exports = [
"@assertj-core//jar",
],
)
java_library( java_library(
name = "servlet-api", name = "servlet-api",
visibility = [ visibility = [

2
org.eclipse.jgit.ant.test/META-INF/MANIFEST.MF

@ -14,4 +14,4 @@ Import-Package: org.apache.tools.ant,
org.eclipse.jgit.lib;version="[5.7.0,5.8.0)", org.eclipse.jgit.lib;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util;version="[5.7.0,5.8.0)", org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)", org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)" org.junit;version="[4.13,5.0.0)"

3
org.eclipse.jgit.benchmarks/pom.xml

@ -69,9 +69,6 @@
<configuration> <configuration>
<compilerId>javac-with-errorprone</compilerId> <compilerId>javac-with-errorprone</compilerId>
<forceJavacCompilerUse>true</forceJavacCompilerUse> <forceJavacCompilerUse>true</forceJavacCompilerUse>
<compilerArgs>
<arg>-Xep:ExpectedExceptionChecker:ERROR</arg>
</compilerArgs>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>

3
org.eclipse.jgit.http.server/src/org/eclipse/jgit/http/server/GitFilter.java

@ -298,7 +298,8 @@ public class GitFilter extends MetaFilter {
try { try {
return StringUtils.toBoolean(n); return StringUtils.toBoolean(n);
} catch (IllegalArgumentException err) { } catch (IllegalArgumentException err) {
throw new ServletException(MessageFormat.format(HttpServerText.get().invalidBoolean, param, n)); throw new ServletException(MessageFormat.format(
HttpServerText.get().invalidBoolean, param, n), err);
} }
} }

8
org.eclipse.jgit.http.test/META-INF/MANIFEST.MF

@ -49,8 +49,8 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
org.eclipse.jgit.util;version="[5.7.0,5.8.0)", org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.hamcrest;version="[1.1.0,2.0.0)", org.hamcrest;version="[1.1.0,2.0.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)", org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)", org.junit;version="[4.13,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)", org.junit.rules;version="[4.13,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)", org.junit.runner;version="[4.13,5.0.0)",
org.junit.runners;version="[4.12,5.0.0)" org.junit.runners;version="[4.13,5.0.0)"
Require-Bundle: org.hamcrest.library;bundle-version="[1.1.0,2.0.0)" Require-Bundle: org.hamcrest.library;bundle-version="[1.1.0,2.0.0)"

2
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java

@ -10,12 +10,12 @@
package org.eclipse.jgit.http.test; package org.eclipse.jgit.http.test;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;

26
org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/SmartClientSmartServerTest.java

@ -18,6 +18,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
@ -88,18 +89,12 @@ import org.eclipse.jgit.transport.UsernamePasswordCredentialsProvider;
import org.eclipse.jgit.transport.http.HttpConnectionFactory; import org.eclipse.jgit.transport.http.HttpConnectionFactory;
import org.eclipse.jgit.util.HttpSupport; import org.eclipse.jgit.util.HttpSupport;
import org.eclipse.jgit.util.SystemReader; import org.eclipse.jgit.util.SystemReader;
import org.hamcrest.Matchers;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase { public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
private static final String HDR_TRANSFER_ENCODING = "Transfer-Encoding"; private static final String HDR_TRANSFER_ENCODING = "Transfer-Encoding";
@Rule
public ExpectedException thrown = ExpectedException.none();
private AdvertiseRefsHook advertiseRefsHook; private AdvertiseRefsHook advertiseRefsHook;
private Repository remoteRepository; private Repository remoteRepository;
@ -462,11 +457,12 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
try (Repository dst = createBareRepository(); try (Repository dst = createBareRepository();
Transport t = Transport.open(dst, remoteURI)) { Transport t = Transport.open(dst, remoteURI)) {
assertFalse(dst.getObjectDatabase().has(A_txt)); assertFalse(dst.getObjectDatabase().has(A_txt));
thrown.expect(TransportException.class); Exception e = assertThrows(TransportException.class,
thrown.expectMessage(Matchers.containsString( () -> t.fetch(NullProgressMonitor.INSTANCE,
Collections.singletonList(
new RefSpec(unreachableCommit.name()))));
assertTrue(e.getMessage().contains(
"want " + unreachableCommit.name() + " not valid")); "want " + unreachableCommit.name() + " not valid"));
t.fetch(NullProgressMonitor.INSTANCE, Collections
.singletonList(new RefSpec(unreachableCommit.name())));
} }
} }
@ -484,11 +480,11 @@ public class SmartClientSmartServerTest extends AllFactoriesHttpTestCase {
try (Repository dst = createBareRepository(); try (Repository dst = createBareRepository();
Transport t = Transport.open(dst, remoteURI)) { Transport t = Transport.open(dst, remoteURI)) {
assertFalse(dst.getObjectDatabase().has(A_txt)); assertFalse(dst.getObjectDatabase().has(A_txt));
thrown.expect(TransportException.class); Exception e = assertThrows(TransportException.class,
thrown.expectMessage(Matchers.containsString( () -> t.fetch(NullProgressMonitor.INSTANCE,
"want " + A.name() + " not valid")); Collections.singletonList(new RefSpec(A.name()))));
t.fetch(NullProgressMonitor.INSTANCE, Collections assertTrue(
.singletonList(new RefSpec(A.name()))); e.getMessage().contains("want " + A.name() + " not valid"));
} }
} }

2
org.eclipse.jgit.junit.http/META-INF/MANIFEST.MF

@ -30,7 +30,7 @@ Import-Package: javax.servlet;version="[2.5.0,3.2.0)",
org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)", org.eclipse.jgit.revwalk;version="[5.7.0,5.8.0)",
org.eclipse.jgit.transport;version="[5.7.0,5.8.0)", org.eclipse.jgit.transport;version="[5.7.0,5.8.0)",
org.eclipse.jgit.transport.resolver;version="[5.7.0,5.8.0)", org.eclipse.jgit.transport.resolver;version="[5.7.0,5.8.0)",
org.junit;version="[4.12,5.0.0)" org.junit;version="[4.13,5.0.0)"
Export-Package: org.eclipse.jgit.junit.http;version="5.7.0"; Export-Package: org.eclipse.jgit.junit.http;version="5.7.0";
uses:="org.eclipse.jgit.transport, uses:="org.eclipse.jgit.transport,
org.eclipse.jgit.junit, org.eclipse.jgit.junit,

10
org.eclipse.jgit.junit/META-INF/MANIFEST.MF

@ -25,11 +25,11 @@ Import-Package: org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util;version="[5.7.0,5.8.0)", org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)", org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util.time;version="[5.7.0,5.8.0)", org.eclipse.jgit.util.time;version="[5.7.0,5.8.0)",
org.junit;version="[4.12,5.0.0)", org.junit;version="[4.13,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)", org.junit.rules;version="[4.13,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)", org.junit.runner;version="[4.13,5.0.0)",
org.junit.runners;version="[4.12,5.0.0)", org.junit.runners;version="[4.13,5.0.0)",
org.junit.runners.model;version="[4.12,5.0.0)", org.junit.runners.model;version="[4.13,5.0.0)",
org.slf4j;version="[1.7.0,2.0.0)" org.slf4j;version="[1.7.0,2.0.0)"
Export-Package: org.eclipse.jgit.junit;version="5.7.0"; Export-Package: org.eclipse.jgit.junit;version="5.7.0";
uses:="org.eclipse.jgit.dircache, uses:="org.eclipse.jgit.dircache,

2
org.eclipse.jgit.junit/src/org/eclipse/jgit/junit/TestRepository.java

@ -973,7 +973,7 @@ public class TestRepository<R extends Repository> implements AutoCloseable {
try { try {
lck.write(bin); lck.write(bin);
} catch (IOException ioe) { } catch (IOException ioe) {
throw new ObjectWritingException("Can't write " + p); throw new ObjectWritingException("Can't write " + p, ioe);
} }
if (!lck.commit()) if (!lck.commit())
throw new ObjectWritingException("Can't write " + p); throw new ObjectWritingException("Can't write " + p);

8
org.eclipse.jgit.lfs.server.test/META-INF/MANIFEST.MF

@ -47,7 +47,7 @@ Import-Package: javax.servlet;version="[3.1.0,4.0.0)",
org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)", org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util;version="[5.7.0,5.8.0)", org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)", org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)", org.junit;version="[4.13,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)", org.junit.rules;version="[4.13,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)", org.junit.runner;version="[4.13,5.0.0)",
org.junit.runners;version="[4.12,5.0.0)" org.junit.runners;version="[4.13,5.0.0)"

26
org.eclipse.jgit.lfs.server.test/tst/org/eclipse/jgit/lfs/server/fs/DownloadTest.java

@ -12,6 +12,7 @@ package org.eclipse.jgit.lfs.server.fs;
import static org.apache.http.HttpStatus.SC_NOT_FOUND; import static org.apache.http.HttpStatus.SC_NOT_FOUND;
import static org.apache.http.HttpStatus.SC_UNPROCESSABLE_ENTITY; import static org.apache.http.HttpStatus.SC_UNPROCESSABLE_ENTITY;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
@ -22,15 +23,10 @@ import org.apache.http.client.ClientProtocolException;
import org.eclipse.jgit.lfs.lib.AnyLongObjectId; import org.eclipse.jgit.lfs.lib.AnyLongObjectId;
import org.eclipse.jgit.lfs.test.LongObjectIdTestUtils; import org.eclipse.jgit.lfs.test.LongObjectIdTestUtils;
import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.FileUtils;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class DownloadTest extends LfsServerTest { public class DownloadTest extends LfsServerTest {
@Rule
public ExpectedException exception = ExpectedException.none();
@Test @Test
public void testDownload() throws Exception { public void testDownload() throws Exception {
String TEXT = "test"; String TEXT = "test";
@ -49,10 +45,8 @@ public class DownloadTest extends LfsServerTest {
Path f = Paths.get(getTempDirectory().toString(), "download"); Path f = Paths.get(getTempDirectory().toString(), "download");
String error = String.format( String error = String.format(
"Invalid pathInfo: '/%s' does not match '/{SHA-256}'", id); "Invalid pathInfo: '/%s' does not match '/{SHA-256}'", id);
exception.expect(RuntimeException.class); assertThrows(formatErrorMessage(SC_UNPROCESSABLE_ENTITY, error),
exception.expectMessage( RuntimeException.class, () -> getContent(id, f));
formatErrorMessage(SC_UNPROCESSABLE_ENTITY, error));
getContent(id, f);
} }
@Test @Test
@ -62,22 +56,18 @@ public class DownloadTest extends LfsServerTest {
String id = putContent(TEXT).name().replace('f', 'z'); String id = putContent(TEXT).name().replace('f', 'z');
Path f = Paths.get(getTempDirectory().toString(), "download"); Path f = Paths.get(getTempDirectory().toString(), "download");
String error = String.format("Invalid id: %s", id); String error = String.format("Invalid id: %s", id);
exception.expect(RuntimeException.class); assertThrows(formatErrorMessage(SC_UNPROCESSABLE_ENTITY, error),
exception.expectMessage( RuntimeException.class, () -> getContent(id, f));
formatErrorMessage(SC_UNPROCESSABLE_ENTITY, error));
getContent(id, f);
} }
@Test @Test
public void testDownloadNotFound() public void testDownloadNotFound() {
throws ClientProtocolException, IOException {
String TEXT = "test"; String TEXT = "test";
AnyLongObjectId id = LongObjectIdTestUtils.hash(TEXT); AnyLongObjectId id = LongObjectIdTestUtils.hash(TEXT);
Path f = Paths.get(getTempDirectory().toString(), "download"); Path f = Paths.get(getTempDirectory().toString(), "download");
String error = String.format("Object '%s' not found", id.getName()); String error = String.format("Object '%s' not found", id.getName());
exception.expect(RuntimeException.class); assertThrows(formatErrorMessage(SC_NOT_FOUND, error),
exception.expectMessage(formatErrorMessage(SC_NOT_FOUND, error)); RuntimeException.class, () -> getContent(id, f));
getContent(id, f);
} }
@SuppressWarnings("boxing") @SuppressWarnings("boxing")

6
org.eclipse.jgit.lfs.test/META-INF/MANIFEST.MF

@ -18,7 +18,7 @@ Import-Package: org.eclipse.jgit.internal.storage.dfs;version="[5.7.0,5.8.0)",
org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)", org.eclipse.jgit.treewalk.filter;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util;version="[5.7.0,5.8.0)", org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.hamcrest.core;version="[1.1.0,2.0.0)", org.hamcrest.core;version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)", org.junit;version="[4.13,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)", org.junit.runner;version="[4.13,5.0.0)",
org.junit.runners;version="[4.12,5.0.0)" org.junit.runners;version="[4.13,5.0.0)"
Export-Package: org.eclipse.jgit.lfs.test;version="5.7.0";x-friends:="org.eclipse.jgit.lfs.server.test" Export-Package: org.eclipse.jgit.lfs.test;version="5.7.0";x-friends:="org.eclipse.jgit.lfs.server.test"

2
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/LfsPointer.java

@ -18,7 +18,6 @@ import java.io.InputStreamReader;
import java.io.OutputStream; import java.io.OutputStream;
import java.io.PrintStream; import java.io.PrintStream;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.nio.charset.UnsupportedCharsetException;
import java.util.Locale; import java.util.Locale;
import org.eclipse.jgit.annotations.Nullable; import org.eclipse.jgit.annotations.Nullable;
@ -110,7 +109,6 @@ public class LfsPointer implements Comparable<LfsPointer> {
ps.print(size + "\n"); //$NON-NLS-1$ ps.print(size + "\n"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
// should not happen, we are using a standard charset // should not happen, we are using a standard charset
throw new UnsupportedCharsetException(UTF_8.name());
} }
} }

7
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/AbbreviatedLongObjectId.java

@ -121,8 +121,11 @@ public final class AbbreviatedLongObjectId implements Serializable {
final long c = hexUInt64(bs, ptr + 32, end); final long c = hexUInt64(bs, ptr + 32, end);
final long d = hexUInt64(bs, ptr + 48, end); final long d = hexUInt64(bs, ptr + 48, end);
return new AbbreviatedLongObjectId(end - ptr, a, b, c, d); return new AbbreviatedLongObjectId(end - ptr, a, b, c, d);
} catch (ArrayIndexOutOfBoundsException e1) { } catch (ArrayIndexOutOfBoundsException e) {
throw new InvalidLongObjectIdException(bs, ptr, end - ptr); InvalidLongObjectIdException e1 = new InvalidLongObjectIdException(
bs, ptr, end - ptr);
e1.initCause(e);
throw e1;
} }
} }

8
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/LongObjectId.java

@ -223,9 +223,11 @@ public class LongObjectId extends AnyLongObjectId implements Serializable {
final long c = RawParseUtils.parseHexInt64(bs, p + 32); final long c = RawParseUtils.parseHexInt64(bs, p + 32);
final long d = RawParseUtils.parseHexInt64(bs, p + 48); final long d = RawParseUtils.parseHexInt64(bs, p + 48);
return new LongObjectId(a, b, c, d); return new LongObjectId(a, b, c, d);
} catch (ArrayIndexOutOfBoundsException e1) { } catch (ArrayIndexOutOfBoundsException e) {
throw new InvalidLongObjectIdException(bs, p, InvalidLongObjectIdException e1 = new InvalidLongObjectIdException(
Constants.LONG_OBJECT_ID_STRING_LENGTH); bs, p, Constants.LONG_OBJECT_ID_STRING_LENGTH);
e1.initCause(e);
throw e1;
} }
} }

8
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/lib/MutableLongObjectId.java

@ -213,9 +213,11 @@ public class MutableLongObjectId extends AnyLongObjectId {
w2 = RawParseUtils.parseHexInt64(bs, p + 16); w2 = RawParseUtils.parseHexInt64(bs, p + 16);
w3 = RawParseUtils.parseHexInt64(bs, p + 32); w3 = RawParseUtils.parseHexInt64(bs, p + 32);
w4 = RawParseUtils.parseHexInt64(bs, p + 48); w4 = RawParseUtils.parseHexInt64(bs, p + 48);
} catch (ArrayIndexOutOfBoundsException e1) { } catch (ArrayIndexOutOfBoundsException e) {
throw new InvalidLongObjectIdException(bs, p, InvalidLongObjectIdException e1 = new InvalidLongObjectIdException(
Constants.LONG_OBJECT_ID_STRING_LENGTH); bs, p, Constants.LONG_OBJECT_ID_STRING_LENGTH);
e1.initCause(e);
throw e1;
} }
} }

7
org.eclipse.jgit.packaging/org.eclipse.jgit.http.apache.feature/feature.xml

@ -47,4 +47,11 @@
version="0.0.0" version="0.0.0"
unpack="false"/> unpack="false"/>
<plugin
id="org.apache.commons.codec"
download-size="0"
install-size="0"
version="0.0.0"
unpack="false"/>
</feature> </feature>

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.10" sequenceNumber="1579097942"> <target name="jgit-4.10" sequenceNumber="1580289401">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.10.tpd

@ -1,7 +1,7 @@
target "jgit-4.10" with source configurePhase target "jgit-4.10" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/releases/2018-12/" { location "http://download.eclipse.org/releases/2018-12/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.11" sequenceNumber="1579098001"> <target name="jgit-4.11" sequenceNumber="1580289407">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.11.tpd

@ -1,7 +1,7 @@
target "jgit-4.11" with source configurePhase target "jgit-4.11" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/releases/2019-03/" { location "http://download.eclipse.org/releases/2019-03/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.12" sequenceNumber="1579098008"> <target name="jgit-4.12" sequenceNumber="1580289407">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.12.tpd

@ -1,7 +1,7 @@
target "jgit-4.12" with source configurePhase target "jgit-4.12" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/releases/2019-06/" { location "http://download.eclipse.org/releases/2019-06/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.13" sequenceNumber="1579098020"> <target name="jgit-4.13" sequenceNumber="1580289407">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.13.tpd

@ -1,7 +1,7 @@
target "jgit-4.13" with source configurePhase target "jgit-4.13" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/releases/2019-09/" { location "http://download.eclipse.org/releases/2019-09/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.14-staging" sequenceNumber="1579098018"> <target name="jgit-4.14-staging" sequenceNumber="1580289404">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.14-staging.tpd

@ -1,7 +1,7 @@
target "jgit-4.14-staging" with source configurePhase target "jgit-4.14-staging" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/staging/2019-12/" { location "http://download.eclipse.org/staging/2019-12/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.6" sequenceNumber="1579098032"> <target name="jgit-4.6" sequenceNumber="1580289424">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.6.tpd

@ -1,7 +1,7 @@
target "jgit-4.6" with source configurePhase target "jgit-4.6" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/releases/neon/" { location "http://download.eclipse.org/releases/neon/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.7" sequenceNumber="1579098024"> <target name="jgit-4.7" sequenceNumber="1580289413">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.7.tpd

@ -1,7 +1,7 @@
target "jgit-4.7" with source configurePhase target "jgit-4.7" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/releases/oxygen/" { location "http://download.eclipse.org/releases/oxygen/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.8" sequenceNumber="1579098020"> <target name="jgit-4.8" sequenceNumber="1580289407">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.8.tpd

@ -1,7 +1,7 @@
target "jgit-4.8" with source configurePhase target "jgit-4.8" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/releases/photon/" { location "http://download.eclipse.org/releases/photon/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

30
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"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde?> <?pde?>
<!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl --> <!-- generated with https://github.com/eclipse-cbi/targetplatform-dsl -->
<target name="jgit-4.9" sequenceNumber="1579098020"> <target name="jgit-4.9" sequenceNumber="1580289407">
<locations> <locations>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/> <unit id="org.eclipse.jetty.client" version="9.4.25.v20191220"/>
@ -29,8 +29,8 @@
<unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/> <unit id="com.jcraft.jsch.source" version="0.1.55.v20190404-1902"/>
<unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib" version="1.1.1.v201205102305"/>
<unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/> <unit id="com.jcraft.jzlib.source" version="1.1.1.v201205102305"/>
<unit id="javaewah" version="1.1.6.v20160919-1400"/> <unit id="javaewah" version="1.1.7.v20200107-0831"/>
<unit id="javaewah.source" version="1.1.6.v20160919-1400"/> <unit id="javaewah.source" version="1.1.7.v20200107-0831"/>
<unit id="javax.servlet" version="3.1.0.v201410161800"/> <unit id="javax.servlet" version="3.1.0.v201410161800"/>
<unit id="javax.servlet.source" version="3.1.0.v201410161800"/> <unit id="javax.servlet.source" version="3.1.0.v201410161800"/>
<unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/> <unit id="net.bytebuddy.byte-buddy" version="1.9.0.v20181107-1410"/>
@ -41,22 +41,24 @@
<unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/> <unit id="net.i2p.crypto.eddsa.source" version="0.3.0.v20181102-1323"/>
<unit id="org.apache.ant" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/> <unit id="org.apache.ant.source" version="1.10.7.v20190926-0324"/>
<unit id="org.apache.commons.codec" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.codec.source" version="1.10.0.v20180409-1845"/> <unit id="org.apache.commons.codec.source" version="1.13.0.v20200108-0001"/>
<unit id="org.apache.commons.compress" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.compress.source" version="1.18.0.v20181121-2221"/> <unit id="org.apache.commons.compress.source" version="1.19.0.v20200106-2343"/>
<unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/> <unit id="org.apache.commons.logging.source" version="1.2.0.v20180409-1502"/>
<unit id="org.apache.httpcomponents.httpclient" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpclient.source" version="4.5.6.v20190503-0009"/> <unit id="org.apache.httpcomponents.httpclient.source" version="4.5.10.v20200114-1512"/>
<unit id="org.apache.httpcomponents.httpcore" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.httpcomponents.httpcore.source" version="4.4.10.v20190123-2214"/> <unit id="org.apache.httpcomponents.httpcore.source" version="4.4.12.v20200108-1212"/>
<unit id="org.apache.log4j" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j" version="1.2.15.v201012070815"/>
<unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/> <unit id="org.apache.log4j.source" version="1.2.15.v201012070815"/>
<unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.osgi.source" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp" version="2.2.0.v20190425-2127"/>
<unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/> <unit id="org.apache.sshd.sftp.source" version="2.2.0.v20190425-2127"/>
<unit id="org.assertj" version="3.14.0.v20200120-1926"/>
<unit id="org.assertj.source" version="3.14.0.v20200120-1926"/>
<unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpg.source" version="1.64.0.v20191109-0815"/>
<unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/> <unit id="org.bouncycastle.bcpkix" version="1.64.0.v20191109-0815"/>
@ -68,8 +70,8 @@
<unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/> <unit id="org.hamcrest.core.source" version="1.3.0.v20180420-1519"/>
<unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library" version="1.3.0.v20180524-2246"/>
<unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/> <unit id="org.hamcrest.library.source" version="1.3.0.v20180524-2246"/>
<unit id="org.junit" version="4.12.0.v201504281640"/> <unit id="org.junit" version="4.13.0.v20200128-1312"/>
<unit id="org.junit.source" version="4.12.0.v201504281640"/> <unit id="org.junit.source" version="4.13.0.v20200128-1312"/>
<unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j" version="2.33.0.v20160323-2218"/>
<unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/> <unit id="org.kohsuke.args4j.source" version="2.33.0.v20160323-2218"/>
<unit id="org.mockito" version="2.23.0.v20190527-1420"/> <unit id="org.mockito" version="2.23.0.v20190527-1420"/>
@ -82,7 +84,7 @@
<unit id="org.slf4j.impl.log4j12.source" version="1.7.2.v20131105-2200"/> <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" version="1.8.0.v20180207-1613"/>
<unit id="org.tukaani.xz.source" 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/R20191126223242/repository"/> <repository location="https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/repository"/>
</location> </location>
<location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit"> <location includeMode="slicer" includeAllPlatforms="false" includeSource="true" includeConfigurePhase="true" type="InstallableUnit">
<unit id="org.eclipse.osgi" version="0.0.0"/> <unit id="org.eclipse.osgi" version="0.0.0"/>

2
org.eclipse.jgit.packaging/org.eclipse.jgit.target/jgit-4.9.tpd

@ -1,7 +1,7 @@
target "jgit-4.9" with source configurePhase target "jgit-4.9" with source configurePhase
include "projects/jetty-9.4.x.tpd" include "projects/jetty-9.4.x.tpd"
include "orbit/R20191126223242-2019-12.tpd" include "orbit/staging-2020-03.tpd"
location "http://download.eclipse.org/releases/2018-09/" { location "http://download.eclipse.org/releases/2018-09/" {
org.eclipse.osgi lazy org.eclipse.osgi lazy

67
org.eclipse.jgit.packaging/org.eclipse.jgit.target/orbit/staging-2020-03.tpd

@ -0,0 +1,67 @@
target "staging-2020-03" with source configurePhase
// see http://download.eclipse.org/tools/orbit/downloads/
location "https://download.eclipse.org/tools/orbit/downloads/drops/S20200128200239/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]
com.jcraft.jsch.source [0.1.55.v20190404-1902,0.1.55.v20190404-1902]
com.jcraft.jzlib [1.1.1.v201205102305,1.1.1.v201205102305]
com.jcraft.jzlib.source [1.1.1.v201205102305,1.1.1.v201205102305]
javaewah [1.1.7.v20200107-0831,1.1.7.v20200107-0831]
javaewah.source [1.1.7.v20200107-0831,1.1.7.v20200107-0831]
javax.servlet [3.1.0.v201410161800,3.1.0.v201410161800]
javax.servlet.source [3.1.0.v201410161800,3.1.0.v201410161800]
net.bytebuddy.byte-buddy [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
net.bytebuddy.byte-buddy-agent [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
net.bytebuddy.byte-buddy-agent.source [1.9.0.v20181106-1534,1.9.0.v20181106-1534]
net.bytebuddy.byte-buddy.source [1.9.0.v20181107-1410,1.9.0.v20181107-1410]
net.i2p.crypto.eddsa [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
net.i2p.crypto.eddsa.source [0.3.0.v20181102-1323,0.3.0.v20181102-1323]
org.apache.ant [1.10.7.v20190926-0324,1.10.7.v20190926-0324]
org.apache.ant.source [1.10.7.v20190926-0324,1.10.7.v20190926-0324]
org.apache.commons.codec [1.13.0.v20200108-0001,1.13.0.v20200108-0001]
org.apache.commons.codec.source [1.13.0.v20200108-0001,1.13.0.v20200108-0001]
org.apache.commons.compress [1.19.0.v20200106-2343,1.19.0.v20200106-2343]
org.apache.commons.compress.source [1.19.0.v20200106-2343,1.19.0.v20200106-2343]
org.apache.commons.logging [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
org.apache.commons.logging.source [1.2.0.v20180409-1502,1.2.0.v20180409-1502]
org.apache.httpcomponents.httpclient [4.5.10.v20200114-1512,4.5.10.v20200114-1512]
org.apache.httpcomponents.httpclient.source [4.5.10.v20200114-1512,4.5.10.v20200114-1512]
org.apache.httpcomponents.httpcore [4.4.12.v20200108-1212,4.4.12.v20200108-1212]
org.apache.httpcomponents.httpcore.source [4.4.12.v20200108-1212,4.4.12.v20200108-1212]
org.apache.log4j [1.2.15.v201012070815,1.2.15.v201012070815]
org.apache.log4j.source [1.2.15.v201012070815,1.2.15.v201012070815]
org.apache.sshd.osgi [2.2.0.v20190425-2127,2.2.0.v20190425-2127]
org.apache.sshd.osgi.source [2.2.0.v20190425-2127,2.2.0.v20190425-2127]
org.apache.sshd.sftp [2.2.0.v20190425-2127,2.2.0.v20190425-2127]
org.apache.sshd.sftp.source [2.2.0.v20190425-2127,2.2.0.v20190425-2127]
org.assertj [3.14.0.v20200120-1926,3.14.0.v20200120-1926]
org.assertj.source [3.14.0.v20200120-1926,3.14.0.v20200120-1926]
org.bouncycastle.bcpg [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
org.bouncycastle.bcpg.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
org.bouncycastle.bcpkix [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
org.bouncycastle.bcpkix.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
org.bouncycastle.bcprov [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
org.bouncycastle.bcprov.source [1.64.0.v20191109-0815,1.64.0.v20191109-0815]
org.hamcrest [1.1.0.v20090501071000,1.1.0.v20090501071000]
org.hamcrest.core [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
org.hamcrest.core.source [1.3.0.v20180420-1519,1.3.0.v20180420-1519]
org.hamcrest.library [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
org.hamcrest.library.source [1.3.0.v20180524-2246,1.3.0.v20180524-2246]
org.junit [4.13.0.v20200128-1312,4.13.0.v20200128-1312]
org.junit.source [4.13.0.v20200128-1312,4.13.0.v20200128-1312]
org.kohsuke.args4j [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
org.kohsuke.args4j.source [2.33.0.v20160323-2218,2.33.0.v20160323-2218]
org.mockito [2.23.0.v20190527-1420,2.23.0.v20190527-1420]
org.mockito.source [2.23.0.v20190527-1420,2.23.0.v20190527-1420]
org.objenesis [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
org.objenesis.source [2.6.0.v20180420-1519,2.6.0.v20180420-1519]
org.slf4j.api [1.7.2.v20121108-1250,1.7.2.v20121108-1250]
org.slf4j.api.source [1.7.2.v20121108-1250,1.7.2.v20121108-1250]
org.slf4j.impl.log4j12 [1.7.2.v20131105-2200,1.7.2.v20131105-2200]
org.slf4j.impl.log4j12.source [1.7.2.v20131105-2200,1.7.2.v20131105-2200]
org.tukaani.xz [1.8.0.v20180207-1613,1.8.0.v20180207-1613]
org.tukaani.xz.source [1.8.0.v20180207-1613,1.8.0.v20180207-1613]
}

2
org.eclipse.jgit.packaging/pom.xml

@ -22,7 +22,7 @@
<name>JGit Tycho Parent</name> <name>JGit Tycho Parent</name>
<properties> <properties>
<tycho-version>1.5.1</tycho-version> <tycho-version>1.6.0</tycho-version>
<tycho-extras-version>${tycho-version}</tycho-extras-version> <tycho-extras-version>${tycho-version}</tycho-extras-version>
<target-platform>jgit-4.6</target-platform> <target-platform>jgit-4.6</target-platform>
</properties> </properties>

4
org.eclipse.jgit.pgm.test/META-INF/MANIFEST.MF

@ -26,7 +26,7 @@ Import-Package: org.eclipse.jgit.api;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util;version="[5.7.0,5.8.0)", org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)", org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)",
org.hamcrest.core;bundle-version="[1.1.0,2.0.0)", org.hamcrest.core;bundle-version="[1.1.0,2.0.0)",
org.junit;version="[4.12,5.0.0)", org.junit;version="[4.13,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)", org.junit.rules;version="[4.13,5.0.0)",
org.kohsuke.args4j;version="[2.33.0,3.0.0)" org.kohsuke.args4j;version="[2.33.0,3.0.0)"
Require-Bundle: org.tukaani.xz;bundle-version="[1.3.0,2.0.0)" Require-Bundle: org.tukaani.xz;bundle-version="[1.3.0,2.0.0)"

26
org.eclipse.jgit.pgm.test/tst/org/eclipse/jgit/pgm/BlameTest.java

@ -9,6 +9,7 @@
*/ */
package org.eclipse.jgit.pgm; package org.eclipse.jgit.pgm;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.eclipse.jgit.api.Git; import org.eclipse.jgit.api.Git;
@ -17,24 +18,18 @@ import org.eclipse.jgit.lib.CLIRepositoryTestCase;
import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.PersonIdent;
import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevCommit;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class BlameTest extends CLIRepositoryTestCase { public class BlameTest extends CLIRepositoryTestCase {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test @Test
public void testBlameNoHead() throws Exception { public void testBlameNoHead() throws Exception {
try (Git git = new Git(db)) { try (Git git = new Git(db)) {
writeTrashFile("inIndex.txt", "index"); writeTrashFile("inIndex.txt", "index");
git.add().addFilepattern("inIndex.txt").call(); git.add().addFilepattern("inIndex.txt").call();
} }
thrown.expect(Die.class); assertThrows("no such ref: HEAD", Die.class,
thrown.expectMessage("no such ref: HEAD"); () -> execute("git blame inIndex.txt"));
execute("git blame inIndex.txt");
} }
@Test @Test
@ -68,9 +63,8 @@ public class BlameTest extends CLIRepositoryTestCase {
git.commit().setMessage("initial commit").call(); git.commit().setMessage("initial commit").call();
} }
writeTrashFile("onlyInWorkingTree.txt", "not in repo"); writeTrashFile("onlyInWorkingTree.txt", "not in repo");
thrown.expect(Die.class); assertThrows("no such path 'onlyInWorkingTree.txt' in HEAD", Die.class,
thrown.expectMessage("no such path 'onlyInWorkingTree.txt' in HEAD"); () -> execute("git blame onlyInWorkingTree.txt"));
execute("git blame onlyInWorkingTree.txt");
} }
@Test @Test
@ -78,9 +72,8 @@ public class BlameTest extends CLIRepositoryTestCase {
try (Git git = new Git(db)) { try (Git git = new Git(db)) {
git.commit().setMessage("initial commit").call(); git.commit().setMessage("initial commit").call();
} }
thrown.expect(Die.class); assertThrows("no such path 'does_not_exist.txt' in HEAD", Die.class,
thrown.expectMessage("no such path 'does_not_exist.txt' in HEAD"); () -> execute("git blame does_not_exist.txt"));
execute("git blame does_not_exist.txt");
} }
@Test @Test
@ -88,9 +81,8 @@ public class BlameTest extends CLIRepositoryTestCase {
try (Git git = new Git(db)) { try (Git git = new Git(db)) {
git.commit().setMessage("initial commit").call(); git.commit().setMessage("initial commit").call();
} }
thrown.expect(Die.class); assertThrows("no such path 'sub/does_not_exist.txt' in HEAD", Die.class,
thrown.expectMessage("no such path 'sub/does_not_exist.txt' in HEAD"); () -> execute("git blame sub/does_not_exist.txt"));
execute("git blame sub/does_not_exist.txt");
} }
@Test @Test

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Checkout.java

@ -100,7 +100,7 @@ class Checkout extends TextBuiltin {
.format(CLIText.get().pathspecDidNotMatch, name), e); .format(CLIText.get().pathspecDidNotMatch, name), e);
} catch (RefAlreadyExistsException e) { } catch (RefAlreadyExistsException e) {
throw die(MessageFormat throw die(MessageFormat
.format(CLIText.get().branchAlreadyExists, name)); .format(CLIText.get().branchAlreadyExists, name), e);
} catch (CheckoutConflictException e) { } catch (CheckoutConflictException e) {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append(CLIText.get().checkoutConflict); builder.append(CLIText.get().checkoutConflict);

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Clone.java

@ -110,7 +110,7 @@ class Clone extends AbstractFetchCommand implements CloneCommand.Callback {
outw.println(CLIText.get().clonedEmptyRepository); outw.println(CLIText.get().clonedEmptyRepository);
} catch (InvalidRemoteException e) { } catch (InvalidRemoteException e) {
throw die(MessageFormat.format(CLIText.get().doesNotExist, throw die(MessageFormat.format(CLIText.get().doesNotExist,
sourceUri)); sourceUri), e);
} finally { } finally {
if (db != null) if (db != null)
db.close(); db.close();

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/ReceivePack.java

@ -42,7 +42,7 @@ class ReceivePack extends TextBuiltin {
db = key.open(true /* must exist */); db = key.open(true /* must exist */);
} catch (RepositoryNotFoundException notFound) { } catch (RepositoryNotFoundException notFound) {
throw die(MessageFormat.format(CLIText.get().notAGitRepository, throw die(MessageFormat.format(CLIText.get().notAGitRepository,
dstGitdir.getPath())); dstGitdir.getPath()), notFound);
} catch (IOException e) { } catch (IOException e) {
throw die(e.getMessage(), e); throw die(e.getMessage(), e);
} }

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Tag.java

@ -74,7 +74,7 @@ class Tag extends TextBuiltin {
command.call(); command.call();
} catch (RefAlreadyExistsException e) { } catch (RefAlreadyExistsException e) {
throw die(MessageFormat.format( throw die(MessageFormat.format(
CLIText.get().tagAlreadyExists, tagName)); CLIText.get().tagAlreadyExists, tagName), e);
} }
} }
} else { } else {

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/UploadPack.java

@ -50,7 +50,7 @@ class UploadPack extends TextBuiltin {
up.upload(ins, outs, errs); up.upload(ins, outs, errs);
} catch (RepositoryNotFoundException notFound) { } catch (RepositoryNotFoundException notFound) {
throw die(MessageFormat.format(CLIText.get().notAGitRepository, throw die(MessageFormat.format(CLIText.get().notAGitRepository,
srcGitdir.getPath())); srcGitdir.getPath()), notFound);
} catch (IOException e) { } catch (IOException e) {
throw die(e.getMessage(), e); throw die(e.getMessage(), e);
} }

8
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/RebuildCommitGraph.java

@ -235,7 +235,9 @@ class RebuildCommitGraph extends TextBuiltin {
try { try {
lck.write(content); lck.write(content);
} catch (IOException ioe) { } catch (IOException ioe) {
throw new ObjectWritingException(MessageFormat.format(CLIText.get().cantWrite, file)); throw new ObjectWritingException(
MessageFormat.format(CLIText.get().cantWrite, file),
ioe);
} }
if (!lck.commit()) if (!lck.commit())
throw new ObjectWritingException(MessageFormat.format(CLIText.get().cantWrite, file)); throw new ObjectWritingException(MessageFormat.format(CLIText.get().cantWrite, file));
@ -266,7 +268,9 @@ class RebuildCommitGraph extends TextBuiltin {
errw.println(MessageFormat.format(CLIText.get().skippingObject, type, name)); errw.println(MessageFormat.format(CLIText.get().skippingObject, type, name));
continue; continue;
} }
throw new MissingObjectException(id, type); MissingObjectException mue1 = new MissingObjectException(id, type);
mue1.initCause(mue);
throw mue1;
} }
refs.put(name, new ObjectIdRef.Unpeeled(Ref.Storage.PACKED, refs.put(name, new ObjectIdRef.Unpeeled(Ref.Storage.PACKED,
name, id)); name, id));

2
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/debug/ShowPackDelta.java

@ -57,7 +57,7 @@ class ShowPackDelta extends TextBuiltin {
if (BinaryDelta.getResultSize(delta) != size) if (BinaryDelta.getResultSize(delta) != size)
throw die("Object " + obj.name() + " is not a delta"); //$NON-NLS-1$ //$NON-NLS-2$ throw die("Object " + obj.name() + " is not a delta"); //$NON-NLS-1$ //$NON-NLS-2$
} catch (ArrayIndexOutOfBoundsException bad) { } catch (ArrayIndexOutOfBoundsException bad) {
throw die("Object " + obj.name() + " is not a delta"); //$NON-NLS-1$ //$NON-NLS-2$ throw die("Object " + obj.name() + " is not a delta", bad); //$NON-NLS-1$ //$NON-NLS-2$
} }
outw.println(BinaryDelta.format(delta)); outw.println(BinaryDelta.format(delta));

4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/AbstractTreeIteratorHandler.java

@ -101,8 +101,10 @@ public class AbstractTreeIteratorHandler extends
try (ObjectReader curs = clp.getRepository().newObjectReader()) { try (ObjectReader curs = clp.getRepository().newObjectReader()) {
p.reset(curs, clp.getRevWalk().parseTree(id)); p.reset(curs, clp.getRevWalk().parseTree(id));
} catch (MissingObjectException | IncorrectObjectTypeException e) { } catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp, CmdLineException cle = new CmdLineException(clp,
CLIText.format(CLIText.get().notATree), name); CLIText.format(CLIText.get().notATree), name);
cle.initCause(e);
throw cle;
} catch (IOException e) { } catch (IOException e) {
throw new CmdLineException(clp, throw new CmdLineException(clp,
CLIText.format(CLIText.get().cannotReadBecause), name, CLIText.format(CLIText.get().cannotReadBecause), name,

4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevCommitHandler.java

@ -98,8 +98,10 @@ public class RevCommitHandler extends OptionHandler<RevCommit> {
try { try {
c = clp.getRevWalk().parseCommit(id); c = clp.getRevWalk().parseCommit(id);
} catch (MissingObjectException | IncorrectObjectTypeException e) { } catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp, CmdLineException cle = new CmdLineException(clp,
CLIText.format(CLIText.get().notACommit), name); CLIText.format(CLIText.get().notACommit), name);
cle.initCause(e);
throw cle;
} catch (IOException e) { } catch (IOException e) {
throw new CmdLineException(clp, throw new CmdLineException(clp,
CLIText.format(CLIText.get().cannotReadBecause), name, CLIText.format(CLIText.get().cannotReadBecause), name,

4
org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/opt/RevTreeHandler.java

@ -70,8 +70,10 @@ public class RevTreeHandler extends OptionHandler<RevTree> {
try { try {
c = clp.getRevWalk().parseTree(id); c = clp.getRevWalk().parseTree(id);
} catch (MissingObjectException | IncorrectObjectTypeException e) { } catch (MissingObjectException | IncorrectObjectTypeException e) {
throw new CmdLineException(clp, CmdLineException cle = new CmdLineException(clp,
CLIText.format(CLIText.get().notATree), name); CLIText.format(CLIText.get().notATree), name);
cle.initCause(e);
throw cle;
} catch (IOException e) { } catch (IOException e) {
throw new CmdLineException(clp, throw new CmdLineException(clp,
CLIText.format(CLIText.get().cannotReadBecause), name, CLIText.format(CLIText.get().cannotReadBecause), name,

6
org.eclipse.jgit.ssh.apache.test/META-INF/MANIFEST.MF

@ -24,6 +24,6 @@ Import-Package: org.apache.sshd.client.config.hosts;version="[2.2.0,2.3.0)",
org.eclipse.jgit.transport.ssh;version="[5.7.0,5.8.0)", org.eclipse.jgit.transport.ssh;version="[5.7.0,5.8.0)",
org.eclipse.jgit.transport.sshd;version="[5.7.0,5.8.0)", org.eclipse.jgit.transport.sshd;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util;version="[5.7.0,5.8.0)", org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.junit;version="[4.12,5.0.0)", org.junit;version="[4.13,5.0.0)",
org.junit.experimental.theories;version="[4.12,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)" org.junit.runner;version="[4.13,5.0.0)"

1
org.eclipse.jgit.test/BUILD

@ -55,6 +55,7 @@ java_library(
srcs = HELPERS, srcs = HELPERS,
resources = DATA, resources = DATA,
deps = [ deps = [
"//lib:assertj-core",
"//lib:jsch", "//lib:jsch",
"//lib:junit", "//lib:junit",
"//lib:mockito", "//lib:mockito",

12
org.eclipse.jgit.test/META-INF/MANIFEST.MF

@ -17,6 +17,7 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.apache.commons.compress.compressors.bzip2;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.bzip2;version="[1.15.0,2.0)",
org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.gzip;version="[1.15.0,2.0)",
org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)", org.apache.commons.compress.compressors.xz;version="[1.15.0,2.0)",
org.assertj.core.api;version="[3.14.0,4.0.0)",
org.bouncycastle.util.encoders;version="[1.61.0,2.0.0)", org.bouncycastle.util.encoders;version="[1.61.0,2.0.0)",
org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)", org.eclipse.jgit.annotations;version="[5.7.0,5.8.0)",
org.eclipse.jgit.api;version="[5.7.0,5.8.0)", org.eclipse.jgit.api;version="[5.7.0,5.8.0)",
@ -70,11 +71,12 @@ Import-Package: com.googlecode.javaewah;version="[1.1.6,2.0.0)",
org.eclipse.jgit.util;version="[5.7.0,5.8.0)", org.eclipse.jgit.util;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)", org.eclipse.jgit.util.io;version="[5.7.0,5.8.0)",
org.eclipse.jgit.util.sha1;version="[5.7.0,5.8.0)", org.eclipse.jgit.util.sha1;version="[5.7.0,5.8.0)",
org.junit;version="[4.12,5.0.0)", org.junit;version="[4.13,5.0.0)",
org.junit.experimental.theories;version="[4.12,5.0.0)", org.junit.experimental.theories;version="[4.13,5.0.0)",
org.junit.rules;version="[4.12,5.0.0)", org.junit.function;version="[4.13.0,5.0.0)",
org.junit.runner;version="[4.12,5.0.0)", org.junit.rules;version="[4.13,5.0.0)",
org.junit.runners;version="[4.12,5.0.0)", org.junit.runner;version="[4.13,5.0.0)",
org.junit.runners;version="[4.13,5.0.0)",
org.mockito;version="[2.23.0,3.0.0)", org.mockito;version="[2.23.0,3.0.0)",
org.mockito.invocation;version="[2.23.0,3.0.0)", org.mockito.invocation;version="[2.23.0,3.0.0)",
org.mockito.junit;version="[2.23.0,3.0.0)", org.mockito.junit;version="[2.23.0,3.0.0)",

5
org.eclipse.jgit.test/pom.xml

@ -65,6 +65,11 @@
<version>[1.1.0,2.0.0)</version> <version>[1.1.0,2.0.0)</version>
</dependency> </dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId> <artifactId>mockito-core</artifactId>

46
org.eclipse.jgit.test/src/org/eclipse/jgit/lib/MoreAsserts.java

@ -1,46 +0,0 @@
/*
* Copyright (C) 2019, Google LLC and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* https://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.eclipse.jgit.lib;
/** Assertion methods. */
public class MoreAsserts {
/**
* Simple version of assertThrows that will be introduced in JUnit 4.13.
*
* @param expected
* Expected throwable class
* @param r
* Runnable that is expected to throw an exception.
* @return The thrown exception.
*/
public static <T extends Throwable> T assertThrows(Class<T> expected,
ThrowingRunnable r) {
try {
r.run();
} catch (Throwable actual) {
if (expected.isAssignableFrom(actual.getClass())) {
@SuppressWarnings("unchecked")
T toReturn = (T) actual;
return toReturn;
}
throw new AssertionError("Expected " + expected.getSimpleName()
+ ", but got " + actual.getClass().getSimpleName(), actual);
}
throw new AssertionError(
"Expected " + expected.getSimpleName() + " to be thrown");
}
public interface ThrowingRunnable {
void run() throws Throwable;
}
private MoreAsserts() {
}
}

10
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/RenameBranchCommandTest.java

@ -14,6 +14,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import org.eclipse.jgit.api.errors.RefAlreadyExistsException; import org.eclipse.jgit.api.errors.RefAlreadyExistsException;
@ -25,9 +26,7 @@ import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.StoredConfig; import org.eclipse.jgit.lib.StoredConfig;
import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevCommit;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
/** /**
* Unit tests of {@link RenameBranchCommand} * Unit tests of {@link RenameBranchCommand}
@ -40,9 +39,6 @@ public class RenameBranchCommandTest extends RepositoryTestCase {
private Git git; private Git git;
@Rule
public ExpectedException thrown = ExpectedException.none();
@Override @Override
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
@ -57,8 +53,8 @@ public class RenameBranchCommandTest extends RepositoryTestCase {
@Test @Test
public void renameToExisting() throws Exception { public void renameToExisting() throws Exception {
assertNotNull(git.branchCreate().setName("foo").call()); assertNotNull(git.branchCreate().setName("foo").call());
thrown.expect(RefAlreadyExistsException.class); assertThrows(RefAlreadyExistsException.class, () -> git.branchRename()
git.branchRename().setOldName("master").setNewName("foo").call(); .setOldName("master").setNewName("foo").call());
} }
@Test @Test

132
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/SecurityManagerMissingPermissionsTest.java

@ -0,0 +1,132 @@
/*
* Copyright (c) 2019 Alex Jitianu <alex_jitianu@sync.ro> and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* https://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.eclipse.jgit.api;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import java.io.File;
import java.io.IOException;
import java.io.StringWriter;
import java.nio.file.Files;
import java.nio.file.Path;
import java.security.Policy;
import java.util.Collections;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
import org.apache.log4j.WriterAppender;
import org.eclipse.jgit.junit.RepositoryTestCase;
import org.eclipse.jgit.util.FileUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
/**
* Tests that using a SecurityManager does not result in errors logged.
*/
public class SecurityManagerMissingPermissionsTest extends RepositoryTestCase {
/**
* Collects all logging sent to the logging system.
*/
private final StringWriter errorOutputWriter = new StringWriter();
/**
* Appender to intercept all logging sent to the logging system.
*/
private WriterAppender appender;
private SecurityManager originalSecurityManager;
@Override
@Before
public void setUp() throws Exception {
originalSecurityManager = System.getSecurityManager();
appender = new WriterAppender(
new PatternLayout(PatternLayout.TTCC_CONVERSION_PATTERN),
errorOutputWriter);
Logger.getRootLogger().addAppender(appender);
refreshPolicyAllPermission(Policy.getPolicy());
System.setSecurityManager(new SecurityManager());
super.setUp();
}
/**
* If a SecurityManager is active a lot of {@link java.io.FilePermission}
* errors are thrown and logged while initializing a repository.
*
* @throws Exception
*/
@Test
public void testCreateNewRepos_MissingPermissions() throws Exception {
File wcTree = new File(getTemporaryDirectory(),
"CreateNewRepositoryTest_testCreateNewRepos");
File marker = new File(getTemporaryDirectory(), "marker");
Files.write(marker.toPath(), Collections.singletonList("Can write"));
assertTrue("Can write in test directory", marker.isFile());
FileUtils.delete(marker);
assertFalse("Can delete in test direcory", marker.exists());
Git git = Git.init().setBare(false)
.setDirectory(new File(wcTree.getAbsolutePath())).call();
addRepoToClose(git.getRepository());
assertEquals("", errorOutputWriter.toString());
}
@Override
@After
public void tearDown() throws Exception {
System.setSecurityManager(originalSecurityManager);
Logger.getRootLogger().removeAppender(appender);
super.tearDown();
}
/**
* Refresh the Java Security Policy.
*
* @param policy
* the policy object
*
* @throws IOException
* if the temporary file that contains the policy could not be
* created
*/
private static void refreshPolicyAllPermission(Policy policy)
throws IOException {
// Starting with an all permissions policy.
String policyString = "grant { permission java.security.AllPermission; };";
// Do not use TemporaryFilesFactory, it will create a dependency cycle
Path policyFile = Files.createTempFile("testpolicy", ".txt");
try {
Files.write(policyFile, Collections.singletonList(policyString));
System.setProperty("java.security.policy",
policyFile.toUri().toURL().toString());
policy.refresh();
} finally {
try {
Files.delete(policyFile);
} catch (IOException e) {
// Do not log; the test tests for no logging having occurred
e.printStackTrace();
}
}
}
}

4
org.eclipse.jgit.test/tst/org/eclipse/jgit/diff/DiffEntryTest.java

@ -13,9 +13,9 @@ import static org.eclipse.jgit.diff.DiffEntry.DEV_NULL;
import static org.eclipse.jgit.util.FileUtils.delete; import static org.eclipse.jgit.util.FileUtils.delete;
import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.File; import java.io.File;
@ -26,8 +26,8 @@ import org.eclipse.jgit.diff.DiffEntry.ChangeType;
import org.eclipse.jgit.dircache.DirCache; import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheEditor; import org.eclipse.jgit.dircache.DirCacheEditor;
import org.eclipse.jgit.dircache.DirCacheEditor.PathEdit; import org.eclipse.jgit.dircache.DirCacheEditor.PathEdit;
import org.eclipse.jgit.internal.storage.file.FileRepository;
import org.eclipse.jgit.dircache.DirCacheEntry; import org.eclipse.jgit.dircache.DirCacheEntry;
import org.eclipse.jgit.internal.storage.file.FileRepository;
import org.eclipse.jgit.junit.JGitTestUtil; import org.eclipse.jgit.junit.JGitTestUtil;
import org.eclipse.jgit.junit.RepositoryTestCase; import org.eclipse.jgit.junit.RepositoryTestCase;
import org.eclipse.jgit.lib.FileMode; import org.eclipse.jgit.lib.FileMode;

13
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfigTest.java

@ -40,23 +40,18 @@ package org.eclipse.jgit.internal.storage.dfs;
import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThrows;
import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.internal.JGitText;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class DfsBlockCacheConfigTest { public class DfsBlockCacheConfigTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test @Test
public void blockSizeNotPowerOfTwoExpectsException() { public void blockSizeNotPowerOfTwoExpectsException() {
thrown.expect(IllegalArgumentException.class); assertThrows(JGitText.get().blockSizeNotPowerOf2,
thrown.expectMessage(is(JGitText.get().blockSizeNotPowerOf2)); IllegalArgumentException.class,
() -> new DfsBlockCacheConfig().setBlockSize(1000));
new DfsBlockCacheConfig().setBlockSize(1000);
} }
@Test @Test

13
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/FileReftableStackTest.java

@ -12,6 +12,7 @@ package org.eclipse.jgit.internal.storage.file;
import static org.eclipse.jgit.lib.Ref.Storage.PACKED; import static org.eclipse.jgit.lib.Ref.Storage.PACKED;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.File; import java.io.File;
@ -21,6 +22,7 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.eclipse.jgit.internal.storage.file.FileReftableStack.Segment; import org.eclipse.jgit.internal.storage.file.FileReftableStack.Segment;
import org.eclipse.jgit.internal.storage.reftable.MergedReftable; import org.eclipse.jgit.internal.storage.reftable.MergedReftable;
import org.eclipse.jgit.internal.storage.reftable.RefCursor; import org.eclipse.jgit.internal.storage.reftable.RefCursor;
@ -31,9 +33,7 @@ import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.FileUtils;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class FileReftableStackTest { public class FileReftableStackTest {
@ -113,9 +113,6 @@ public class FileReftableStackTest {
testCompaction(1024); testCompaction(1024);
} }
@Rule
public final ExpectedException thrown = ExpectedException.none();
@SuppressWarnings({ "resource", "unused" }) @SuppressWarnings({ "resource", "unused" })
@Test @Test
public void missingReftable() throws Exception { public void missingReftable() throws Exception {
@ -143,9 +140,9 @@ public class FileReftableStackTest {
} }
} }
} }
thrown.expect(FileNotFoundException.class); assertThrows(FileNotFoundException.class,
new FileReftableStack(new File(reftableDir, "refs"), reftableDir, null, () -> new FileReftableStack(new File(reftableDir, "refs"),
() -> new Config()); reftableDir, null, () -> new Config()));
} }
@Test @Test

2
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/GcPackRefsTest.java

@ -10,13 +10,13 @@
package org.eclipse.jgit.internal.storage.file; package org.eclipse.jgit.internal.storage.file;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.lessThanOrEqualTo; import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame; import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;

17
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/ObjectDirectoryTest.java

@ -44,6 +44,7 @@ package org.eclipse.jgit.internal.storage.file;
import static java.nio.charset.StandardCharsets.UTF_8; import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.File; import java.io.File;
@ -67,15 +68,10 @@ import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.storage.file.FileBasedConfig; import org.eclipse.jgit.storage.file.FileBasedConfig;
import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS;
import org.junit.Assume; import org.junit.Assume;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class ObjectDirectoryTest extends RepositoryTestCase { public class ObjectDirectoryTest extends RepositoryTestCase {
@Rule
public ExpectedException expectedEx = ExpectedException.none();
@Test @Test
public void testConcurrentInsertionOfBlobsToTheSameNewFanOutDirectory() public void testConcurrentInsertionOfBlobsToTheSameNewFanOutDirectory()
throws Exception { throws Exception {
@ -199,8 +195,7 @@ public class ObjectDirectoryTest extends RepositoryTestCase {
} }
@Test @Test
public void testShallowFileCorrupt() public void testShallowFileCorrupt() throws Exception {
throws Exception {
FileRepository repository = createBareRepository(); FileRepository repository = createBareRepository();
ObjectDirectory dir = repository.getObjectDatabase(); ObjectDirectory dir = repository.getObjectDatabase();
@ -210,11 +205,9 @@ public class ObjectDirectoryTest extends RepositoryTestCase {
UTF_8.name())) { UTF_8.name())) {
writer.println(commit); writer.println(commit);
} }
assertThrows(
expectedEx.expect(IOException.class); MessageFormat.format(JGitText.get().badShallowLine, commit),
expectedEx.expectMessage(MessageFormat IOException.class, () -> dir.getShallowCommits());
.format(JGitText.get().badShallowLine, commit));
dir.getShallowCommits();
} }
private Collection<Callable<ObjectId>> blobInsertersForTheSameFanOutDir( private Collection<Callable<ObjectId>> blobInsertersForTheSameFanOutDir(

3
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/PackInserterTest.java

@ -45,15 +45,14 @@ package org.eclipse.jgit.internal.storage.file;
import static java.util.Comparator.comparing; import static java.util.Comparator.comparing;
import static java.util.stream.Collectors.toList; import static java.util.stream.Collectors.toList;
import static org.eclipse.jgit.lib.Constants.OBJ_BLOB; import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
import static org.eclipse.jgit.lib.Constants.OBJ_COMMIT; import static org.eclipse.jgit.lib.Constants.OBJ_COMMIT;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.greaterThan; import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.lessThan;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;

13
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/file/T0003_BasicTest.java

@ -19,6 +19,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
@ -53,13 +54,9 @@ import org.eclipse.jgit.test.resources.SampleDataRepositoryTestCase;
import org.eclipse.jgit.util.FS; import org.eclipse.jgit.util.FS;
import org.eclipse.jgit.util.FileUtils; import org.eclipse.jgit.util.FileUtils;
import org.eclipse.jgit.util.IO; import org.eclipse.jgit.util.IO;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class T0003_BasicTest extends SampleDataRepositoryTestCase { public class T0003_BasicTest extends SampleDataRepositoryTestCase {
@Rule
public ExpectedException expectedException = ExpectedException.none();
@Test @Test
public void test001_Initalize() { public void test001_Initalize() {
@ -311,10 +308,10 @@ public class T0003_BasicTest extends SampleDataRepositoryTestCase {
// We won't create a tree entry with an empty filename // We won't create a tree entry with an empty filename
// //
final TreeFormatter formatter = new TreeFormatter(); final TreeFormatter formatter = new TreeFormatter();
expectedException.expect(IllegalArgumentException.class); assertThrows(JGitText.get().invalidTreeZeroLengthName,
expectedException.expectMessage(JGitText.get().invalidTreeZeroLengthName); IllegalArgumentException.class,
formatter.append("", FileMode.TREE, () -> formatter.append("", FileMode.TREE, ObjectId.fromString(
ObjectId.fromString("4b825dc642cb6eb9a060e54bf8d69288fbee4904")); "4b825dc642cb6eb9a060e54bf8d69288fbee4904")));
} }
@Test @Test

4
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/storage/reftable/ReftableTest.java

@ -13,16 +13,16 @@ package org.eclipse.jgit.internal.storage.reftable;
import static org.eclipse.jgit.lib.Constants.HEAD; import static org.eclipse.jgit.lib.Constants.HEAD;
import static org.eclipse.jgit.lib.Constants.OBJECT_ID_LENGTH; import static org.eclipse.jgit.lib.Constants.OBJECT_ID_LENGTH;
import static org.eclipse.jgit.lib.Constants.R_HEADS; import static org.eclipse.jgit.lib.Constants.R_HEADS;
import static org.eclipse.jgit.lib.MoreAsserts.assertThrows;
import static org.eclipse.jgit.lib.Ref.Storage.NEW; import static org.eclipse.jgit.lib.Ref.Storage.NEW;
import static org.eclipse.jgit.lib.Ref.Storage.PACKED; import static org.eclipse.jgit.lib.Ref.Storage.PACKED;
import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.containsString;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame; import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;

36
org.eclipse.jgit.test/tst/org/eclipse/jgit/internal/transport/http/NetscapeCookieFileTest.java

@ -9,6 +9,10 @@
*/ */
package org.eclipse.jgit.internal.transport.http; package org.eclipse.jgit.internal.transport.http;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.Writer; import java.io.Writer;
@ -27,10 +31,8 @@ import java.util.Set;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.eclipse.jgit.internal.storage.file.LockFile; import org.eclipse.jgit.internal.storage.file.LockFile;
import org.eclipse.jgit.internal.transport.http.NetscapeCookieFile;
import org.eclipse.jgit.util.http.HttpCookiesMatcher; import org.eclipse.jgit.util.http.HttpCookiesMatcher;
import org.hamcrest.CoreMatchers; import org.hamcrest.CoreMatchers;
import org.junit.Assert;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
@ -81,11 +83,10 @@ public class NetscapeCookieFileTest {
cookie = new HttpCookie("key3", "valueFromSet2"); cookie = new HttpCookie("key3", "valueFromSet2");
cookiesExpectedMergedSet.add(cookie); cookiesExpectedMergedSet.add(cookie);
Assert.assertThat( assertThat(NetscapeCookieFile.mergeCookies(cookieSet1, cookieSet2),
NetscapeCookieFile.mergeCookies(cookieSet1, cookieSet2),
HttpCookiesMatcher.containsInOrder(cookiesExpectedMergedSet)); HttpCookiesMatcher.containsInOrder(cookiesExpectedMergedSet));
Assert.assertThat(NetscapeCookieFile.mergeCookies(cookieSet1, null), assertThat(NetscapeCookieFile.mergeCookies(cookieSet1, null),
HttpCookiesMatcher.containsInOrder(cookieSet1)); HttpCookiesMatcher.containsInOrder(cookieSet1));
} }
@ -110,8 +111,7 @@ public class NetscapeCookieFileTest {
String expectedExpiration = String String expectedExpiration = String
.valueOf(creationDate.getTime() + (cookie.getMaxAge() * 1000)); .valueOf(creationDate.getTime() + (cookie.getMaxAge() * 1000));
Assert.assertThat( assertThat(Files.readAllLines(tmpFile, StandardCharsets.US_ASCII),
Files.readAllLines(tmpFile, StandardCharsets.US_ASCII),
CoreMatchers CoreMatchers
.equalTo(Arrays.asList("mydomain.com\tTRUE\t/\tTRUE\t" .equalTo(Arrays.asList("mydomain.com\tTRUE\t/\tTRUE\t"
+ expectedExpiration + "\tkey2\tvalue"))); + expectedExpiration + "\tkey2\tvalue")));
@ -136,8 +136,7 @@ public class NetscapeCookieFileTest {
String expectedExpiration = String String expectedExpiration = String
.valueOf(creationDate.getTime() + (cookie.getMaxAge() * 1000)); .valueOf(creationDate.getTime() + (cookie.getMaxAge() * 1000));
Assert.assertThat( assertThat(Files.readAllLines(tmpFile, StandardCharsets.US_ASCII),
Files.readAllLines(tmpFile, StandardCharsets.US_ASCII),
CoreMatchers.equalTo( CoreMatchers.equalTo(
Arrays.asList("domain.com\tTRUE\t/my/path\tFALSE\t" Arrays.asList("domain.com\tTRUE\t/my/path\tFALSE\t"
+ expectedExpiration + "\tkey2\tvalue2"))); + expectedExpiration + "\tkey2\tvalue2")));
@ -154,7 +153,7 @@ public class NetscapeCookieFileTest {
// now imitate another process/thread holding the lock file // now imitate another process/thread holding the lock file
LockFile lockFile = new LockFile(tmpFile.toFile()); LockFile lockFile = new LockFile(tmpFile.toFile());
try { try {
Assert.assertTrue("Could not acquire lock", lockFile.lock()); assertTrue("Could not acquire lock", lockFile.lock());
cookieFile.write(baseUrl); cookieFile.write(baseUrl);
} finally { } finally {
lockFile.unlock(); lockFile.unlock();
@ -184,7 +183,7 @@ public class NetscapeCookieFileTest {
List<String> lines = Files.readAllLines(tmpFile, List<String> lines = Files.readAllLines(tmpFile,
StandardCharsets.US_ASCII); StandardCharsets.US_ASCII);
Assert.assertEquals("Expected 3 lines", 3, lines.size()); assertEquals("Expected 3 lines", 3, lines.size());
assertStringMatchesPatternWithInexactNumber(lines.get(0), assertStringMatchesPatternWithInexactNumber(lines.get(0),
"some-domain1\tTRUE\t/some/path1\tFALSE\t(\\d*)\tkey1\tvalueFromSimple2", "some-domain1\tTRUE\t/some/path1\tFALSE\t(\\d*)\tkey1\tvalueFromSimple2",
JAN_01_2030_NOON, 1000); JAN_01_2030_NOON, 1000);
@ -202,12 +201,12 @@ public class NetscapeCookieFileTest {
long delta) { long delta) {
java.util.regex.Matcher matcher = Pattern.compile(pattern) java.util.regex.Matcher matcher = Pattern.compile(pattern)
.matcher(string); .matcher(string);
Assert.assertTrue("Given string '" + string + "' does not match '" assertTrue("Given string '" + string + "' does not match '" + pattern
+ pattern + "'", matcher.matches()); + "'", matcher.matches());
// extract numeric value // extract numeric value
Long actualNumericValue = Long.decode(matcher.group(1)); Long actualNumericValue = Long.decode(matcher.group(1));
Assert.assertTrue( assertTrue(
"Value is supposed to be close to " + expectedNumericValue "Value is supposed to be close to " + expectedNumericValue
+ " but is " + actualNumericValue + ".", + " but is " + actualNumericValue + ".",
Math.abs(expectedNumericValue - actualNumericValue) <= delta); Math.abs(expectedNumericValue - actualNumericValue) <= delta);
@ -238,8 +237,7 @@ public class NetscapeCookieFileTest {
} }
Set<HttpCookie> actualCookies = new NetscapeCookieFile(tmpFile, Set<HttpCookie> actualCookies = new NetscapeCookieFile(tmpFile,
creationDate).getCookies(true); creationDate).getCookies(true);
Assert.assertThat(actualCookies, assertThat(actualCookies, HttpCookiesMatcher.containsInOrder(cookies));
HttpCookiesMatcher.containsInOrder(cookies));
} }
@Test @Test
@ -259,8 +257,7 @@ public class NetscapeCookieFileTest {
NetscapeCookieFile.write(writer, cookies, baseUrl, creationDate); NetscapeCookieFile.write(writer, cookies, baseUrl, creationDate);
} }
// compare original file with newly written one, they should not differ // compare original file with newly written one, they should not differ
Assert.assertEquals(Files.readAllLines(tmpFile), assertEquals(Files.readAllLines(tmpFile), Files.readAllLines(tmpFile2));
Files.readAllLines(tmpFile2));
} }
@Test @Test
@ -289,8 +286,7 @@ public class NetscapeCookieFileTest {
Set<HttpCookie> actualCookies = new NetscapeCookieFile(tmpFile, creationDate) Set<HttpCookie> actualCookies = new NetscapeCookieFile(tmpFile, creationDate)
.getCookies(true); .getCookies(true);
Assert.assertThat(actualCookies, assertThat(actualCookies, HttpCookiesMatcher.containsInOrder(cookies));
HttpCookiesMatcher.containsInOrder(cookies));
} }
@Test @Test

70
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ConfigTest.java

@ -29,6 +29,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame; import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
@ -58,7 +59,6 @@ import org.eclipse.jgit.util.SystemReader;
import org.junit.After; import org.junit.After;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.junit.rules.TemporaryFolder; import org.junit.rules.TemporaryFolder;
/** /**
@ -75,9 +75,6 @@ public class ConfigTest {
private static final String REFS_BACKUP = "+refs/heads/*:refs/remotes/backup/*"; private static final String REFS_BACKUP = "+refs/heads/*:refs/remotes/backup/*";
@Rule
public ExpectedException expectedEx = ExpectedException.none();
@Rule @Rule
public TemporaryFolder tmp = new TemporaryFolder(); public TemporaryFolder tmp = new TemporaryFolder();
@ -721,24 +718,22 @@ public class ConfigTest {
} }
@Test @Test
public void testIncludeInvalidName() throws ConfigInvalidException { public void testIncludeInvalidName() {
expectedEx.expect(ConfigInvalidException.class); assertThrows(JGitText.get().invalidLineInConfigFile,
expectedEx.expectMessage(JGitText.get().invalidLineInConfigFile); ConfigInvalidException.class, () -> parse("[include]\nbar\n"));
parse("[include]\nbar\n");
} }
@Test @Test
public void testIncludeNoValue() throws ConfigInvalidException { public void testIncludeNoValue() {
expectedEx.expect(ConfigInvalidException.class); assertThrows(JGitText.get().invalidLineInConfigFile,
expectedEx.expectMessage(JGitText.get().invalidLineInConfigFile); ConfigInvalidException.class, () -> parse("[include]\npath\n"));
parse("[include]\npath\n");
} }
@Test @Test
public void testIncludeEmptyValue() throws ConfigInvalidException { public void testIncludeEmptyValue() {
expectedEx.expect(ConfigInvalidException.class); assertThrows(JGitText.get().invalidLineInConfigFile,
expectedEx.expectMessage(JGitText.get().invalidLineInConfigFile); ConfigInvalidException.class,
parse("[include]\npath=\n"); () -> parse("[include]\npath=\n"));
} }
@Test @Test
@ -1269,25 +1264,24 @@ public class ConfigTest {
} }
@Test @Test
public void testTimeUnitInvalid() throws ConfigInvalidException { public void testTimeUnitInvalid() {
expectedEx.expect(IllegalArgumentException.class); assertThrows("Invalid time unit value: a.a=1 monttthhh",
expectedEx IllegalArgumentException.class,
.expectMessage("Invalid time unit value: a.a=1 monttthhh"); () -> parseTime("1 monttthhh", DAYS));
parseTime("1 monttthhh", DAYS);
} }
@Test @Test
public void testTimeUnitInvalidWithSection() throws ConfigInvalidException { public void testTimeUnitInvalidWithSection() throws ConfigInvalidException {
Config c = parse("[a \"b\"]\na=1 monttthhh\n"); Config c = parse("[a \"b\"]\na=1 monttthhh\n");
expectedEx.expect(IllegalArgumentException.class); assertThrows("Invalid time unit value: a.b.a=1 monttthhh",
expectedEx.expectMessage("Invalid time unit value: a.b.a=1 monttthhh"); IllegalArgumentException.class,
c.getTimeUnit("a", "b", "a", 0, DAYS); () -> c.getTimeUnit("a", "b", "a", 0, DAYS));
} }
@Test @Test
public void testTimeUnitNegative() throws ConfigInvalidException { public void testTimeUnitNegative() {
expectedEx.expect(IllegalArgumentException.class); assertThrows(IllegalArgumentException.class,
parseTime("-1", MILLISECONDS); () -> parseTime("-1", MILLISECONDS));
} }
@Test @Test
@ -1430,10 +1424,10 @@ public class ConfigTest {
} }
@Test @Test
public void testInvalidGroupHeader() throws ConfigInvalidException { public void testInvalidGroupHeader() {
expectedEx.expect(ConfigInvalidException.class); assertThrows(JGitText.get().badGroupHeader,
expectedEx.expectMessage(JGitText.get().badGroupHeader); ConfigInvalidException.class,
parse("[foo \"bar\" ]\nfoo=bar\n"); () -> parse("[foo \"bar\" ]\nfoo=bar\n"));
} }
@Test @Test
@ -1447,17 +1441,15 @@ public class ConfigTest {
} }
@Test @Test
public void testCrCharContinuation() throws ConfigInvalidException { public void testCrCharContinuation() {
expectedEx.expect(ConfigInvalidException.class); assertThrows("Bad escape: \\u000d", ConfigInvalidException.class,
expectedEx.expectMessage("Bad escape: \\u000d"); () -> parseEscapedValue("tr\\\rue"));
parseEscapedValue("tr\\\rue");
} }
@Test @Test
public void testCrEOFContinuation() throws ConfigInvalidException { public void testCrEOFContinuation() {
expectedEx.expect(ConfigInvalidException.class); assertThrows("Bad escape: \\u000d", ConfigInvalidException.class,
expectedEx.expectMessage("Bad escape: \\u000d"); () -> parseEscapedValue("tr\\\r"));
parseEscapedValue("tr\\\r");
} }
@Test @Test

20
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/ObjectCheckerTest.java

@ -34,6 +34,7 @@ import static org.eclipse.jgit.lib.ObjectChecker.ErrorType.ZERO_PADDED_FILEMODE;
import static org.eclipse.jgit.util.RawParseUtils.decode; import static org.eclipse.jgit.util.RawParseUtils.decode;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame; import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
import java.text.MessageFormat; import java.text.MessageFormat;
@ -41,9 +42,7 @@ import java.text.MessageFormat;
import org.eclipse.jgit.errors.CorruptObjectException; import org.eclipse.jgit.errors.CorruptObjectException;
import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.internal.JGitText;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class ObjectCheckerTest { public class ObjectCheckerTest {
private static final ObjectChecker SECRET_KEY_CHECKER = new ObjectChecker() { private static final ObjectChecker SECRET_KEY_CHECKER = new ObjectChecker() {
@ -84,9 +83,6 @@ public class ObjectCheckerTest {
private ObjectChecker checker; private ObjectChecker checker;
@Rule
public final ExpectedException thrown = ExpectedException.none();
@Before @Before
public void setUp() throws Exception { public void setUp() throws Exception {
checker = new ObjectChecker(); checker = new ObjectChecker();
@ -116,9 +112,9 @@ public class ObjectCheckerTest {
} }
@Test @Test
public void testCheckBlobCorrupt() throws CorruptObjectException { public void testCheckBlobCorrupt() {
thrown.expect(CorruptObjectException.class); assertThrows(CorruptObjectException.class, () -> SECRET_KEY_CHECKER
SECRET_KEY_CHECKER.check(OBJ_BLOB, encodeASCII("key = \"secret_key\"")); .check(OBJ_BLOB, encodeASCII("key = \"secret_key\"")));
} }
@Test @Test
@ -129,11 +125,9 @@ public class ObjectCheckerTest {
} }
@Test @Test
public void testCheckBlobWithBlobObjectCheckerCorrupt() public void testCheckBlobWithBlobObjectCheckerCorrupt() {
throws CorruptObjectException { assertThrows(CorruptObjectException.class, () -> SECRET_KEY_BLOB_CHECKER
thrown.expect(CorruptObjectException.class); .check(OBJ_BLOB, encodeASCII("key = \"secret_key\"")));
SECRET_KEY_BLOB_CHECKER.check(OBJ_BLOB,
encodeASCII("key = \"secret_key\""));
} }
@Test @Test

2
org.eclipse.jgit.test/tst/org/eclipse/jgit/lib/RepositoryCacheTest.java

@ -11,12 +11,12 @@
package org.eclipse.jgit.lib; package org.eclipse.jgit.lib;
import static org.hamcrest.CoreMatchers.hasItem; import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNotSame; import static org.junit.Assert.assertNotSame;
import static org.junit.Assert.assertSame; import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;

19
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/BundleWriterTest.java

@ -17,6 +17,7 @@ import static org.eclipse.jgit.lib.Constants.OBJ_BLOB;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull; import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
@ -44,36 +45,30 @@ import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.revwalk.RevWalk;
import org.eclipse.jgit.test.resources.SampleDataRepositoryTestCase; import org.eclipse.jgit.test.resources.SampleDataRepositoryTestCase;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class BundleWriterTest extends SampleDataRepositoryTestCase { public class BundleWriterTest extends SampleDataRepositoryTestCase {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Test @Test
public void testEmptyBundleFails() throws Exception { public void testEmptyBundleFails() throws Exception {
Repository newRepo = createBareRepository(); Repository newRepo = createBareRepository();
thrown.expect(TransportException.class); assertThrows(TransportException.class,
fetchFromBundle(newRepo, new byte[0]); () -> fetchFromBundle(newRepo, new byte[0]));
} }
@Test @Test
public void testNonBundleFails() throws Exception { public void testNonBundleFails() throws Exception {
Repository newRepo = createBareRepository(); Repository newRepo = createBareRepository();
thrown.expect(TransportException.class); assertThrows(TransportException.class, () -> fetchFromBundle(newRepo,
fetchFromBundle(newRepo, "Not a bundle file".getBytes(UTF_8)); "Not a bundle file".getBytes(UTF_8)));
} }
@Test @Test
public void testGarbageBundleFails() throws Exception { public void testGarbageBundleFails() throws Exception {
Repository newRepo = createBareRepository(); Repository newRepo = createBareRepository();
thrown.expect(TransportException.class); assertThrows(TransportException.class, () -> fetchFromBundle(newRepo,
fetchFromBundle(newRepo,
(TransportBundle.V2_BUNDLE_SIGNATURE + '\n' + "Garbage") (TransportBundle.V2_BUNDLE_SIGNATURE + '\n' + "Garbage")
.getBytes(UTF_8)); .getBytes(UTF_8)));
} }
@Test @Test

2
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV0ParserTest.java

@ -10,8 +10,8 @@
package org.eclipse.jgit.transport; package org.eclipse.jgit.transport;
import static org.eclipse.jgit.transport.ObjectIdMatcher.hasOnlyObjectIds; import static org.eclipse.jgit.transport.ObjectIdMatcher.hasOnlyObjectIds;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;

18
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/ProtocolV2ParserTest.java

@ -9,12 +9,13 @@
*/ */
package org.eclipse.jgit.transport; package org.eclipse.jgit.transport;
import static org.eclipse.jgit.transport.ObjectIdMatcher.hasOnlyObjectIds;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasItems;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.eclipse.jgit.transport.ObjectIdMatcher.hasOnlyObjectIds;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
@ -27,15 +28,10 @@ import org.eclipse.jgit.junit.TestRepository;
import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.Config;
import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevCommit;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class ProtocolV2ParserTest { public class ProtocolV2ParserTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
private TestRepository<InMemoryRepository> testRepo; private TestRepository<InMemoryRepository> testRepo;
@Before @Before
@ -236,8 +232,8 @@ public class ProtocolV2ParserTest {
ProtocolV2Parser parser = new ProtocolV2Parser( ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.start().allowFilter().done()); ConfigBuilder.start().allowFilter().done());
thrown.expect(PackProtocolException.class); assertThrows(PackProtocolException.class,
parser.parseFetchRequest(pckIn); () -> parser.parseFetchRequest(pckIn));
} }
@Test @Test
@ -247,8 +243,8 @@ public class ProtocolV2ParserTest {
ProtocolV2Parser parser = new ProtocolV2Parser( ProtocolV2Parser parser = new ProtocolV2Parser(
ConfigBuilder.getDefault()); ConfigBuilder.getDefault());
thrown.expect(PackProtocolException.class); assertThrows(PackProtocolException.class,
parser.parseFetchRequest(pckIn); () -> parser.parseFetchRequest(pckIn));
} }
@Test @Test

206
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/RequestValidatorTestCase.java

@ -9,12 +9,15 @@
*/ */
package org.eclipse.jgit.transport; package org.eclipse.jgit.transport;
import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.catchThrowableOfType;
import java.io.IOException; import java.io.IOException;
import java.util.Arrays; import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.eclipse.jgit.errors.PackProtocolException; import org.assertj.core.api.ThrowableAssert.ThrowingCallable;
import org.eclipse.jgit.errors.TransportException; import org.eclipse.jgit.errors.TransportException;
import org.eclipse.jgit.internal.storage.dfs.DfsGarbageCollector; import org.eclipse.jgit.internal.storage.dfs.DfsGarbageCollector;
import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription; import org.eclipse.jgit.internal.storage.dfs.DfsRepositoryDescription;
@ -25,17 +28,11 @@ import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.revwalk.RevBlob; import org.eclipse.jgit.revwalk.RevBlob;
import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.revwalk.RevCommit;
import org.eclipse.jgit.transport.UploadPack.RequestValidator; import org.eclipse.jgit.transport.UploadPack.RequestValidator;
import org.hamcrest.Matchers;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public abstract class RequestValidatorTestCase { public abstract class RequestValidatorTestCase {
@Rule
public ExpectedException thrown = ExpectedException.none();
private RevCommit reachableCommit; private RevCommit reachableCommit;
private RevCommit tipAdvertisedCommit; private RevCommit tipAdvertisedCommit;
@ -111,156 +108,165 @@ public abstract class RequestValidatorTestCase {
protected abstract boolean isUnreachableBlobValid(); protected abstract boolean isUnreachableBlobValid();
@Test @Test
public void validateReachableCommitWithBitmaps() public void validateReachableCommitWithBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithBitmaps()),
Arrays.asList(reachableCommit));
if (!isReachableCommitValid()) { if (!isReachableCommitValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers "want " + reachableCommit.name() + " not valid");
.containsString( return;
"want " + reachableCommit.name() + " not valid"));
} }
createValidator().checkWants(getUploadPack(getRepoWithBitmaps()), c.call();
Arrays.asList(reachableCommit));
} }
@Test @Test
public void validateReachableCommitWithoutBitmaps() public void validateReachableCommitWithoutBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithoutBitmaps()),
Arrays.asList(reachableCommit));
if (!isReachableCommitValid()) { if (!isReachableCommitValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + reachableCommit.name() + " not valid");
"want " + reachableCommit.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithoutBitmaps()), c.call();
Arrays.asList(reachableCommit));
} }
@Test @Test
public void validateAdvertisedTipWithBitmaps() public void validateAdvertisedTipWithBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithBitmaps()),
Arrays.asList(tipAdvertisedCommit));
if (!isAdvertisedTipValid()) { if (!isAdvertisedTipValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + tipAdvertisedCommit.name() + " not valid");
"want " + tipAdvertisedCommit.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithBitmaps()), c.call();
Arrays.asList(tipAdvertisedCommit));
} }
@Test @Test
public void validateAdvertisedTipWithoutBitmaps() public void validateAdvertisedTipWithoutBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithoutBitmaps()),
Arrays.asList(tipAdvertisedCommit));
if (!isAdvertisedTipValid()) { if (!isAdvertisedTipValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + tipAdvertisedCommit.name() + " not valid");
"want " + tipAdvertisedCommit.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithoutBitmaps()), c.call();
Arrays.asList(tipAdvertisedCommit));
} }
@Test @Test
public void validateUnadvertisedTipWithBitmaps() public void validateUnadvertisedTipWithBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithBitmaps()),
Arrays.asList(tipUnadvertisedCommit));
if (!isUnadvertisedTipCommitValid()) { if (!isUnadvertisedTipCommitValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + tipUnadvertisedCommit.name() + " not valid");
"want " + tipUnadvertisedCommit.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithBitmaps()), c.call();
Arrays.asList(tipUnadvertisedCommit));
} }
@Test @Test
public void validateUnadvertisedTipWithoutBitmaps() public void validateUnadvertisedTipWithoutBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithoutBitmaps()),
Arrays.asList(tipUnadvertisedCommit));
if (!isUnadvertisedTipCommitValid()) { if (!isUnadvertisedTipCommitValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + tipUnadvertisedCommit.name() + " not valid");
"want " + tipUnadvertisedCommit.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithoutBitmaps()), c.call();
Arrays.asList(tipUnadvertisedCommit));
} }
@Test @Test
public void validateUnreachableCommitWithBitmaps() public void validateUnreachableCommitWithBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithBitmaps()),
Arrays.asList(unreachableCommit));
if (!isUnreachableCommitValid()) { if (!isUnreachableCommitValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + unreachableCommit.name() + " not valid");
"want " + unreachableCommit.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithBitmaps()), c.call();
Arrays.asList(unreachableCommit));
} }
@Test @Test
public void validateUnreachableCommitWithoutBitmaps() public void validateUnreachableCommitWithoutBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithoutBitmaps()),
Arrays.asList(unreachableCommit));
if (!isUnreachableCommitValid()) { if (!isUnreachableCommitValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + unreachableCommit.name() + " not valid");
"want " + unreachableCommit.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithoutBitmaps()), c.call();
Arrays.asList(unreachableCommit));
} }
@Test @Test
public void validateReachableBlobWithBitmaps() public void validateReachableBlobWithBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithBitmaps()),
Arrays.asList(reachableBlob));
if (!isReachableBlobValid_withBitmaps()) { if (!isReachableBlobValid_withBitmaps()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + reachableBlob.name() + " not valid");
"want " + reachableBlob.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithBitmaps()), c.call();
Arrays.asList(reachableBlob));
} }
@Test @Test
public void validateReachableBlobWithoutBitmaps() public void validateReachableBlobWithoutBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithoutBitmaps()),
Arrays.asList(reachableBlob));
if (!isReachableBlobValid_withoutBitmaps()) { if (!isReachableBlobValid_withoutBitmaps()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + reachableBlob.name() + " not valid");
"want " + reachableBlob.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithoutBitmaps()), c.call();
Arrays.asList(reachableBlob));
} }
@Test @Test
public void validateUnreachableBlobWithBitmaps() public void validateUnreachableBlobWithBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithBitmaps()),
Arrays.asList(unreachableBlob));
if (!isUnreachableBlobValid()) { if (!isUnreachableBlobValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + unreachableBlob.name() + " not valid");
"want " + unreachableBlob.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithBitmaps()), c.call();
Arrays.asList(unreachableBlob));
} }
@Test @Test
public void validateUnreachableBlobWithoutBitmaps() public void validateUnreachableBlobWithoutBitmaps() throws Throwable {
throws PackProtocolException, IOException { ThrowingCallable c = () -> createValidator().checkWants(
getUploadPack(getRepoWithoutBitmaps()),
Arrays.asList(unreachableBlob));
if (!isUnreachableBlobValid()) { if (!isUnreachableBlobValid()) {
thrown.expect(TransportException.class); assertTransportException(c,
thrown.expectMessage(Matchers.containsString( "want " + unreachableBlob.name() + " not valid");
"want " + unreachableBlob.name() + " not valid")); return;
} }
createValidator().checkWants(getUploadPack(getRepoWithoutBitmaps()), c.call();
Arrays.asList(unreachableBlob)); }
private void assertTransportException(ThrowingCallable c,
String messageContent) throws AssertionError {
assertThat(catchThrowableOfType(c, TransportException.class))
.hasMessageContaining(messageContent);
} }
private UploadPack getUploadPack(Repository repository) throws IOException { private UploadPack getUploadPack(Repository repository) throws IOException {

4
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/TransportHttpTest.java

@ -9,6 +9,8 @@
*/ */
package org.eclipse.jgit.transport; package org.eclipse.jgit.transport;
import static org.hamcrest.MatcherAssert.assertThat;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.net.HttpCookie; import java.net.HttpCookie;
@ -120,7 +122,7 @@ public class TransportHttpTest extends SampleDataRepositoryTestCase {
cookie.setMaxAge(1234); cookie.setMaxAge(1234);
expectedCookies.add(cookie); expectedCookies.add(cookie);
Assert.assertThat( assertThat(
new NetscapeCookieFile(cookieFile.toPath()) new NetscapeCookieFile(cookieFile.toPath())
.getCookies(true), .getCookies(true),
HttpCookiesMatcher.containsInOrder(expectedCookies, 5)); HttpCookiesMatcher.containsInOrder(expectedCookies, 5));

9
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackReachabilityTest.java

@ -9,10 +9,10 @@
*/ */
package org.eclipse.jgit.transport; package org.eclipse.jgit.transport;
import static org.eclipse.jgit.lib.MoreAsserts.assertThrows; import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.util.Collections; import java.util.Collections;
@ -32,9 +32,7 @@ import org.eclipse.jgit.transport.resolver.ServiceNotEnabledException;
import org.eclipse.jgit.transport.resolver.UploadPackFactory; import org.eclipse.jgit.transport.resolver.UploadPackFactory;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
/** /**
* Test combinations of: * Test combinations of:
@ -46,9 +44,6 @@ import org.junit.rules.ExpectedException;
*/ */
public class UploadPackReachabilityTest { public class UploadPackReachabilityTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
private URIish uri; private URIish uri;
private TestProtocol<Object> testProtocol; private TestProtocol<Object> testProtocol;

2
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackRefSortingForReachabilityTest.java

@ -10,8 +10,8 @@
package org.eclipse.jgit.transport; package org.eclipse.jgit.transport;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.contains; import static org.hamcrest.Matchers.contains;
import static org.junit.Assert.assertThat;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;

4
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/UploadPackTest.java

@ -1,6 +1,6 @@
package org.eclipse.jgit.transport; package org.eclipse.jgit.transport;
import static org.eclipse.jgit.lib.MoreAsserts.assertThrows; import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsInAnyOrder; import static org.hamcrest.Matchers.containsInAnyOrder;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.hasItems; import static org.hamcrest.Matchers.hasItems;
@ -9,7 +9,7 @@ import static org.hamcrest.Matchers.notNullValue;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThrows;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;

6
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/LRUMapTest.java

@ -9,11 +9,12 @@
*/ */
package org.eclipse.jgit.util; package org.eclipse.jgit.util;
import static org.hamcrest.MatcherAssert.assertThat;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import org.hamcrest.collection.IsIterableContainingInOrder; import org.hamcrest.collection.IsIterableContainingInOrder;
import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
public class LRUMapTest { public class LRUMapTest {
@ -38,8 +39,7 @@ public class LRUMapTest {
expectedMap.put(0, 0); expectedMap.put(0, 0);
expectedMap.put(3, 3); expectedMap.put(3, 3);
Assert.assertThat(map.entrySet(), assertThat(map.entrySet(), IsIterableContainingInOrder
IsIterableContainingInOrder
.contains(expectedMap.entrySet().toArray())); .contains(expectedMap.entrySet().toArray()));
} }
} }

10
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/RawParseUtils_LineMapTest.java

@ -13,16 +13,12 @@ package org.eclipse.jgit.util;
import static java.nio.charset.StandardCharsets.ISO_8859_1; import static java.nio.charset.StandardCharsets.ISO_8859_1;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertThrows;
import org.eclipse.jgit.errors.BinaryBlobException; import org.eclipse.jgit.errors.BinaryBlobException;
import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
import org.junit.rules.ExpectedException;
public class RawParseUtils_LineMapTest { public class RawParseUtils_LineMapTest {
@Rule
public ExpectedException exception = ExpectedException.none();
@Test @Test
public void testEmpty() throws Exception { public void testEmpty() throws Exception {
@ -62,8 +58,8 @@ public class RawParseUtils_LineMapTest {
@Test @Test
public void testLineMapOrBinary() throws Exception { public void testLineMapOrBinary() throws Exception {
final byte[] buf = "xxxfoo\nb\0ar".getBytes(ISO_8859_1); final byte[] buf = "xxxfoo\nb\0ar".getBytes(ISO_8859_1);
exception.expect(BinaryBlobException.class); assertThrows(BinaryBlobException.class,
RawParseUtils.lineMapOrBinary(buf, 3, buf.length); () -> RawParseUtils.lineMapOrBinary(buf, 3, buf.length));
} }
@Test @Test

8
org.eclipse.jgit.test/tst/org/eclipse/jgit/util/io/TimeoutOutputStreamTest.java

@ -149,7 +149,9 @@ public class TimeoutOutputStreamTest {
try { try {
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new InterruptedIOException(); InterruptedIOException e1 = new InterruptedIOException();
e1.initCause(e);
throw e1;
} }
} }
} }
@ -202,7 +204,9 @@ public class TimeoutOutputStreamTest {
try { try {
Thread.sleep(1000); Thread.sleep(1000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new InterruptedIOException(); InterruptedIOException e1 = new InterruptedIOException();
e1.initCause(e);
throw e1;
} }
} }
} }

1
org.eclipse.jgit/resources/META-INF/services/org.eclipse.jgit.transport.SshSessionFactory

@ -0,0 +1 @@
org.eclipse.jgit.transport.DefaultSshSessionFactory

7
org.eclipse.jgit/src/org/eclipse/jgit/api/CloneCommand.java

@ -164,7 +164,7 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
verifyDirectories(u); verifyDirectories(u);
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
throw new InvalidRemoteException( throw new InvalidRemoteException(
MessageFormat.format(JGitText.get().invalidURL, uri)); MessageFormat.format(JGitText.get().invalidURL, uri), e);
} }
setFetchType(); setFetchType();
@SuppressWarnings("resource") // Closed by caller @SuppressWarnings("resource") // Closed by caller
@ -185,8 +185,9 @@ public class CloneCommand extends TransportCommand<CloneCommand, Git> {
repository.close(); repository.close();
} }
cleanup(); cleanup();
throw new InvalidRemoteException(MessageFormat.format( throw new InvalidRemoteException(
JGitText.get().invalidRemote, remote)); MessageFormat.format(JGitText.get().invalidRemote, remote),
e);
} catch (GitAPIException | RuntimeException e) { } catch (GitAPIException | RuntimeException e) {
if (repository != null) { if (repository != null) {
repository.close(); repository.close();

2
org.eclipse.jgit/src/org/eclipse/jgit/api/FetchCommand.java

@ -223,7 +223,7 @@ public class FetchCommand extends TransportCommand<FetchCommand, FetchResult> {
e.getMessage(), e); e.getMessage(), e);
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
throw new InvalidRemoteException(MessageFormat.format( throw new InvalidRemoteException(MessageFormat.format(
JGitText.get().invalidRemote, remote)); JGitText.get().invalidRemote, remote), e);
} catch (NotSupportedException e) { } catch (NotSupportedException e) {
throw new JGitInternalException( throw new JGitInternalException(
JGitText.get().exceptionCaughtDuringExecutionOfFetchCommand, JGitText.get().exceptionCaughtDuringExecutionOfFetchCommand,

2
org.eclipse.jgit/src/org/eclipse/jgit/api/LsRemoteCommand.java

@ -180,7 +180,7 @@ public class LsRemoteCommand extends
} }
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
throw new InvalidRemoteException(MessageFormat.format( throw new InvalidRemoteException(MessageFormat.format(
JGitText.get().invalidRemote, remote)); JGitText.get().invalidRemote, remote), e);
} catch (NotSupportedException e) { } catch (NotSupportedException e) {
throw new JGitInternalException( throw new JGitInternalException(
JGitText.get().exceptionCaughtDuringExecutionOfLsRemoteCommand, JGitText.get().exceptionCaughtDuringExecutionOfLsRemoteCommand,

5
org.eclipse.jgit/src/org/eclipse/jgit/api/PushCommand.java

@ -152,8 +152,9 @@ public class PushCommand extends
} }
} catch (URISyntaxException e) { } catch (URISyntaxException e) {
throw new InvalidRemoteException(MessageFormat.format( throw new InvalidRemoteException(
JGitText.get().invalidRemote, remote)); MessageFormat.format(JGitText.get().invalidRemote, remote),
e);
} catch (TransportException e) { } catch (TransportException e) {
throw new org.eclipse.jgit.api.errors.TransportException( throw new org.eclipse.jgit.api.errors.TransportException(
e.getMessage(), e); e.getMessage(), e);

1
org.eclipse.jgit/src/org/eclipse/jgit/diff/SimilarityIndex.java

@ -350,6 +350,7 @@ public class SimilarityIndex {
return (1 << idHashBits) * (idHashBits - 3) / idHashBits; return (1 << idHashBits) * (idHashBits - 3) / idHashBits;
} }
@SuppressWarnings("UnusedException")
private void grow() throws TableFullException { private void grow() throws TableFullException {
if (idHashBits == 30) if (idHashBits == 30)
throw new TableFullException(); throw new TableFullException();

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

@ -3,41 +3,14 @@
* Copyright (C) 2008, Robin Rosenberg <robin.rosenberg@dewire.com> * Copyright (C) 2008, Robin Rosenberg <robin.rosenberg@dewire.com>
* Copyright (C) 2008, Roger C. Soares <rogersoares@intelinet.com.br> * Copyright (C) 2008, Roger C. Soares <rogersoares@intelinet.com.br>
* Copyright (C) 2006, Shawn O. Pearce <spearce@spearce.org> * Copyright (C) 2006, Shawn O. Pearce <spearce@spearce.org>
* Copyright (C) 2010, Chrisian Halstrick <christian.halstrick@sap.com> and * Copyright (C) 2010, Chrisian Halstrick <christian.halstrick@sap.com>
* other copyright owners as documented in the project's IP log. * Copyright (C) 2019-2020, Andre Bossert <andre.bossert@siemens.com>
* *
* This program and the accompanying materials are made available under the * This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v1.0 which accompanies this * terms of the Eclipse Distribution License v. 1.0 which is available at
* distribution, is reproduced below, and is available at * https://www.eclipse.org/org/documents/edl-v10.php.
* http://www.eclipse.org/org/documents/edl-v10.php
* *
* All rights reserved. * SPDX-License-Identifier: BSD-3-Clause
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* - Neither the name of the Eclipse Foundation, Inc. nor the names of its
* contributors may be used to endorse or promote products derived from this
* software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/ */
package org.eclipse.jgit.dircache; package org.eclipse.jgit.dircache;
@ -1504,29 +1477,9 @@ public class DirCacheCheckout {
File tmpFile = File.createTempFile( File tmpFile = File.createTempFile(
"._" + name, null, parentDir); //$NON-NLS-1$ "._" + name, null, parentDir); //$NON-NLS-1$
EolStreamType nonNullEolStreamType; getContent(repo, entry.getPathString(), checkoutMetadata, ol, opt,
if (checkoutMetadata.eolStreamType != null) { new FileOutputStream(tmpFile));
nonNullEolStreamType = checkoutMetadata.eolStreamType;
} else if (opt.getAutoCRLF() == AutoCRLF.TRUE) {
nonNullEolStreamType = EolStreamType.AUTO_CRLF;
} else {
nonNullEolStreamType = EolStreamType.DIRECT;
}
try (OutputStream channel = EolStreamTypeUtil.wrapOutputStream(
new FileOutputStream(tmpFile), nonNullEolStreamType)) {
if (checkoutMetadata.smudgeFilterCommand != null) {
if (FilterCommandRegistry
.isRegistered(checkoutMetadata.smudgeFilterCommand)) {
runBuiltinFilterCommand(repo, checkoutMetadata, ol,
channel);
} else {
runExternalFilterCommand(repo, entry, checkoutMetadata, ol,
fs, channel);
}
} else {
ol.copyTo(channel);
}
}
// The entry needs to correspond to the on-disk filesize. If the content // The entry needs to correspond to the on-disk filesize. If the content
// was filtered (either by autocrlf handling or smudge filters) ask the // was filtered (either by autocrlf handling or smudge filters) ask the
// filesystem again for the length. Otherwise the objectloader knows the // filesystem again for the length. Otherwise the objectloader knows the
@ -1565,11 +1518,69 @@ public class DirCacheCheckout {
entry.setLastModified(fs.lastModifiedInstant(f)); entry.setLastModified(fs.lastModifiedInstant(f));
} }
/**
* Return filtered content for a specific object (blob). EOL handling and
* smudge-filter handling are applied in the same way as it would be done
* during a checkout.
*
* @param repo
* the repository
* @param path
* the path used to determine the correct filters for the object
* @param checkoutMetadata
* containing
* <ul>
* <li>smudgeFilterCommand to be run for smudging the object</li>
* <li>eolStreamType used for stream conversion (can be
* null)</li>
* </ul>
* @param ol
* the object loader to read raw content of the object
* @param opt
* the working tree options where only 'core.autocrlf' is used
* for EOL handling if 'checkoutMetadata.eolStreamType' is not
* valid
* @param os
* the output stream the filtered content is written to. The
* caller is responsible to close the stream.
* @throws IOException
*
* @since 5.7
*/
public static void getContent(Repository repo, String path,
CheckoutMetadata checkoutMetadata, ObjectLoader ol,
WorkingTreeOptions opt, OutputStream os)
throws IOException {
EolStreamType nonNullEolStreamType;
if (checkoutMetadata.eolStreamType != null) {
nonNullEolStreamType = checkoutMetadata.eolStreamType;
} else if (opt.getAutoCRLF() == AutoCRLF.TRUE) {
nonNullEolStreamType = EolStreamType.AUTO_CRLF;
} else {
nonNullEolStreamType = EolStreamType.DIRECT;
}
try (OutputStream channel = EolStreamTypeUtil.wrapOutputStream(
os, nonNullEolStreamType)) {
if (checkoutMetadata.smudgeFilterCommand != null) {
if (FilterCommandRegistry
.isRegistered(checkoutMetadata.smudgeFilterCommand)) {
runBuiltinFilterCommand(repo, checkoutMetadata, ol,
channel);
} else {
runExternalFilterCommand(repo, path, checkoutMetadata, ol,
channel);
}
} else {
ol.copyTo(channel);
}
}
}
// Run an external filter command // Run an external filter command
private static void runExternalFilterCommand(Repository repo, private static void runExternalFilterCommand(Repository repo, String path,
DirCacheEntry entry, CheckoutMetadata checkoutMetadata, ObjectLoader ol,
CheckoutMetadata checkoutMetadata, ObjectLoader ol, FS fs,
OutputStream channel) throws IOException { OutputStream channel) throws IOException {
FS fs = repo.getFS();
ProcessBuilder filterProcessBuilder = fs.runInShell( ProcessBuilder filterProcessBuilder = fs.runInShell(
checkoutMetadata.smudgeFilterCommand, new String[0]); checkoutMetadata.smudgeFilterCommand, new String[0]);
filterProcessBuilder.directory(repo.getWorkTree()); filterProcessBuilder.directory(repo.getWorkTree());
@ -1588,12 +1599,12 @@ public class DirCacheCheckout {
} catch (IOException | InterruptedException e) { } catch (IOException | InterruptedException e) {
throw new IOException(new FilterFailedException(e, throw new IOException(new FilterFailedException(e,
checkoutMetadata.smudgeFilterCommand, checkoutMetadata.smudgeFilterCommand,
entry.getPathString())); path));
} }
if (rc != 0) { if (rc != 0) {
throw new IOException(new FilterFailedException(rc, throw new IOException(new FilterFailedException(rc,
checkoutMetadata.smudgeFilterCommand, checkoutMetadata.smudgeFilterCommand,
entry.getPathString(), path,
result.getStdout().toByteArray(MAX_EXCEPTION_TEXT_SIZE), result.getStdout().toByteArray(MAX_EXCEPTION_TEXT_SIZE),
RawParseUtils.decode(result.getStderr() RawParseUtils.decode(result.getStderr()
.toByteArray(MAX_EXCEPTION_TEXT_SIZE)))); .toByteArray(MAX_EXCEPTION_TEXT_SIZE))));

2
org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/ManifestParser.java

@ -139,7 +139,7 @@ public class ManifestParser extends DefaultHandler {
try { try {
xr = XMLReaderFactory.createXMLReader(); xr = XMLReaderFactory.createXMLReader();
} catch (SAXException e) { } catch (SAXException e) {
throw new IOException(JGitText.get().noXMLParserAvailable); throw new IOException(JGitText.get().noXMLParserAvailable, e);
} }
xr.setContentHandler(this); xr.setContentHandler(this);
try { try {

2
org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java

@ -541,7 +541,7 @@ public class RepoCommand extends GitCommand<RevCommit> {
inputStream = new FileInputStream(manifestPath); inputStream = new FileInputStream(manifestPath);
} catch (IOException e) { } catch (IOException e) {
throw new IllegalArgumentException( throw new IllegalArgumentException(
JGitText.get().pathNotConfigured); JGitText.get().pathNotConfigured, e);
} }
} }

7
org.eclipse.jgit/src/org/eclipse/jgit/internal/fsck/FsckPackParser.java

@ -290,9 +290,12 @@ public class FsckPackParser extends PackParser {
ErrorType.MISMATCH_CRC); ErrorType.MISMATCH_CRC);
} }
} catch (MissingObjectException e) { } catch (MissingObjectException e) {
throw new CorruptPackIndexException(MessageFormat CorruptPackIndexException cpe = new CorruptPackIndexException(
.format(JGitText.get().missingCRC, entry.getName()), MessageFormat.format(JGitText.get().missingCRC,
entry.getName()),
ErrorType.MISSING_CRC); ErrorType.MISSING_CRC);
cpe.initCause(e);
throw cpe;
} }
} }

2
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/dfs/DfsBlockCacheConfig.java

@ -236,7 +236,7 @@ public class DfsBlockCacheConfig {
JGitText.get().enumValueNotSupported3, JGitText.get().enumValueNotSupported3,
CONFIG_CORE_SECTION, CONFIG_CORE_SECTION,
CONFIG_DFS_SECTION, CONFIG_DFS_SECTION,
CONFIG_KEY_STREAM_RATIO, v)); CONFIG_KEY_STREAM_RATIO, v), e);
} }
} }
return this; return this;

3
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java

@ -769,7 +769,8 @@ public class ObjectDirectory extends FileObjectDatabase {
shallowCommitsIds.add(ObjectId.fromString(line)); shallowCommitsIds.add(ObjectId.fromString(line));
} catch (IllegalArgumentException ex) { } catch (IllegalArgumentException ex) {
throw new IOException(MessageFormat throw new IOException(MessageFormat
.format(JGitText.get().badShallowLine, line)); .format(JGitText.get().badShallowLine, line),
ex);
} }
} }
} }

15
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java

@ -71,13 +71,12 @@ import org.slf4j.LoggerFactory;
*/ */
public class PackFile implements Iterable<PackIndex.MutableEntry> { public class PackFile implements Iterable<PackIndex.MutableEntry> {
private final static Logger LOG = LoggerFactory.getLogger(PackFile.class); private final static Logger LOG = LoggerFactory.getLogger(PackFile.class);
/** Sorts PackFiles to be most recently created to least recently created. */
public static final Comparator<PackFile> SORT = new Comparator<PackFile>() { /**
@Override * Sorts PackFiles to be most recently created to least recently created.
public int compare(PackFile a, PackFile b) { */
return b.packLastModified.compareTo(a.packLastModified); public static final Comparator<PackFile> SORT = (a, b) -> b.packLastModified
} .compareTo(a.packLastModified);
};
private final File packFile; private final File packFile;
@ -1071,7 +1070,7 @@ public class PackFile implements Iterable<PackIndex.MutableEntry> {
} catch (DataFormatException e) { } catch (DataFormatException e) {
throw new CorruptObjectException(MessageFormat.format( throw new CorruptObjectException(MessageFormat.format(
JGitText.get().objectAtHasBadZlibStream, Long.valueOf(pos), JGitText.get().objectAtHasBadZlibStream, Long.valueOf(pos),
getPackFile())); getPackFile()), e);
} }
} }

5
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/RefDirectory.java

@ -1035,7 +1035,10 @@ public class RefDirectory extends RefDatabase {
lck.waitForStatChange(); lck.waitForStatChange();
} catch (InterruptedException e) { } catch (InterruptedException e) {
lck.unlock(); lck.unlock();
throw new ObjectWritingException(MessageFormat.format(JGitText.get().interruptedWriting, name)); throw new ObjectWritingException(
MessageFormat.format(
JGitText.get().interruptedWriting, name),
e);
} }
if (!lck.commit()) if (!lck.commit())
throw new ObjectWritingException(MessageFormat.format(JGitText.get().unableToWrite, name)); throw new ObjectWritingException(MessageFormat.format(JGitText.get().unableToWrite, name));

16
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/UnpackedObject.java

@ -149,8 +149,10 @@ public class UnpackedObject {
} }
return new LargeObject(type, size, path, id, wc.db); return new LargeObject(type, size, path, id, wc.db);
} catch (ZipException badStream) { } catch (ZipException badStream) {
throw new CorruptObjectException(id, CorruptObjectException coe = new CorruptObjectException(id,
JGitText.get().corruptObjectBadStream); JGitText.get().corruptObjectBadStream);
coe.initCause(badStream);
throw coe;
} }
} }
@ -192,8 +194,10 @@ public class UnpackedObject {
} }
return size; return size;
} catch (ZipException badStream) { } catch (ZipException badStream) {
throw new CorruptObjectException(id, CorruptObjectException coe = new CorruptObjectException(id,
JGitText.get().corruptObjectBadStream); JGitText.get().corruptObjectBadStream);
coe.initCause(badStream);
throw coe;
} }
} }
@ -205,8 +209,10 @@ public class UnpackedObject {
try { try {
r = inf.inflate(buf); r = inf.inflate(buf);
} catch (DataFormatException e) { } catch (DataFormatException e) {
throw new CorruptObjectException(id, CorruptObjectException coe = new CorruptObjectException(id,
JGitText.get().corruptObjectBadStream); JGitText.get().corruptObjectBadStream);
coe.initCause(e);
throw coe;
} }
if (r != 0) if (r != 0)
throw new CorruptObjectException(id, throw new CorruptObjectException(id,
@ -277,8 +283,10 @@ public class UnpackedObject {
remaining -= r; remaining -= r;
return r; return r;
} catch (ZipException badStream) { } catch (ZipException badStream) {
throw new CorruptObjectException(id, CorruptObjectException coe = new CorruptObjectException(id,
JGitText.get().corruptObjectBadStream); JGitText.get().corruptObjectBadStream);
coe.initCause(badStream);
throw coe;
} }
} }

28
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java

@ -142,23 +142,24 @@ public class PackWriter implements AutoCloseable {
private static final Map<WeakReference<PackWriter>, Boolean> instances = private static final Map<WeakReference<PackWriter>, Boolean> instances =
new ConcurrentHashMap<>(); new ConcurrentHashMap<>();
private static final Iterable<PackWriter> instancesIterable = new Iterable<PackWriter>() { private static final Iterable<PackWriter> instancesIterable = () -> new Iterator<PackWriter>() {
@Override
public Iterator<PackWriter> iterator() { private final Iterator<WeakReference<PackWriter>> it = instances
return new Iterator<PackWriter>() { .keySet().iterator();
private final Iterator<WeakReference<PackWriter>> it =
instances.keySet().iterator();
private PackWriter next; private PackWriter next;
@Override @Override
public boolean hasNext() { public boolean hasNext() {
if (next != null) if (next != null) {
return true; return true;
}
while (it.hasNext()) { while (it.hasNext()) {
WeakReference<PackWriter> ref = it.next(); WeakReference<PackWriter> ref = it.next();
next = ref.get(); next = ref.get();
if (next != null) if (next != null) {
return true; return true;
}
it.remove(); it.remove();
} }
return false; return false;
@ -179,8 +180,6 @@ public class PackWriter implements AutoCloseable {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
}; };
}
};
/** /**
* Get all allocated, non-released PackWriters instances. * Get all allocated, non-released PackWriters instances.
@ -1579,8 +1578,8 @@ public class PackWriter implements AutoCloseable {
if (pool.awaitTermination(60, TimeUnit.SECONDS)) if (pool.awaitTermination(60, TimeUnit.SECONDS))
break; break;
} catch (InterruptedException e) { } catch (InterruptedException e) {
throw new IOException( throw new IOException(JGitText
JGitText.get().packingCancelledDuringObjectsWriting); .get().packingCancelledDuringObjectsWriting, e);
} }
} }
} }
@ -1604,7 +1603,8 @@ public class PackWriter implements AutoCloseable {
// Cross our fingers and just break out anyway. // Cross our fingers and just break out anyway.
// //
throw new IOException( throw new IOException(
JGitText.get().packingCancelledDuringObjectsWriting); JGitText.get().packingCancelledDuringObjectsWriting,
ie);
} }
} }
@ -1645,7 +1645,7 @@ public class PackWriter implements AutoCloseable {
for (Future<?> f : futures) for (Future<?> f : futures)
f.cancel(true); f.cancel(true);
throw new IOException( throw new IOException(
JGitText.get().packingCancelledDuringObjectsWriting); JGitText.get().packingCancelledDuringObjectsWriting, ie);
} }
} }

7
org.eclipse.jgit/src/org/eclipse/jgit/internal/submodule/SubmoduleValidator.java

@ -165,9 +165,10 @@ public class SubmoduleValidator {
} }
} }
} catch (ConfigInvalidException e) { } catch (ConfigInvalidException e) {
throw new SubmoduleValidationException( SubmoduleValidationException sve = new SubmoduleValidationException(
JGitText.get().invalidGitModules, JGitText.get().invalidGitModules, GITMODULES_PARSE);
GITMODULES_PARSE); sve.initCause(e);
throw sve;
} }
} }
} }

7
org.eclipse.jgit/src/org/eclipse/jgit/lib/AbbreviatedObjectId.java

@ -114,8 +114,11 @@ public final class AbbreviatedObjectId implements Serializable {
final int d = hexUInt32(bs, ptr + 24, end); final int d = hexUInt32(bs, ptr + 24, end);
final int e = hexUInt32(bs, ptr + 32, end); final int e = hexUInt32(bs, ptr + 32, end);
return new AbbreviatedObjectId(end - ptr, a, b, c, d, e); return new AbbreviatedObjectId(end - ptr, a, b, c, d, e);
} catch (ArrayIndexOutOfBoundsException e1) { } catch (ArrayIndexOutOfBoundsException e) {
throw new InvalidObjectIdException(bs, ptr, end - ptr); InvalidObjectIdException e1 = new InvalidObjectIdException(bs, ptr,
end - ptr);
e1.initCause(e);
throw e1;
} }
} }

5
org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java

@ -601,7 +601,10 @@ public final class Constants {
throw new CorruptObjectException(id, JGitText.get().corruptObjectInvalidType); throw new CorruptObjectException(id, JGitText.get().corruptObjectInvalidType);
} }
} catch (ArrayIndexOutOfBoundsException bad) { } catch (ArrayIndexOutOfBoundsException bad) {
throw new CorruptObjectException(id, JGitText.get().corruptObjectInvalidType); CorruptObjectException coe = new CorruptObjectException(id,
JGitText.get().corruptObjectInvalidType);
coe.initCause(bad);
throw coe;
} }
} }

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save