aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test
Commit message (Collapse)AuthorAgeFilesLines
* Capture test coverage and add an aggregate test coverage reportMatthias Sohn2018-12-211-1/+1
| | | | | | | | | | | | | Configure Maven build to capture test coverage using jacoco. Add new org.eclipse.jgit.coverage Maven module to aggregate jacoco test coverage results and generate test coverage HTML report at org.eclipse.jgit.coverage/target/site/jacoco-aggregate/index.html See https://www.eclemma.org/jacoco/trunk/doc/maven.html Change-Id: Iaeec4033e448ebc16965c05ab54109c4155a307a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 5.3.0-SNAPSHOT buildsMatthias Sohn2018-12-032-21/+21
| | | | | Change-Id: I8951c2cf650cc3e41d2baa0b330b94468cfed5c2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Revert C Git 1.7.5 bug workaroundMasaya Suzuki2018-11-191-15/+0
| | | | | | | | | | This reverts the workaround introduced by 1c6c73c5a9b8dd700be45d658f165a464265dba7, which is a patch for dealing with a buggy C Git client v1.7.5 in 2012. We'll stop supporting very old C Git clients. Change-Id: I94999a39101c96f210b5eca3c2f620c15eb1ac1b Signed-off-by: Masaya Suzuki <masayasuzuki@google.com>
* Configure classpath for separate test sources in EclipseMichael Keppler2018-10-171-2/+10
| | | | | | | | | | | | | | | Eclipse Photon supports separating sources and test sources. There are no functional changes in the IDE, except for test source folders having a different icon color. Users of different IDEs than Eclipse are not affected, since the attribute on the classpath entries will be ignored by their IDE. Bug: 539933 Change-Id: Iac6dcdf0c0730ca775bae90df6a685303dc95380 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de> Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Disable Eclipse warning about unrecognized @SuppressWarnings valueDavid Pursehouse2018-10-171-1/+1
| | | | | | | | | | | | | The code base has several @SuppressWarnings annotations to suppress warnings raised by Error Prone, but those are not recognized by Eclipse and there is currently no way to tell it about them [1]. Suppress them for now. [1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=392045 Change-Id: I3de7cfa8ad4370ca5be71e1303879c73ab6829c1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Explicitly specify charset when constructing PrintWriterDavid Pursehouse2018-09-301-1/+4
| | | | | Change-Id: Ie1631784b5eba04edb21f66df284f9e279fd2ec0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Deprecate Constants.CHARACTER_ENCODING in favor of StandardCharsets.UTF_8David Pursehouse2018-09-301-1/+1
| | | | | Change-Id: I621ba174235a6fb56236e54d24bce704bb5afb28 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* FileResolverTest#testNotAGitRepository: Fail when exception is not thrownDavid Pursehouse2018-09-291-0/+1
| | | | | | | | | | | Error Prone reports: Not calling fail() when expecting an exception masks bugs See https://errorprone.info/bugpattern/MissingFail Change-Id: I9ac844aa6c5a620d9b5d21d2e242347b3788b96a Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Explicitly specify charset in constructor of InputStreamReaderDavid Pursehouse2018-09-261-6/+13
| | | | | Change-Id: Id43e27c590f41f7435c2ca1d127f27e45745da7f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Make inner classes static where possibleDavid Pursehouse2018-09-261-1/+1
| | | | | | | | | | | | | As reported by Error Prone: An inner class should be static unless it references members of its enclosing class. An inner class that is made non-static unnecessarily uses more memory and does not make the intent of the class clear. See https://errorprone.info/bugpattern/ClassCanBeStatic Change-Id: Ib99d120532630dba63cf400cc1c61c318286fc41 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Fix Mylyn commit message templateMichael Keppler2018-09-231-1/+1
| | | | | | | | The commit message template contains a superfluous blank at the end of the first line, which is deleted by this change. This is only relevant for jgit contributors using Eclipse, not for jgit users. Change-Id: I462deb49c26fb64b3dc2d1d75f1e40ef302b0fc9 Signed-off-by: Michael Keppler <Michael.Keppler@gmx.de>
* Prepare 5.2.0-SNAPSHOT buildsMatthias Sohn2018-09-062-21/+21
| | | | | Change-Id: If8e8ca20e745901a5e0239c16cb4acc7934b4ec8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Deprecate Constants.CHARSET in favor of StandardCharsets.UTF_8David Pursehouse2018-09-041-2/+2
| | | | | Change-Id: I3b748620f067582afef20f144feebe40d0332be2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HttpClientConnectionTest: Throw UnsupportedOperationException for unused methodsDavid Pursehouse2018-08-271-11/+11
| | | | | | | | | | | | | | | | The HttpResponseMock class is only used in a single test to assert on the expected headers. All of its overridden methods are empty, and this results in warnings in Eclipse: 'Empty block should be documented' Rather than adding "// Not used" comments, change all of the methods' implementations to throw UnsupportedOperationException. This not only gets rid of the warnings, but also makes it explicit that we don't intend any of them to actually be called. Change-Id: I8fe06b155e0809bb3507e4e28b00fcc4f9333b0b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HttpClientConnectionTest: Reformat with the Eclipse styleDavid Pursehouse2018-08-271-132/+137
| | | | | Change-Id: I1066dea0bbb4573aabaf417365fb46772f0f4d0e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HttpClientConnectionTest: Add missing license headerDavid Pursehouse2018-08-271-0/+42
| | | | | Change-Id: I9e4bd2bfe16f4824eb8ed7ccfab332646b3233b1 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HttpClientTests: Open OutputStream in try-with-resourceDavid Pursehouse2018-08-251-6/+6
| | | | | Change-Id: Ib690b0af6d562765f43ad54d3855200a17eaa90b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HttpClientTests: Use assertEquals to assert about response codeDavid Pursehouse2018-08-251-3/+3
| | | | | | | | | | | | The current usage of assertThat causes a warning in Eclipse: "The expression of type int is boxed into Integer". Replace it with assertEquals which does not cause this warning, and is consistent with how such assertions are done in other tests. Change-Id: Id3de3548353bf6be069b6ede89c605d094b6d3f4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HttpClientConnection.getHeaderFields should support multiple values for same ↵Gabriel Couto2018-07-233-0/+94
| | | | | | | | header Bug: 537166 Change-Id: I1ba645968efe01a88f2484f030b7572228ba169c Signed-off-by: Gabriel Couto <gmcouto@gmail.com>
* Add response message, if any, on HTTP status 404Thomas Wolf2018-07-031-2/+6
| | | | | | | | | Try to give as much information as possible. The connection's response message might contain additional hints as to why the connection could not be established. Bug: 536541 Change-Id: I7230e4e0be9417be8cedeb8aaab35186fcbf00a5 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Merge branch 'stable-5.0'Jonathan Nieder2018-06-043-2/+97
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.0: Teach UploadPack "filter" in protocol v2 fetch Refactor test of capabilities output Refactor v2 advertisement into own function Refactor parsing of "filter" into its own method Disallow unknown args to "fetch" in protocol v2 Teach UploadPack shallow fetch in protocol v2 Refactor unshallowCommits to local variable Add protocol v2 support in http Give info/refs services more control over response Change-Id: I1683902222e076e1091795e94790a264550afb7b Signed-off-by: Jonathan Nieder <jrn@google.com>
| * Add protocol v2 support in httpJonathan Tan2018-06-043-2/+97
| | | | | | | | | | | | | | | | | | | | | | Teach UploadPack to support protocol v2 with non-bidirectional pipes, and add support to the HTTP protocol for v2. This is only activated if the repository's config has "protocol.version" equal to 2. Change-Id: I093a14acd2c3850b8b98e14936a716958f35a848 Helped-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Jonathan Nieder <jrn@google.com>
| * Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-05-302-2/+2
| | | | | | | | | | Change-Id: I9c4a0465f8e85041d24da97f4b4c7ad5f5eed3e4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.0.0.201805301535-rc2v5.0.0.201805301535-rc2Matthias Sohn2018-05-302-2/+2
| | | | | | | | | | Change-Id: Ifad678794525c01838b03e52bada66e1c089c5ae Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-05-232-2/+2
| | | | | | | | | | Change-Id: Ie343ccf37f46168041046500a2e19acc80814cfe Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.0.0.201805221745-rc1v5.0.0.201805221745-rc1Matthias Sohn2018-05-222-2/+2
| | | | | | | | | | Change-Id: Ie2c35fab87f294b00f9754b07b60a848bf256b10 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Prepare 5.1.0-SNAPSHOT buildsMatthias Sohn2018-05-232-21/+21
|/ | | | | Change-Id: I8523a993ae1f7b62573d7547273bc1356bf64fa7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove further unnecessary 'final' keywordsHan-Wen Nienhuys2018-05-183-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove it from * package private functions. * try blocks * for loops this was done with the following python script: $ cat f.py import sys import re import os def replaceFinal(m): return m.group(1) + "(" + m.group(2).replace('final ', '') + ")" methodDecl = re.compile(r"^([\t ]*[a-zA-Z_ ]+)\(([^)]*)\)") def subst(fn): input = open(fn) os.rename(fn, fn + "~") dest = open(fn, 'w') for l in input: l = methodDecl.sub(replaceFinal, l) dest.write(l) dest.close() for root, dirs, files in os.walk(".", topdown=False): for f in files: if not f.endswith('.java'): continue full = os.path.join(root, f) print full subst(full) Change-Id: If533a75a417594fc893e7c669d2c1f0f6caeb7ca Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* Remove 'final' in parameter listsHan-Wen Nienhuys2018-05-151-3/+3
| | | | | Change-Id: Id924f79c8b2c720297ebc49bf9c5d4ddd6d52547 Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
* Use Constants.CHARACTER_ENCODING in testsDavid Pursehouse2018-04-111-1/+1
| | | | | Change-Id: Iba9fc991aee54fcb8b0dc5e5841da24c2d54dfc2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-133-19/+7
| | | | | | | | | | | | | | | | | | | | When an auto-closeable resources is not opened in try-with-resource, the warning "should be managed by try-with-resource" is emitted by Eclipse. Fix the ones that can be silenced simply by moving the declaration of the variable into a try-with-resource. In cases where we explicitly call the close() method, for example in tests where we are testing specific behavior caused by the close(), suppress the warning. Leave the ones that will require more significant refcactoring to fix. They can be done in separate commits that can be reviewed and tested in isolation. Change-Id: I9682cd20fb15167d3c7f9027cecdc82bc50b83c4 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8David Pursehouse2018-03-111-2/+2
| | | | | Change-Id: I6714fc3666e1bced22abba94ceb700477349586e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 5.0.0-SNAPSHOT buildsMatthias Sohn2018-03-082-21/+21
| | | | | Change-Id: I2d2f50ed8a12f310e7cac68eed5536bd460c403f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 4.11.1-SNAPSHOT buildsMatthias Sohn2018-03-082-21/+21
| | | | | Change-Id: Id9aa6b7e8f56de5183b6cd57ef0e790ec9debd4d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v4.11.0.201803080745-rv4.11.0.201803080745-rMatthias Sohn2018-03-082-2/+2
| | | | | Change-Id: Ie24a33bc8a24c30db06fe7b175f405efb95776ec Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* MeasurePackSizeTest: Open Transport in try-with-resourceDavid Pursehouse2018-03-071-5/+1
| | | | | Change-Id: If9a39f8eabe1cd3474bdc025ac92218cd2dd1640 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* HookMessageTest: Open Transport in try-with-resourceDavid Pursehouse2018-03-061-10/+2
| | | | | Change-Id: Ie58b01a8a78e4f42a3b913708a545687c5c9f96b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* GitServletResponseTests: Open Transport in try-with-resourceDavid Pursehouse2018-03-061-15/+3
| | | | | Change-Id: Ib74752c9185e38d0bfe9b4cef93b2427bf3afbd0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* DumbClientSmartServerTest: Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-061-22/+7
| | | | | Change-Id: I599c6e274fe80af7bfd2205f56f469c22d1dd3e0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* AdvertiseErrorTest: Open Transport in try-with-resourceDavid Pursehouse2018-03-051-4/+1
| | | | | Change-Id: I78adec7baf82d1a0eedc10e90b6d4f20008a046d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Enable warning for resources not managed by try-with-resourceDavid Pursehouse2018-03-031-1/+1
| | | | | Change-Id: Iefe97de6bdb62af558f1b0e77c9205a9186f9b4c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Prepare 4.11.0-SNAPSHOT buildsMatthias Sohn2017-12-312-21/+21
| | | | | Change-Id: I5d5e2befcf530d93457d44684bd9e4fc2392e5eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add header Automatic-Module-Name for Java 9Karsten Thoms2017-12-231-0/+1
| | | | | | Bug: 529075 Change-Id: I4532ce2c80eb91531d46026676502d636ccda706 Signed-off-by: Karsten Thoms <karsten.thoms@itemis.de> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix javadoc in org.eclipse.jgit.http.testMatthias Sohn2017-12-172-3/+7
| | | | | Change-Id: Ibd18dfed05d35bd70498d11c04c026a34114a87e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Specify consistent version range for junit in OSGi manifestsDavid Pursehouse2017-12-081-3/+3
| | | | | | | | | | There are several different version ranges specified in the various manifest files. Align them all to the same range: [4.12,5.0.0) Change-Id: I02205b8b8546c9f53ed431b5fd9abf6ddcda4423 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Use constants from StandardCharsets instead of hard-coded stringsDavid Pursehouse2017-12-071-2/+2
| | | | | | | | | | | | | | | | Instead of hard-coding the charset strings "US-ASCII", "UTF-8", and "ISO-8859-1", use the corresponding constants from StandardCharsets. UnsupportedEncodingException is not thrown when the StandardCharset constants are used, so remove the now redundant handling. Because the encoding names are no longer hard-coded strings, also remove redundant $NON-NLS warning suppressions. Also replace existing usages of the constants with static imports. Change-Id: I0a4510d3d992db5e277f009a41434276f95bda4e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* Merge branch 'stable-4.9'Matthias Sohn2017-11-241-1/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.9: Ignore warning for minor version change without API change Silence boxing warning Prepare 4.5.5-SNAPSHOT builds JGit v4.5.4.201711221230-r Fix LockFile semantics when running on NFS Honor trustFolderStats also when reading packed-refs Prepare 4.5.4-SNAPSHOT builds JGit v4.5.3.201708160445-r Change-Id: Icc33d2e36f140e8714fce088379673a8834ae9de
| * Ignore warning for minor version change without API changeMatthias Sohn2017-11-241-1/+11
| | | | | | | | | | | | | | | | - this is a new warning option in Eclipse 4.7 and higher - we always change version of all bundles in a release to keep release engineering simple Change-Id: Ic7523d77b67b2802f1bab3bc70af250d712a034f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 4.9.1-SNAPSHOT buildsMatthias Sohn2017-10-082-20/+20
| | | | | | | | | | Change-Id: Ic49fd093d3fe4324c4d83aba74033040fcaa37a6 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v4.9.0.201710071750-rv4.9.0.201710071750-rMatthias Sohn2017-10-072-2/+2
| | | | | | | | | | Change-Id: I487f6aa3d0c4ef1d57f91cdc36177d994ae24c51 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>