Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-02-20Enable and fix warnings about redundant specification of type argumentsDavid Pursehouse6-11/+11
Since the introduction of generic type parameter inference in Java 7, it's not necessary to explicitly specify the type of generic parameters. Enable the warning in Eclipse, and fix all occurrences. Change-Id: I9158caf1beca5e4980b6240ac401f3868520aad0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-02-20Enable and fix 'Should be tagged with @Override' warningDavid Pursehouse6-1/+24
Set missingOverrideAnnotation=warning in Eclipse compiler preferences which enables the warning: The method <method> of type <type> should be tagged with @Override since it actually overrides a superclass method Justification for this warning is described in: http://stackoverflow.com/a/94411/381622 Enabling this causes in excess of 1000 warnings across the entire code-base. They are very easy to fix automatically with Eclipse's "Quick Fix" tool. Fix all of them except 2 which cause compilation failure when the project is built with mvn; add TODO comments on those for further investigation. Change-Id: I5772061041fd361fe93137fd8b0ad356e748a29c Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2017-02-20Update Jetty to 9.4.1.v20170120Matthias Sohn2-20/+16
MappedLoginService is no longer available in Jetty 9.4 therefore base TestLoginService on AbstractLoginService. Apparently Jetty now uses slf4j hence adapt RecordingLogger accordingly so we can log error messages containing slf4j style formatting anchors "{}". Change-Id: Ibb36aba8782882936849b6102001a88b699bb65c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-09-22AppServer: Remove unnecessary 'unused' suppressionsDavid Pursehouse1-4/+2
Change-Id: Ic27106f38af14833147f739179c3ef8ec6b6ee31 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
2016-08-08Fix non-parameterized generic type warningMatthias Sohn1-1/+3
Change-Id: Ib857166f64420aebf7c31d72825cac44bd770dbd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-07-14Fix AppServer build errors in Eclipse with <4.6 target platformsMatthias Sohn1-18/+27
9aa3748 added dummy implementations for loadRoleInfo() and loadUserInfo() to class MappedLoginService to fix compile errors in Eclipse when using 4.6 target platform which brings Jetty 9.3 adding these two methods. Unfortunately this causes errors when using non 4.6 target platform coming with an older Jetty version. Fix this by extracting the anonymous subclass of MappedLoginService which allows to suppress the unused private method errors in Eclipse. Change-Id: I75baeea7ff4502ce9ef2b541b3c0555da5535d79 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-07-10Implement new abstract MappedLoginService methods added in Jetty 9.3Matthias Sohn1-0/+8
Eclipse Neon comes with Jetty 9.3 which is causing unimplemented abstract method errors in test class AppServer when using the JGit or EGit Neon target platform. Fix this by adding dummy implementations. Change-Id: Ie49107d814a846997de95f149e91fe1ec2fbe4d8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-15Merge branch 'stable-4.2'Matthias Sohn1-1/+1
* stable-4.2: Don't use deprecated LockFile constructor Fix warnings about unchecked conversion of MergeResult MockServletConfig: Fix warning about unchecked conversion of Enumeration HugeFileTest: Make Git a class member and open in try-with-resource Suppress "unchecked cast" warnings related to UploadPackFactory.DISABLED DiffAlgorithms: Fix warnings about variable hiding DirCacheBasicTest: Open ObjectInserter.Formatter in try-with-resource DirCacheBuilderIteratorTest: Open TreeWalk in try-with-resource DirCacheCGitCompatabilityTest: Open TreeWalk in try-with-resource DirCacheCheckoutMaliciousPathTest: Open Git and RevWalk in t-w-r DirCacheIteratorTest: Open TreeWalk instances in try-with-resource ForPathTest: Open TreeWalk in try-with-resource GitConstructionTest: Open Git instance in try-with-resource IndexDiffTest: Open Git instances in try-with-resources ManifestParserTest: Don't use deprecated StringBufferInputStream InMemoryRepository: Remove unused RevWalk from batch method signature IndexModificationTimesTest: Open Git instances in try-with-resource InterIndexDiffFilterTest: Open TreeWalk in try-with-resource LockFileTest: Open Git instance in try-with-resource JGit v4.1.2.201602141800-r MergeCommandTest: Use JUnit's assume to check preconditions MergeCommandTest: Open Git instances in try-with-resource Change-Id: Ie5dba6b9132a29e86958a04fa2b76465bcd2c6b5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2016-02-15MockServletConfig: Fix warning about unchecked conversion of EnumerationDavid Pursehouse1-1/+1
Change-Id: Ic5ce6d220e3b644032819ce4b2f31c669be1cdb9 Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
2016-02-04Support LFS protocol and a file system based LFS storageMatthias Sohn1-1/+10
Implement LfsProtocolServlet handling the "Git LFS v1 Batch API" protocol [1]. Add a simple file system based LFS content store and the debug-lfs-store command to simplify testing. Introduce a LargeFileRepository interface to enable additional storage implementation while reusing the same protocol implementation. At the client side we have to configure the lfs.url, specify that we use the batch API and we don't use authentication: [lfs] url = http://host:port/lfs batch = true [lfs "http://host:port/lfs"] access = none the git-lfs client appends the "objects/batch" to the lfs.url. Hard code an Authorization header in the FileLfsRepository.getAction because then git-lfs client will skip asking for credentials. It will just forward the Authorization header from the response to the download/upload request. The FileLfsServlet supports file content storage for "Large File Storage" (LFS) server as defined by the Github LFS API [2]. - upload and download of large files is probably network bound hence use an asynchronous servlet for good scalability - simple object storage in file system with 2 level fan-out - use LockFile to protect writing large objects against multiple concurrent uploads of the same object - to prevent corrupt uploads the uploaded file is rejected if its hash doesn't match id given in URL The debug-lfs-store command is used to run the LfsProtocolServlet and, optionally, the FileLfsServlet which makes it easier to setup a local test server. [1] https://github.com/github/git-lfs/blob/master/docs/api/http-v1-batch.md [2] https://github.com/github/git-lfs/tree/master/docs/api Bug: 472961 Change-Id: I7378da5575159d2195138d799704880c5c82d5f3 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com>
2015-05-10Update to Jetty 9.2.10Matthias Sohn3-7/+20
Change-Id: Iace29e6e99836019bb603ce06a08b91bada7c627 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-04-18Remove some unnecessary dependencies on FileRepostoryRobin Rosenberg1-3/+2
Change-Id: Ib6ee3a2874a7e2240aa68f4ac32d00c4d1fab5ae Signed-off-by: Chris Aniszczyk <zx@twitter.com>
2013-03-22SimpleHttpServer API shouldn't expose internalsMatthias Sohn1-4/+3
Change-Id: I5963ae720f33cb148de08b4c64d02c81d6791139 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2013-03-18JGit 3.0: move internal classes into an internal subpackageShawn Pearce2-2/+2
This breaks all existing callers once. Applications are not supposed to build against the internal storage API unless they can accept API churn and make necessary updates as versions change. Change-Id: I2ab1327c202ef2003565e1b0770a583970e432e9
2012-06-05cleanup: Remove unused declarationsRobin Rosenberg1-1/+0
Change-Id: I3b54cb9f73cb433c71a441a11ddc74cfecdaa1dc
2012-06-03Revert Jetty from 8.1.3.v20120416 to 7.6.0.v20120127Matthias Sohn1-1/+1
This reverts commit 24a0f47e32ab7cdf20c2201d7100599ea057f8a3 and updates JGit dependencies to use the latest available Jetty 7.x release. We can't use Jetty 8.x since it depends on Servlet API 3.0 which requires Java 6 but JGit still wants to support Java 5. Use one of the target platforms defined in Ibf67a6d3539fa0708a3e5dbe44fb899c56fbd8ed to work with that in Eclipse. Change-Id: I343273d994dc7b6e0287c604e5926ff77d5b585b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-06-03Use default thread pool to prevent thread pool starvationMatthias Sohn1-17/+1
Bug: 380302 Change-Id: Ie66d495481776469ff2aa603c550557cff82cafc Suggested-By: Joakim Erdfelt <joakim@intalio.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-05-23Update Jetty to 8.1.3.v20120416Matthias Sohn2-3/+3
Jetty 8.1.3 comes with Juno M7 and this version can be installed from http://download.eclipse.org/jetty/updates/jetty-bundles-8.x/8.1.3.v20120416/ Change-Id: Ifc4bfbb3efbab0f5bfbde74f0b2ddc5a2f9ee6a5 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2012-03-09cleanup: Silence an unused-parameter warningRobin Rosenberg1-0/+1
Change-Id: Ic0ee9c08642d4efc6ef1f2333ebe6614e9c2df87
2011-03-01Adapt to Jetty 7.3 API change coming with IndigoMatthias Sohn1-0/+4
Indigo comes with Jetty 7.3 bringing some API changes. This still works with Jetty 7.1.6 shipped with Helios. Change-Id: If4f9d6ef6b45c94f8bb097f8b02c10317b47547b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-02-15daemon: Use HTTP's resolver and factory patternShawn O. Pearce1-3/+3
Using a resolver and factory pattern for the anonymous git:// Daemon class makes transport.Daemon more useful on non-file storage systems, or in embedded applications where the caller wants more precise control over the work tasks constructed within the daemon. Rather than defining new interfaces, move the existing HTTP ones into transport.resolver and make them generic on the connection handle type. For HTTP, continue to use HttpServletRequest, and for transport.Daemon use DaemonClient. To remain compatible with transport.Daemon, FileResolver needs to learn how to use multiple base directories, and how to export any Repository instance at a fixed name. Change-Id: I1efa6b2bd7c6567e983fbbf346947238ea2e847e Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-12-31Convert all JGit unit tests to JUnit 4Robin Rosenberg3-11/+14
Eclipse has some problem re-running single JUnit tests if the tests are in Junit 3 format, but the JUnit 4 launcher is used. This was quite unnecessary and the move was not completed. We still have no JUnit4 test. This completes the extermination of JUnit3. Most of the work was global searce/replace using regular expression, followed by numerous invocarions of quick-fix and organize imports and verification that we had the same number of tests before and after. - Annotations were introduced. - All references to JUnit3 classes removed - Half-good replacement for getting the test name. This was needed to make the TestRngs work. The initialization of TestRngs was also made lazily since we can not longer find out the test name in runtime in the @Before methods. - Renamed test classes to end with Test, with the exception of TestTranslateBundle, which fails from Maven - Moved JGitTestUtil to the junit support bundle Change-Id: Iddcd3da6ca927a7be773a9c63ebf8bb2147e2d13 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-12-08Introduce http test bundleJens Baumgart7-0/+1171
Introduce a http test bundle to make this functionality available for EGit tests. A simple http server class is provided. The jetty version was updated to a version that is also available via p2 (needed in EGit UI tests). Change-Id: I13bfc4c6c47e27d8f97d3e9752347d6d23e553d4 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>

    Back to the top