aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.server/src
Commit message (Collapse)AuthorAgeFilesLines
* Do not set headers if response is already committedMax Haslbeck2024-08-271-3/+5
| | | | | | | | This fixes issues when the response headers were already set and sent to the client. In all other cases this is a no-op. Change-Id: Ifb429e78f721cc514bb6eb1a3ef3412425cd2f1c Signed-off-by: Max Haslbeck <haslbeck@google.com>
* Bump jetty version to 11.0.20David Ostrovsky2024-05-0234-184/+213
| | | | | | and switch servlet-api to use jakarta.servlet 5.0. Change-Id: Ia0ae6efc11806389b7303bc985a08f7822c366f6
* [errorprone] Fix error pattern JdkObsoleteMatthias Sohn2024-04-291-3/+3
| | | | | | See https://errorprone.info/bugpattern/JdkObsolete Change-Id: Id105e2695eb64523bd217f507bf95f909bc6b348
* [errorprone] Add missing javadoc summaryMatthias Sohn2023-09-253-1/+9
| | | | | | see https://google.github.io/styleguide/javaguide.html#s7.2-summary-fragment Change-Id: Iaf4a6b55d4e4c59b7a2da3451164abb1bb47d4a1
* [errorprone] Fix BadImportMatthias Sohn2023-09-251-4/+3
| | | | | | See https://errorprone.info/bugpattern/BadImport Change-Id: Iea98b15862ed0bc4bcad759a7240133769680808
* [errorprone] MetaFilter: fix IdentityHashMapUsageMatthias Sohn2023-09-251-2/+1
| | | | | | See https://errorprone.info/bugpattern/IdentityHashMapUsage Change-Id: Ib49c2ca5506ea7468d2680faba254fa9cd430c2c
* [errorprone] Suppress MissingSummary for translation bundlesMatthias Sohn2023-09-251-0/+1
| | | | Change-Id: I4da51c7e089366b016a0cc64f768a151c24bc956
* Fix all Javadoc warnings and fail on themAntoine Musso2023-06-1627-60/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes all the javadoc warnings, stops ignoring doclint 'missing' category and fails the build on javadoc warnings for public and protected classes and class members. Since javadoc doesn't allow access specifiers when specifying doclint configuration we cannot set `-Xdoclint:all,-missing/private` hence there is no simple way to skip private elements from doclint. Therefore we check javadoc using the Eclipse Java compiler (which is used by default) and javadoc configuration in `.settings/org.eclipse.jdt.core.prefs` files. This allows more fine grained configuration. We can reconsider this when javadoc starts supporting access specifiers in the doclint configuration. Below are detailled explanations for most modifications. @inheritDoc =========== doclint complains about explicits `{@inheritDoc}` when the parent does not have any documentation. As far as I can tell, javadoc defaults to inherit comments and should only be used when one wants to append extra documentation from the parent. Given the parent has no documentation, remove those usages which doclint complains about. In some case I have moved up the documentation from the concrete class up to the abstract class. Remove `{@inheritDoc}` on overriden methods which don't add additional documentation since javadoc defaults to inherit javadoc of overridden methods. @value to @link =============== In PackConfig, DEFAULT_SEARCH_FOR_REUSE_TIMEOUT and similar are forged from Integer.MAX_VALUE and are thus not considered constants (I guess cause the value would depends on the platform). Replace it with a link to `Integer.MAX_VALUE`. In `StringUtils.toBoolean`, @value was used to refer to the `stringValue` parameter. I have replaced it with `{@code stringValue}`. {@link <url>} to <a> ==================== @link does not support being given an external URL. Replaces them with HTML `<a>`. @since: being invalid ===================== org.eclipse.jgit/src/org/eclipse/jgit/util/Equality.java has an invalid tag `@since: ` due to the extra `:`. Javadoc does not complain about it with version 11.0.18+10 but does with 11.0.19.7. It is invalid regardless. invalid HTML syntax =================== - javadoc doesn't allow <br/>, <p/> and </p> anymore, use <br> and <p> instead - replace <tt>code</tt> by {@code code} - <table> tags don't allow summary attribute, specify caption as <caption>caption</caption> to fix this doclint visibility issue ======================== In the private abstract classes `BaseDirCacheEditor` and `BasePackConnection` links to other methods in the abstract class are inherited in the public subclasses but doclint gets confused and considers them unreachable. The HTML documentation for the sub classes shows the relative links in the sub classes, so it is all correct. It must be a bug somewhere in javadoc. Mute those warnings with: @SuppressWarnings("doclint:missing") Misc ==== Replace `<` and `>` with HTML encoded entities (`&lt; and `&gt;`). In `SshConstants` I went enclosing a serie of -> arrows in @literal. Additional tags =============== Configure maven-javad0c-plugin to allow the following additional tags defined in https://openjdk.org/jeps/8068562: - apiNote - implSpec - implNote Missing javadoc =============== Add missing @params and descriptions Change-Id: I840056389aa59135cfb360da0d5e40463ce35bd0 Also-By: Matthias Sohn <matthias.sohn@sap.com>
* UploadPackServlet#doPost use try-with-resource to ensure up is closedMatthias Sohn2022-11-211-28/+29
| | | | Change-Id: Iadbf81f183bb94f3b00b9940f065586b13e85c95
* Merge branch 'stable-6.3'Matthias Sohn2022-11-162-13/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-6.3: [benchmarks] Remove profiler configuration Add SHA1 benchmark [benchmarks] Set version of maven-compiler-plugin to 3.8.1 Fix running JMH benchmarks Add option to allow using JDK's SHA1 implementation Fix API breakage caused by extracting WorkTreeUpdater Extract Exception -> HTTP status code mapping for reuse Don't handle internal git errors as an HTTP error Ignore IllegalStateException if JVM is already shutting down Allow to perform PackedBatchRefUpdate without locking loose refs Change-Id: Ib58879be292c54a2a7f4936ac0986997985c822b
| * Extract Exception -> HTTP status code mapping for reuseSven Selberg2022-11-102-13/+25
| | | | | | | | | | | | | | | | Extract private static method UploadPackServlet#statusCodeForThrowable to a public static method in the UploadPackErrorHandler interface so that implementers of this interface can reuse the default mapping. Change-Id: Ie4a0a006b0148d5b828d610c55d19ce407aab055
| * Don't handle internal git errors as an HTTP errorSven Selberg2022-11-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fix that fixed the propagation of error-codes: 8984e1f66 HTTP Smart: set correct HTTP status on error [1] made some faulty assumptions. "Wants not valid", can be an intermittent git error and the HTTP response should be 200 and not 400 since the request isn't necessary faulty. [1] https://git.eclipse.org/r/c/jgit/jgit/+/192677 Bug: 579676 Change-Id: I461bc78ff6e450636811ece50d21c57a2a7f2ae3
* | ReceivePack: Receive and parse client session-id.Josh Brown2022-10-271-1/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | Before this change JGit did not support the session-id capability implemented by native Git. This change implements advertising the capability from the server and parsing the session-id received from the client during a ReceivePack operation. Enable the transfer.advertisesid config setting to advertise the capability from the server. The client may send a session-id capability in response. If received, the value from this is parsed and available via the getClientSID method on the ReceivePack object. All capabilities in the form `capability=value` are now split into key value pairs at the first `=` character. This change replaces specific handling for the agent capability. This change does not add advertisement or parsing to UploadPack. This change also does not add the ability to send a session ID from the JGit client. https://git-scm.com/docs/protocol-v2/2.33.0#_session_idsession_id Change-Id: I56fb115e843b11b27e128c4ac427b05d5ec129d0 Signed-off-by: Josh Brown <sjoshbrown@google.com>
* Merge branch 'stable-6.0' into stable-6.1Matthias Sohn2022-07-061-0/+2
|\ | | | | | | | | | | | | | | | | | | * stable-6.0: UploadPack: don't prematurely terminate timer in case of error Do not create reflog for remote tracking branches during clone UploadPack: do not check reachability of visible SHA1s Add missing package import javax.management to org.eclipse.jgit Change-Id: I08734ee2c8f3296d908da6a29d53ed87c4b48eb2
| * Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2022-07-061-0/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: UploadPack: don't prematurely terminate timer in case of error Do not create reflog for remote tracking branches during clone UploadPack: do not check reachability of visible SHA1s Add missing package import javax.management to org.eclipse.jgit Change-Id: I6db0a4d74399fde892eeec62efd2946f97547a5d
| | * UploadPack: don't prematurely terminate timer in case of errorMatthias Sohn2022-06-301-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In uploadWithExceptionPropagation don't prematurely terminate timer in case of error to enable reporting it to the client. Expose a close method so that callers can terminate it at the appropriate time. If the timer is already terminated when trying to report it to the client this failed with the error java.lang.IllegalStateException: "Timer already terminated". Bug: 579670 Change-Id: I95827442ccb0f9b1ede83630cf7c51cf619c399a
* | | HTTP Smart: set correct HTTP status on errorSven Selberg2022-05-092-14/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previous behavior was that status code was automatically set to 200 regardless of reported status and according to HTTP Smart protocol[1]: If there is no repository at $GIT_URL, or the resource pointed to by a location matching $GIT_URL does not exist, the server MUST NOT respond with 200 OK response. A server SHOULD respond with 404 Not Found, 410 Gone, or any other suitable HTTP status code which does not imply the resource exists as requested. Since the jgit HTTP client isn't able to handle reading content from a response reporting an error (calling HttpURLConnection#getInputStream on a "failed" connection throws an exception and the internal interface HttpConnection does not expose HttpURLConnection#getErrorStream) the SmartClientSmartServerTest needed to be rewritten to expect the generic response messages. [1] https://git-scm.com/docs/http-protocol#_general_request_processing Bug: 579676 Change-Id: Ibb942d02124a0bc279df09600b091354019ce064
* | | Add comment to explain why try-with-resource is not usedFabio Ponciroli2022-02-221-0/+1
|/ / | | | | | | Change-Id: I904f9890428334bdf2971511e0b2681f3da5a82a
* | Merge branch 'stable-5.13' into stable-6.0Matthias Sohn2021-12-042-1/+3
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.13: Add missing @since tags Add missing @since tag Add missing @since tags Remove unused import in ApacheSshTest Update maven plugins Ignore missing javadoc in test bundles storage: file: De-duplicate File.exists()+File.isFile() RefDirectory.scanRef: Re-use file existence check done in snapshot creation FileSnapshot: Lazy load file store attributes cache Update eclipse-jarsigner-plugin to 1.3.2 Fix p2 repository URLs Change-Id: Icea0a4dced9688392e7f2411b98df52aed2b9c8c
| * Merge branch 'stable-5.10' into stable-5.11Matthias Sohn2021-12-042-1/+3
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.10: Add missing @since tags Add missing @since tag Add missing @since tags Remove unused import in ApacheSshTest Update maven plugins Ignore missing javadoc in test bundles storage: file: De-duplicate File.exists()+File.isFile() RefDirectory.scanRef: Re-use file existence check done in snapshot creation FileSnapshot: Lazy load file store attributes cache Update eclipse-jarsigner-plugin to 1.3.2 Fix p2 repository URLs Change-Id: I84c73e11381c31566a12033db94e9afdcef5b705
| | * Merge branch 'stable-5.8' into stable-5.9Matthias Sohn2021-12-042-1/+3
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.8: Add missing @since tags Add missing @since tag Add missing @since tags Remove unused import in ApacheSshTest Update maven plugins Ignore missing javadoc in test bundles storage: file: De-duplicate File.exists()+File.isFile() RefDirectory.scanRef: Re-use file existence check done in snapshot creation FileSnapshot: Lazy load file store attributes cache Update eclipse-jarsigner-plugin to 1.3.2 Fix p2 repository URLs Change-Id: I5e7c204c0e4c428df6f3b27ba1fc06326983f27c
| | | * Merge branch 'stable-5.7' into stable-5.8Matthias Sohn2021-12-042-1/+3
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.7: Add missing @since tags Add missing @since tag Add missing @since tags Remove unused import in ApacheSshTest Update maven plugins Ignore missing javadoc in test bundles storage: file: De-duplicate File.exists()+File.isFile() RefDirectory.scanRef: Re-use file existence check done in snapshot creation FileSnapshot: Lazy load file store attributes cache Update eclipse-jarsigner-plugin to 1.3.2 Fix p2 repository URLs Change-Id: Ibe46e8479b57a54591ad7bd3cc29bf4a5274e43d
| | | | * Add missing @since tagsMatthias Sohn2021-12-042-1/+2
| | | | | | | | | | | | | | | | | | | | Change-Id: Iaeca1d6154c1383ebe27b723e8814e262328eb48
| | | | * Merge branch 'stable-5.6' into stable-5.7Matthias Sohn2021-12-041-0/+1
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: Add missing @since tag Add missing @since tags Remove unused import in ApacheSshTest Update maven plugins Ignore missing javadoc in test bundles storage: file: De-duplicate File.exists()+File.isFile() RefDirectory.scanRef: Re-use file existence check done in snapshot creation FileSnapshot: Lazy load file store attributes cache Update eclipse-jarsigner-plugin to 1.3.2 Fix p2 repository URLs Change-Id: I53e6cb4b3a34b32d964e486c1ff3d130eed6e406
| | | | | * Add missing @since tagMatthias Sohn2021-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I665c860696b6981dfec87a60c4eb95060a02436f
* | | | | | Remove redundant type argumentsThomas Wolf2021-09-303-3/+6
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Java 11 type arguments for anonymous subclasses can be inferred and don't need to be specified. This resolves a number of compiler warnings. Change-Id: I55eff3babb7628aa0627085e65a1b45eb12c2cd3 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* | | | | Merge branch 'stable-5.10' into stable-5.11Matthias Sohn2021-09-011-0/+22
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.10: GitServlet: allow to override default error handlers Change-Id: If10a99bcdc91105059b15a1d137dd38af228c58d
| * | | | GitServlet: allow to override default error handlersAntonio Barone2021-09-011-0/+22
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GitServlet delegates repository access over HTTP to the GitFilter servlet. GitServlet, in turn, can be extended by jgit consumers to provide custom logic when handling such operations. This is the case, for example, with Gerrit Code Review, which provides custom behavior with a GitOverHttpServlet [1]. Among possible customizations, the ability of specifying a custom error handler for UploadPack and ReceivePack was already introduced in GitFilter by Idd3b87d6b and I9c708aa5a2, respectively. However the `setUploadPackErrorHandler` and `setReceivePackErrorHandler` methods were never added to the GitServlet. Expose the `setUploadPackErrorHandler` and `setReceivePackErrorHandler` methods to the GitServlet, so that consumers of the jgit library might specify custom error handlers. [1] https://gerrit.googlesource.com/gerrit/+/refs/heads/stable-3.2/java/com/google/gerrit/httpd/GitOverHttpServlet.java#95 Change-Id: I712d485ff68b662b48c71ef75650c5a155950d23
* / / / Rename PackFile to PackNasser Grainawi2021-02-101-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | Pack better represents the purpose of the object and paves the way to add a PackFile object that extends File. Change-Id: I39b4f697902d395e9b6df5e8ce53078ce72fcea3 Signed-off-by: Nasser Grainawi <quic_nasserg@quicinc.com>
* / / Use Map directly in MetaFilterLars Vogel2020-04-221-1/+1
|/ / | | | | | | Change-Id: I15545e9c7cdcbb8a913cbcf0eef7f8a2281de7a8 Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
* | Merge branch 'stable-5.6'Matthias Sohn2020-02-281-1/+1
|\| | | | | | | | | | | | | | | | | | | * stable-5.6: Cygwin expects forward slashes for commands to be run via sh.exe Make Logger instances final Move array designators from the variable to the type Change-Id: I9a5dc570deb478525bf48ef526d8cba5b19418bf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Move array designators from the variable to the typeDavid Pursehouse2020-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | As reported by Sonar Lint: Array designators should always be located on the type for better code readability. Otherwise, developers must look both at the type and the variable name to know whether or not a variable is an array. Change-Id: If6b41fed3483d0992d402d8680552ab4bef89ffb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | Merge branch 'stable-5.6'Matthias Sohn2020-02-221-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.6: Revert "Prepend hostname to subsection used to store file timestamp resolution" SimilarityRenameDetector: Fix inconsistent indentation Use indexOf(char) and lastIndexOf(char) rather than String versions Reorder modifiers to follow Java Language Specification GitmoduleEntry: Remove redundant import of class from same package Remove redundant "static" qualifier from enum declarations Change-Id: Ibb66bef7e8373f81e3e653c9843d986243446d68 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Reorder modifiers to follow Java Language SpecificationDavid Pursehouse2020-02-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Java Language Specification recommends listing modifiers in the following order: 1. Annotations 2. public 3. protected 4. private 5. abstract 6. static 7. final 8. transient 9. volatile 10. synchronized 11. native 12. strictfp Not following this convention has no technical impact, but will reduce the code's readability because most developers are used to the standard order. This was detected using SonarLint. Change-Id: I9cddecb4f4234dae1021b677e915be23d349a380 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | ErrorProne: Enable and fix UnusedException checkDavid Pursehouse2020-01-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'stable-5.6'Matthias Sohn2020-01-091-15/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * Merge branch 'stable-5.5' into stable-5.6Matthias Sohn2020-01-091-15/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| | * Merge branch 'stable-5.4' into stable-5.5Matthias Sohn2020-01-091-15/+16
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| | | * Merge branch 'stable-5.3' into stable-5.4Matthias Sohn2020-01-091-15/+16
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| | | | * Merge branch 'stable-5.2' into stable-5.3Matthias Sohn2020-01-091-15/+16
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| | | | | * Merge branch 'stable-5.1' into stable-5.2Matthias Sohn2020-01-091-15/+16
| | | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| | | | | | * Fix unclosed resource warning in SmartOutputStreamMatthias Sohn2020-01-061-14/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia4b96ae1c2cc9357802487384ee32a80ed40334b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | Update EDL 1.0 license headers to new short SPDX compliant formatMatthias Sohn2020-01-0433-1254/+165
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | Merge changes I1f968649,Ied678797Terry Parker2019-12-022-40/+12
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * changes: UploadPackServlet: Use uploadWithExceptionPropagation GitSmartHttpTools: Do not use sideband when sending an error
| * | | | | | | UploadPackServlet: Use uploadWithExceptionPropagationMasaya Suzuki2019-12-021-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As UploadPackErrorHandler's Javadoc says, UploadPackServlet should have called uploadWithExceptionPropagation and let UploadPackErrorHandler to handle the exception. Fix UploadPackServlet. Change-Id: I1f9686495fcf3ef28598ccdff3e6f76a16c8bca3 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
| * | | | | | | GitSmartHttpTools: Do not use sideband when sending an errorMasaya Suzuki2019-12-021-38/+5
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike ReceivePack, the V0/V1 UploadPack response does not support sideband except for the packfile parts. By sending an error in a sideband packet, the JGit client says "Expected ACK/NACK, got: ...". Use an error packet always. The recent Git clients will understand it better than out-of-context sideband packets. Change-Id: Ied6787973d3b6860c0b95c7910d4e4312bb7a184 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
* / / / / / / server: Add a custom error handlerMasaya Suzuki2019-12-023-28/+117
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Same as UploadPack, add a custom error handler. Change-Id: I9c708aa5a22e01214c1d997fa6f72f4b8bf814f0 Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
* | | | | | Enable and fix "Statement unnecessarily nested within else clause" warningsDavid Pursehouse2019-10-172-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since [1] the gerrit project includes jgit as a submodule, and has this warning enabled, resulting in 100s of warnings in the console. Also enable the warning here, and fix them. At the same time, add missing braces around adjacent and nearby one-line blocks. [1] https://gerrit-review.googlesource.com/c/gerrit/+/227897 Change-Id: I81df3fc7ed6eedf6874ce1a3bedfa727a1897e4c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | http: Allow specifying a custom error handler for UploadPackMasaya Suzuki2019-10-093-27/+118
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By abstracting the error handler, this lets a user customize the error handler for UploadPack. A customized error handler can show a custom error message to the clients based on the exception thrown from the hook, create a monitoring system for server errors, or do custom logging. Change-Id: Idd3b87d6bd471fef807c0cf1183e904b2886157e Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
* | | | | Merge branch 'stable-5.4'Matthias Sohn2019-08-092-5/+12
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.4: (82 commits) Export all packages of o.e.j.ant and o.e.j.archive bundles Do not require test bundles to export all packages Fix API problem filters Increase severity of AmbiguousMethodReference to ERROR [error prone] suppress AmbiguousMethodReference in AnyLongObjectId [error prone] fix ReferenceEquality warning in CommitBuilder [error prone] suppress NonAtomicVolatileUpdate warning in SimpleLruCache [error prone] fix ReferenceEquality warning in CommitGraphPane#authorFor [error prone] fix ReferenceEquality warning in RevWalk#isMergedInto [error prone] fix ReferenceEquality warning in RefUpdate#updateImpl [error prone] fix ReferenceEquality warning in static equals methods [error prone] suppress AmbiguousMethodReference in AnyObjectId [error prone] fix "FutureReturnValueIgnored" error in FS Fix formatting and add missing braces in Repository#stripWorkDir Repository: fix reference comparison of Files MergeAlgorithm: Suppress Error Prone warning about reference equality Fix NarrowingCompoundAssignment warnings from Error Prone FS_POSIX: handle Files.getFileStore() failures Fix OpenSshConfigTest#config FileSnapshot: fix bug with timestamp thresholding In LockFile#waitForStatChange wait in units of file time resolution Cache FileStoreAttributeCache per directory Fix FileSnapshot#save(long) and FileSnapshot#save(Instant) Persist minimal racy threshold and allow manual configuration Measure minimum racy interval to auto-configure FileSnapshot Reuse FileUtils to recursively delete files created by tests Fix FileAttributeCache.toString() Add test for racy git detection in FileSnapshot Repeat RefDirectoryTest.testGetRef_DiscoversModifiedLoose 100 times Fix org.eclipse.jdt.core.prefs of org.eclipse.jgit.junit Add missing javadoc in org.eclipse.jgit.junit Enhance RepeatRule to report number of failures at the end Fix FileSnapshotTests for filesystem with high timestamp resolution Retry deleting test files in FileBasedConfigTest Measure filesystem timestamp resolution already in test setup Refactor FileSnapshotTest to use NIO APIs Measure stored timestamp resolution instead of time to touch file Handle CancellationException in FileStoreAttributeCache Fix FileSnapshot#saveNoConfig Use Instant for smudge time in DirCache and DirCacheEntry Use Instant instead of milliseconds for filesystem timestamp handling Workaround SecurityException in FS#getFsTimestampResolution Fix NPE in FS$FileStoreAttributeCache.getFsTimestampResolution FS: ignore AccessDeniedException when measuring timestamp resolution Add debug trace for FileSnapshot Use FileChannel.open to touch file and set mtime to now Persist filesystem timestamp resolution and allow manual configuration Increase bazel timeout for long running tests Bazel: Fix lint warning flagged by buildifier Update bazlets to latest version Bazel: Add missing dependencies for ArchiveCommandTest Bazel: Remove FileTreeIteratorWithTimeControl from BUILD file Add support for nanoseconds and microseconds for Config#getTimeUnit Optionally measure filesystem timestamp resolution asynchronously Delete unused FileTreeIteratorWithTimeControl FileSnapshot#equals: consider UNKNOWN_SIZE Timeout measuring file timestamp resolution after 2 seconds Fix RacyGitTests#testRacyGitDetection GlobalBundleCache: Fix ClassNewInstance warning from Error Prone IncorrectObjectTypeException: Fix typos in constructors' Javadoc Change RacyGitTests to create a racy git situation in a stable way Deprecate Constants.CHARACTER_ENCODING in favor of StandardCharsets.UTF_8 Fix non-deterministic hash of archives created by ArchiveCommand Update Maven plugins ecj, plexus, error-prone Update Maven plugins and cleanup Maven warnings Make inner classes static where possible Error Prone: Increase severity of NonOverridingEquals to ERROR Error Prone: Increase severity of ImmutableEnumChecker to ERROR GitDateParser#ParseableSimpleDateFormat: Make formatStr private final BatchRefUpdateTest: Suppress ImmutableEnumChecker warning PacketLineIn: Suppress comparison warnings for END and DELIM FileSnapshot#toString: Suppress ReferenceEquality warnings Blame: Suppress ReferenceEquality warning for RevCommit instances Fix API problem filters pgm: add missing optional dependency to org.tukaani:xz NetscapeCookieFile: Make hash static and group overloaded write NetscapeCookieFile: Javadoc fixes Config: Handle reference-equality warning (and empty javadoc) Error Prone: Increase severity of ShortCircuitBoolean to ERROR ObjectWalk: Prefer boolean operators over logical operators in comparisons BasePackFetchConnection: Prefer boolean operators over logical operators in comparisons PackWriter: Prefer boolean operators over logical operators in comparisons Change-Id: I825fd55bcb5345fb7afe066bf54ca50325f40acb Signed-off-by: David Pursehouse <david.pursehouse@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>