Commit Graph

7673 Commits

Author SHA1 Message Date
Thomas Wolf af05850485 FS: re-order fields and use all uppercase for true constants
Change-Id: I49fb77d6a12ae9083b5bf5779dc74a3dc49d7594
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2020-01-28 09:52:14 +01:00
Alex Jitianu 64715a189f FS: Don't use innocuous threads for CompletableFuture
The default threads from the ForkJoinPool run without any privileges
when a SecurityManager is installed, leading to SecurityExceptions
when trying to create the probe file even if the application otherwise
has write privileges in the directory.

Use a dedicated ThreadPoolExecutor using daemon threads instead.

Bug: 551690
Change-Id: Id5376f09f0d7da5ceea367e1f0dfc70f823d62d3
Signed-off-by: Alex Jitianu <alex_jitianu@sync.ro>
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2020-01-28 09:52:14 +01:00
David Pursehouse 4cc13297cc ErrorProne: Enable and fix UnusedException check
Enable UnusedException at ERROR level which causes the build to fail
in many places with:

  [UnusedException] This catch block catches an symbol and re-throws
  another, but swallows the caught symbol rather than setting it as a
  cause. This can make debugging harder.

Fix it by setting the caught exception as cause on the subsequently
thrown exception.

Note: The grammatically incorrect error message is copy-pasted as-is
from the version of ErrorProne currently used in Bazel; it has been
fixed by [1] in the latest version.

[1] https://github.com/google/error-prone/commit/d57a39c

Change-Id: I11ed38243091fc12f64f1b2db404ba3f1d2e98b5
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-27 14:40:08 +01:00
Matthias Sohn 0e4a717870 Update Orbit to I20200126235943 and org.junit to 4.13.0.v20200126-2018
Change-Id: I2eb4d34512d169aa7ec9b6437b49c6a43b4a8e38
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-27 09:52:52 +01:00
Matthias Sohn 7a23fc1250 Fix SshSessionFactory#setInstance to use service loader
If setInstance(SshSessionFactory) is called with parameter null
set default session factory using the newly introduced service loader
instead of hard-coding the default factory class.

Change-Id: I86b5932333cc53b706534a2822e0fd96e12e6e47
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-27 09:52:51 +01:00
Emmanuel Hugonnet 54b1c7cc6a Use ServiceLoader to define the default SSH session factory.
Use ServiceLoader and define
org.eclipse.jgit.transport.DefaultSshSessionFactory in
META-INF/services/org.eclipse.jgit.transport.SshSessionFactory so that
the legacy behavior is still the same.

Bug: 553625
Change-Id: Id1a65506140d921ed76d83699e3817f0d2ca08ed
Signed-off-by: Emmanuel Hugonnet <ehugonne@redhat.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-25 15:58:47 +01:00
David Pursehouse 8fa3594565 Remove Error-Prone ExpectedExceptionChecker
The checker only checks for misuse of ExpectedException. Since we've
moved to JUnit 4.13 and assertThrows, ExpectedException won't be used
at all, so now we can get rid of that setting.

Change-Id: Ia9189936ae215110f1f5fc6459c5dbc944404ade
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2020-01-24 16:49:14 +09:00
Matthias Sohn fc7b003163 ReceivePack: enable overriding filterCommands and executeCommands
Change-Id: Ib923e137f0fadd876434bcc49ebd0c9a4d90b45c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-24 15:46:08 +09:00
Matthias Sohn 8ada9048c5 Replace ExpectedException which was deprecated in junit 4.13
Change-Id: I64b0c057dd0a12aef2f3d56fa0c8a10e3b23fffd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-24 15:46:08 +09:00
Matthias Sohn b5cabfbff2 Add org.assertj 3.14.0.v20200120-1926 to target platform
This will be used by JGit based NIO2 filesystem implementation in
Ic8712a091e3941634c80b19ba0e316d9c98dae3e.

CQ: 21437
Change-Id: I64f8415826e95bff7cf93e7fd28e00f0809b500c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-24 15:46:03 +09:00
Matthias Sohn c49c0f9912 Replace deprecated junit assertion methods with hamcrest
Change-Id: Icebe8071eeefbc13d3bdbc231c568209cdc26195
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-22 18:16:17 +01:00
David Pursehouse c02a57f4fa Update to Orbit I20200120214610 and JUnit to 4.13
Since version 4.13 JUnit has an assertThrows method. Remove the
implementation in MoreAsserts and use the one from JUnit.

CQ: 21439
Change-Id: I086baa94aa3069cebe87c4cbf91ed1534523c6cb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-22 18:16:14 +01:00
Michael Keppler 926d392ea5 Update to Tycho 1.6.0
Not many changes, but might lead to shorter build times.

Change-Id: I5d629e49e8bbdef7a5b116d4f28cdbf8a8528cf0
Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-20 20:20:55 +01:00
Andre Bossert eca34be43c Extract method refactoring in class DirCacheCheckout
* added new public method getContent()
* changed checkoutEntry() to use the new getContent() method
* changed runExternalFilterCommand() parameter "entry" to "path" to be
independent from DirCacheEntry type
* removed runExternalFilterCommand() parameter "fs" as it can be derived
from repo

Bug: 356832
Change-Id: If8991b74870e0d8728093e98a990f93f1871b76a
Signed-off-by: Andre Bossert <andre.bossert@siemens.com>
2020-01-20 13:53:41 +01:00
Matthias Sohn be49375fb8 Update Orbit to I20200115225246 and update dependencies
update
- javaewah to 1.1.7.v20200107-0831
- org.apache.commons.codec to 1.13.0.v20200108-0001
- org.apache.commons.compress to 1.19.0.v20200106-2343
- org.apache.httpcomponents.httpclient to 4.5.10.v20200114-1512
- org.apache.httpcomponents.httpcore to 4.4.12.v20200108-1212

CQ: 21194
CQ: 21195
CQ: 21199
CQ: 21346
CQ: 21347
Change-Id: I1943f1c3bf1bb5d71b666cb6aea6083e80ff82dc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-16 13:08:32 +01:00
Matthias Sohn d74daad1e0 Update bazlets and bazel version
- bazlets need to be updated to react on Maven central no longer
supporting http protocol but only https
- update bazel to 2.0

Change-Id: I07f5f050f3b1db2014a5198a28b6bbf893434814
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-16 13:08:32 +01:00
Matthias Sohn 1dd10e757f Merge branch 'stable-5.7'
* stable-5.7:
  Prepare 5.7.0-SNAPSHOT builds
  JGit v5.7.0.202001151323-m1

Change-Id: Ic4294957bdf409e4bfcb104132e724e7e5c4843e
2020-01-16 00:58:04 +01:00
Matthias Sohn 9f1dad4d4f Prepare 5.7.0-SNAPSHOT builds
Change-Id: I106098e85db05bb0142f9fb406e3aef3cf0238b4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-15 22:15:27 +01:00
Matthias Sohn 3c527a8a37 JGit v5.7.0.202001151323-m1
Change-Id: I7701bee6f05d66012c59092126eb4d52f828dc24
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-15 19:22:36 +01:00
Matthias Sohn 0652b5b213 Upgrade jetty to 9.4.25.v20191220
Change-Id: I6a14c2beec3075eac5807cd639f55f38ae8c9c49
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-15 16:14:17 +01:00
Han-Wen Nienhuys 00252730dd Add ReftableNumbersNotIncreasingException#toString
Change-Id: I28b6a6476df185f3f98f8020408b4b120086cb0b
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-15 01:51:43 +01:00
Matthias Sohn 2f3258cc28 Move ConnectivityChecker to fix API leak
Protected field ReceivePack.connectivityChecker is of type
ConnectivityChecker which was located in internal package
org.eclipse.jgit.transport and was thus leaking an internal type.

In order to fix this move ConnectivityChecker to package
org.eclipse.jgit.transport.

Change-Id: Idc0af75502faf39f13a56157bbb6964d24720eb8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-09 18:06:05 +01:00
Matthias Sohn db019c473e Merge branch 'stable-5.6'
* stable-5.6:
  Fix API problem filters
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: I4a77c602bfffed60535d0b8fc251a552b128068d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-09 16:52:56 +01:00
Matthias Sohn d7304eddaf Merge branch 'stable-5.5' into stable-5.6
* stable-5.5:
  Fix API problem filters
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: I11f9a387ac3dc7d22a4f2e70bb8d89169b4e9afe
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-09 13:15:12 +01:00
Matthias Sohn 5cfa74c7b1 Merge branch 'stable-5.4' into stable-5.5
* stable-5.4:
  Fix API problem filters
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: I78902d5feecb2c09134b64ec2f3b48b2c3bab37d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-09 12:32:03 +01:00
Matthias Sohn 4076e6aa3e Merge branch 'stable-5.3' into stable-5.4
* stable-5.3:
  Fix API problem filters
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: I1b560b36d169cfa02cc5450ad0fa0bd85f9f42d8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-09 11:38:28 +01:00
Matthias Sohn c5c1bbbe49 Merge branch 'stable-5.2' into stable-5.3
* stable-5.2:
  Fix API problem filters
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: I67a07d92718188bdf7f8a13b83e9f538ecf4b22f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-09 02:19:03 +01:00
Matthias Sohn 6f177b3f6c Merge branch 'stable-5.1' into stable-5.2
* stable-5.1:
  Fix unclosed resource warning in SmartOutputStream
  JschConfigSessionFactory: fix boxing warning
  SshSupport#runSshCommand: don't throw exception in finally block
  Don't override already managed maven-compiler-plugin version
  Remove unused import from CreateFileSnapshotBenchmark
  Remove duplicate ignore_optional_problems entry in .classpath
  Update maven-site-plugin used by benchmark module to 3.8.2
  Add dependency to enable site generation for benchmark module
  Ignore warnings for generated source code in
org.eclipse.jgit.benchmark
  Fix MBean registration
  Enhance WindowCache statistics

Change-Id: Ic90aacf1ea40e13dc564d4d659e79535e86d0300
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-09 02:03:45 +01:00
Matthias Sohn fefddb28b2 Fix API problem filters
Change-Id: Icc78570f949ad64beb58caa192c829e536aa8dad
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-09 01:50:00 +01:00
Matthias Sohn 4209a0f84b Fix unclosed resource warning in SmartOutputStream
Change-Id: Ia4b96ae1c2cc9357802487384ee32a80ed40334b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-06 11:40:05 +01:00
Matthias Sohn 14bfe08757 JschConfigSessionFactory: fix boxing warning
Change-Id: I1735033c56b444a9a7160cb7df89292a228d5b34
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-06 11:40:05 +01:00
Matthias Sohn d9e957dc24 SshSupport#runSshCommand: don't throw exception in finally block
The CommandFailedException which was thrown in finally block is silently
discarded [1]. Refactor this method to throw the exception after the
finally block.

This fixes the warning "Null comparison always yields false: The
variable failure can only be null at this location".

[1] https://wiki.sei.cmu.edu/confluence/display/java/ERR04-J.+Do+not+complete+abruptly+from+a+finally+block
https://docs.oracle.com/javase/specs/jls/se8/html/jls-14.html#jls-14.20.2

Change-Id: Idbfc303d9c9046ab9a43e0d4c6d65d325bdaf0ed
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-06 11:40:04 +01:00
Matthias Sohn 8e21f0f9c7 Remove no longer used API problem filter
Change-Id: I29e7af25bad5282c6b09e4688bdcf23e22a0648f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-05 22:06:06 +01:00
Matthias Sohn ebea36aa07 Don't override already managed maven-compiler-plugin version
Change-Id: Ie2cb178cf8d805aadc76a2096bcdde95a146d07c
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-04 13:15:37 +01:00
Matthias Sohn f4e653328a Remove unused import from CreateFileSnapshotBenchmark
Change-Id: Iad0bcc01ada4252e9ab4f60d4375f98f084f6a5f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-04 13:11:06 +01:00
Matthias Sohn d422a82086 Remove duplicate ignore_optional_problems entry in .classpath
Change-Id: I326377c90af59ecaada7f5185a638726a8e909b7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-04 13:10:00 +01:00
Matthias Sohn b2bf9d4304 Remove duplicate copyright statements
Change-Id: I9a85136e1cc47693d1e475d00916c214c9aa55f4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-04 01:34:46 +01:00
Matthias Sohn 5c5f7c6b14 Update EDL 1.0 license headers to new short SPDX compliant format
This is the format given by the Eclipse legal doc generator [1].

[1] https://www.eclipse.org/projects/tools/documentation.php?id=technology.jgit

Bug: 548298
Change-Id: I8d8cabc998ba1b083e3f0906a8d558d391ffb6c4
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-04 01:10:05 +01:00
Matthias Sohn c2c6d6d1be Update spring-boot-maven-plugin to 2.1.5.RELEASE
Change-Id: If16a72a1270eb57bc1fb27b18b8c396453dbbe60
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-03 15:57:30 -05:00
Thomas Wolf d661b9f43a TLS support on IBM JDKs
SSLContext.getInstance("TLS") by default behaves differently on IBM
JDK than on Oracle or OpenJDK.[1] On IBM JDK one gets sockets that
have only TLSv1 enabled, which makes HTTPS connections fail since most
servers refuse this old protocol version. On Oracle JDK/OpenJDK, one
gets sockets with all available protocol versions enabled.

Explicitly enable all available TLS protocol versions to make
HTTPS connections work also on IBM JDK.

[1] https://www.ibm.com/support/knowledgecenter/en/SSYKE2_8.0.0/com.ibm.java.security.component.80.doc/security-component/jsse2Docs/matchsslcontext_tls.html#matchsslcontext_tls

Bug: 558709
Change-Id: I5ffc57a78e67a6239b9dad54840a49a8ed28930a
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2020-01-03 20:48:25 +01:00
Matthias Sohn 9e6f09c700 Merge branch 'stable-5.6'
* stable-5.6:
  Hooks: avoid problems with backslashes in paths

Change-Id: Ia9e4aca11de5a465b60898a37441a17133f6355b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-12-26 00:19:20 +01:00
David Pursehouse a586bfc407 Upgrade maven-source-plugin to 3.2.1
Change-Id: I01b0e6cc71f841680bc4116502837af2519379f9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-12-25 11:14:15 +00:00
David Pursehouse cff427bd9a Upgrade ecj to 3.20.0
Change-Id: Ic72d05567d4c90f3d720a166afe99148fb003592
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2019-12-25 11:13:23 +00:00
Thomas Wolf 2323d7a1ef Hooks: avoid problems with backslashes in paths
Calling sh -c with a script path containing backslashes may fail since
the shell may try to process them as escape characters.

Instead of calling

  sh.exe -c 'C:\path\script "$@"' 'C:\path\script' other args

call

  sh.exe -c '$0 "$@"' 'C:\path\script' other args

which avoids this escape processing.

Note that this is not specific to Windows. If the path or the script
name contain backslashes, this also occurs on Unix.

Bug: 558577
Change-Id: I47d63db6f8644f956c55c42b07dbcad7d7f305aa
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
2019-12-24 13:31:23 +01:00
Matthias Sohn eeca0196ab Update jetty to 9.4.24.v20191120
Change-Id: I6b3dbdfaf344efd174c0786902170f349b1bc8ff
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-12-23 00:47:25 +01:00
Matthias Sohn 8669d6df18 Update maven-site-plugin used by benchmark module to 3.8.2
The benchmark module currently has no parent, adjust the version used
here to the one used by all the other jgit Maven modules.

Change-Id: I8807a694fe23f8f131d1d22a58a3e18874d756cc
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-12-18 15:51:38 +01:00
Matthias Sohn 3c0c381194 Add dependency to enable site generation for benchmark module
Change-Id: Iae4524ddc730d57993e9c6d6807282e4b07d1336
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-12-18 15:51:21 +01:00
Lars Vogel ccd68dc1dc Using StringBuilder in StringUtils#capitalize method
StringBuffer is synchronized which is slower and should be replaced with
StringBuilder according to its Javadoc.

Change-Id: If4d4a5a49da289ded34bbec97132ab7636b937cc
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2019-12-18 00:18:41 +01:00
Matthias Sohn e3922b590b Ignore warnings for generated source code in org.eclipse.jgit.benchmark
The source code in the folder .apt_generated is generated by the JMH
code generator, so there's no point in raising any warnings as this
could only be fixed in the upstream code generator.

Change-Id: I882888e7bf924f9ae74182598fcb91671a5c9818
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-12-17 10:48:40 +01:00
Matthias Sohn 2db0c6bb7a Add resource preferences for top level jgit project
Define resource preferences for the root directory of the jgit
repository imported as an Eclipse project. This allows to work on files
in the root folder inside Eclipse workspace.

Change-Id: I1885841fd612a646b0b9a31f001ced5ca112e90d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2019-12-16 11:20:12 +01:00