summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | Suppress non-localized string warnings introduced by If72b4b422David Pursehouse2018-03-202-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2e4544d715b4284f544a26f504d01159c5843160 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | scanPacks to return reftables even if no packsMinh Thai2018-03-221-1/+1
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An empty repository may have a dangling symref HEAD pointing to refs/heads/master. In this case, there will be a reftable even though there are no packs yet. Change-Id: Ib759ffbbfc490953481853e74263dd46d2592888 Signed-off-by: Minh Thai <mthai@google.com>
* | | | | | | | PackWriter: Fix Eclipse errors about missing JavadocDavid Pursehouse2018-03-201-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change If72b4b422 added a new method filterAndAddObject with a partial Javadoc, which causes errors in Eclipse. Since it's a private method, Javadoc is not strictly necessary, so just convert it to a standard comment block. Bug: 532540 Change-Id: I06aa79211d1223dccf6c931451ca885ca6d39cbc Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | ReflogWriter: Refactor to open FileOutputStream in try-with-resourceDavid Pursehouse2018-03-161-17/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I028ced10eecc99214a4c4a8055c379af72193f13 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | PushCommand: Suppress resource warning for Transport in for loopDavid Pursehouse2018-03-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A list of Transport instances is provided by Transport.openAll, and then iterated over in a for loop. Eclipse warns that the Transport in the for-loop should be managed by try-with-resource. The Transport is explicitly closed in the finally block, so just suppress the warning. Change-Id: I92b73cd90902637cf1ac1ab7b02b5ee5ed6bdb1e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Merge branch 'stable-4.11'David Pursehouse2018-03-162-17/+78
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-4.11: ObjectIdSerializer: Support serialization of known non-null ObjectId Change-Id: Ie430fa2c5d13ae698d884a37d0d03884ebbf25ec Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
| * | | | | | | ObjectIdSerializer: Support serialization of known non-null ObjectIdDavid Pursehouse2018-03-152-17/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation of ObjectIdSerializer, added in change I7599cf8bd, is not equivalent to the original implementation in Gerrit [1]. The Gerrit implementation provides separate methods to (de)serialize instances of ObjectId that are known to be non-null. In these methods, no "marker" is written to the stream. Replacing Gerrit's implementation with ObjectIdSerializer [2] broke persistent caches because it started writing markers where they were not expected [3]. Since ObjectIdSerializer is included in JGit 4.11 we can't change the existing #write and #read methods. Keep those as-is, but extend the Javadoc to clarify that they support possibly null ObjectId instances. Add new methods #writeWithoutMarker and #readWithoutMarker to support the cases where the ObjectId is known to be non-null and the marker should not be written to the serialization stream. Also: - Replace the hard-coded `0` and `1` markers with constants that can be linked from the Javadocs. - Include the marker value in the "Invalid flag before ObjectId" exception message. [1] https://gerrit-review.googlesource.com/c/gerrit/+/9792 [2] https://gerrit-review.googlesource.com/c/gerrit/+/165851 [3] https://gerrit-review.googlesource.com/c/gerrit/+/165952 Change-Id: Iaf84c3ec32ecf83efffb306fdb4940cc85740f3f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Teach UploadPack to support filtering by blob sizeJonathan Tan2018-03-159-4/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach UploadPack to advertise the filter capability and support a "filter" line in the request, accepting blob sizes only, if the configuration variable "uploadpack.allowfilter" is true. This feature is currently in the "master" branch of Git, and as of the time of writing, this feature is to be released in Git 2.17. This is incomplete in that the filter-by-sparse-specification feature also supported by Git is not included in this patch. If a JGit server were to be patched with this commit, and a repository on that server configured with RequestPolicy.ANY or RequestPolicy.REACHABLE_COMMIT_TIP, a Git client built from the "master" branch would be able to perform a partial clone. Change-Id: If72b4b422c06ab432137e9e5272d353b14b73259 Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
* | | | | | | | SubmoduleStatusCommand: Open Repository in try-with-resourceDavid Pursehouse2018-03-151-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id65c8a94d43bc01e76733eb2ff87635d0f8a8dc2 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | RepositoryCache#registerRepository: Refactor to use try-with-resourceDavid Pursehouse2018-03-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iaad45b66cc10ac267f6aed7999cc8dc8c07f92e6 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | RepoCommandSymlinkTest#testLinkFileBare: Use try-with-resourceDavid Pursehouse2018-03-151-34/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I72756d92dc5ea54ad009dddb9cebbcd6d1a0b4f8 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | RepoCommandTest: Refactor to use try-with-resourceDavid Pursehouse2018-03-151-395/+373
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If37ce4447feb431169a75594194a7ef02e362d4e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | ReceivePackAdvertiseRefsHookTest#testSuccess: Open TransportLocal in t-w-rDavid Pursehouse2018-03-151-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I198ff2ff36de482445141b5ce489204a9c2f4933 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | DfsPackCompactor: Open PackWriter in try-with-resourceDavid Pursehouse2018-03-151-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I2c7b3fdf6a51471c35434a6176865d622b13653d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | DfsPackFile: Refactor getBitmapIndex to open ReadableChannel in ↵David Pursehouse2018-03-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | try-with-resource Refactor getBitmapIndex to open ReadableChannel in try-with-resource instead of closing the channel in the finally block. The same cannot be done in copyPackThroughCache, so just suppress the warning with an explanatory comment. Change-Id: I9b95373d350728e85a159423d5ca80e8b215914d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | IndexDiff: Refactor to open Repository in try-with-resourceDavid Pursehouse2018-03-151-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I667d685ccedc730e786f1e52323fdeba4b91af3e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | DirCache: Suppress resource warning related to TemporaryBufferDavid Pursehouse2018-03-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #writeTo, the TemporaryBuffer can't be opened in try-with-resource because it's referenced in the finally block. Instead it is explicitly closed within the try block. Suppress the warning with an explanatory comment. Change-Id: I02009f77f9630d5d55afc34eb86d304ff103b8b0 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Add SilentFileInputStream to allow ignoring exceptions raised by close()David Pursehouse2018-03-155-55/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are several cases where a FileInputStream is opened outside of a try-with-resource because we want to explicitly close it and ignore any IOException that is raised by the close() method. Introduce a helper class, SilentFileInputStream, that overrides the close method and ignores the exceptions. This allows to open the stream in a try-with-resource block and remove the explicit handling of the close method. Change-Id: I8612f948a1a5b3d1031344922ad75ce4492cfc61 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | WorkingTreeIterator#idSubmodule: Refactor to open Repository in ↵David Pursehouse2018-03-141-21/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | try-with-resource Change-Id: I991f0096c833da721b98c1e0423a8dadc67cd64f Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | UploadPack: Suppress resource warning about PackWriterDavid Pursehouse2018-03-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PackWriter is auto-closeable and should be opened in try-with-resource, but this is not possible since the variable is being referenced in the finally block before being explicitly closed there. Suppress the warning and add an explanatory comment. Change-Id: I161923f35142132234fd951c0146d3cb30920b7b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | ShowPackDelta: Refactor to use try-with-resourceDavid Pursehouse2018-03-141-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the resource warning suppression and refactor the code to open the TemporaryBuffer and InflaterInputStream in a try-with-resource. Change-Id: I3082e5ac7565c5000d5a4364f750dd0a0952fc6e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | SubmoduleWalk#forIndex: Suppress resource warning and update JavadocDavid Pursehouse2018-03-141-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SubmoduleWalk is auto-closeable, and Eclipse warns that is is not managed by try-with-resource. However in this case the resource should not be closed, because the caller needs to use it. Instead, it is the responsibility of the caller to close it after use. Update the Javadoc to clarify this, and suppress the warning. Change-Id: Ib7ba349353bfd3341bdcbe4bb19abaeb9f3aeba5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | SubmoduleWalk: Open Repository in try-with-resourceDavid Pursehouse2018-03-141-12/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib29aaf26b49aa94a5a7cc0b0264a0a93ecff0c16 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | RepositoryFilter: Refactor doFilter to open Repository in try-with-resourceDavid Pursehouse2018-03-141-8/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ic4a056eebe567ff933519d6a805edb7e97c71b22 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | NetRC: Open BufferedReader in try-with-resourceDavid Pursehouse2018-03-141-10/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie0688b0ce19f657834a23438f112569a86491b3b Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | PackParser: Refactor to open InputStream in try-with-resourceDavid Pursehouse2018-03-141-25/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8d002ccc8f168f5891492a4c5742c82f8cb7a0b6 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | AutoLFInputStreamTest: Use try-with-resourceDavid Pursehouse2018-03-141-25/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I162bfa6b2f87f2ce9154f3ed6bb628c4cda88f50 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | DfsInserter: Refactor writePackIndex to use try-with-resourceDavid Pursehouse2018-03-141-15/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor to allow the temporary buffer to be opened in try-with-resource. Change-Id: Id913e6c3ed3913fd5d79d66238b779e0c225b47d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | AmazonS3: Refactor error method to avoid 'should be managed by ↵David Pursehouse2018-03-131-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | try-with-resource' warning Change-Id: I205fc1c77777870b0a036e52fa9954de5d9f60b5 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | CommandCatalog: Simplify scan method using try-with-resourceDavid Pursehouse2018-03-131-21/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IOExceptions caught in the nested try blocks are all ignored, so we can just wrap them all up into a single try-with-resource block. Change-Id: Id85850b3f54c408af73063220e6fead20cb0fd80 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Transport: Simplify scan method using try-with-resourceDavid Pursehouse2018-03-131-21/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The IOExceptions caught in the nested try blocks are all ignored, so we can just wrap them all up into a single try-with-resource block. Change-Id: I536d682f1017c5088b94ff9f98ffa2b7c783d8bf Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Use CHARSET in FileOutputStream instead of hard-coded "UTF-8"David Pursehouse2018-03-132-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I63ad25e1ebd94081c8848f4d21044cf9041f971d Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | TemporaryBufferTest: Suppress "should be managed by try-with-resource"David Pursehouse2018-03-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In most of the tests, the temporary buffer is explicitly destroyed in a finally block after being closed. This is not possible if using the try-with-resource construct, because the variable is not accessible in the finally block scope. Change-Id: I3bab30695ddd12e1a0ae107989638428fe3ef551 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | Open auto-closeable resources in try-with-resourceDavid Pursehouse2018-03-1347-609/+434
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | Implement --force option in FetchCommand and CLI fetch commandMatthias Sohn2018-03-135-3/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I42cdb57b8fb54ce466d1958391f12f911045327f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | Merge "Introduce SshSupport to centralize SSH related utility code"Matthias Sohn2018-03-122-46/+126
|\ \ \ \ \ \ \ \
| * | | | | | | | Introduce SshSupport to centralize SSH related utility codeMarkus Duft2018-03-122-46/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed with Thomas here: https://git.eclipse.org/r/#/c/83506/31/org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/SmudgeFilter.java@349 Move the code from ConfigureGerritAfterCloneTask to SshSupport and eliminate the slightly modified copy of the code from LfsConnectionFactory. Separate EGit commit will eliminate the code from ConfigureGerritAfterCloneTask. Change-Id: Ifb5adb1342e0fc1f2a70cddf693408d4e0ef7906 Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
* | | | | | | | | UploadPack: Remove redundant suppression of deprecation warningDavid Pursehouse2018-03-121-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9a7f46e1da42fd86adedc18b3394d5f755722624 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8David Pursehouse2018-03-1175-316/+331
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I6714fc3666e1bced22abba94ceb700477349586e Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | Constants: Initialize CHARSET and CHARACTER_ENCODING from StandardCharsets.UTF_8David Pursehouse2018-03-111-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib4e0a35429892fa1581db09a9b77717120d03275 Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
* | | | | | | | | Remove deprecated LfsProtocolServlet#getLargeFileRepositoryMatthias Sohn2018-03-102-48/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use LfsProtocolServlet##getLargeFileRepository(LfsRequest, String, String) instead. Change-Id: If68d06f2e6edbf843dc9d3b4e3b99c33b0fab766 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated Lfs#Lfs(Path)Matthias Sohn2018-03-101-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Lfs#Lfs(Repository) instead. Change-Id: I7303987ed047b42fd1bac8e27ed49333080e556b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated StreamCopyThread#flushMatthias Sohn2018-03-101-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | StreamCopyThread: Do not let flush interrupt a write. flush calls interrupt() to interrupt a pending read and trigger a flush. Unfortunately that interrupt() call can also interrupt a pending write, putting Jsch in a bad state and triggering "Short read of block" errors. Change-Id: I11f8a014fd72df06617cc8731d992eb14cc32a67 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated SafeBufferedOutputStreamMatthias Sohn2018-03-101-78/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Java 8 BufferedOutputStream instead. Java 8 fixed the silent flush during close issue by FilterOutputStream (base class of BufferedOutputStream) using try-with-resources to close the stream, getting a behavior matching what JGit's SafeBufferedOutputStream was doing Change-Id: Ieeab59f49b44519585abda213d287b19c7863b17 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated EolCanonicalizingInputStreamMatthias Sohn2018-03-101-102/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use AutoLFInputStream instead. Change-Id: If3765c425eed3a52d0c6aa8c7ea4925bb2e87395 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated FileUtils#relativize(String, String)Matthias Sohn2018-03-101-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the more-clearly-named FileUtils#relativizeNativePath(String, String) instead, or directly call FileUtils#relativizePath(String, String, String, boolean). Change-Id: I9b56302c94630c75293d8cf5510e1d2f22f2b778 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated FileUtil using Java 7 NIOMatthias Sohn2018-03-101-303/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I180a7a0bf9fe36c42edab9fffc6c05d983c229a7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated TreeWalk#getEolStreamTypeMatthias Sohn2018-03-101-16/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use TreeWalk#getEolStreamType(OperationType) instead. Change-Id: I0f102ddf36102ff55a71448e376ed08743da5d1f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated FileTreeIterator(WorkingTreeIterator, File, FS)Matthias Sohn2018-03-101-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use FileTreeIterator#FileTreeIterator(FileTreeIterator, File, FS) instead. Change-Id: I675e14863a1a387e7da9fc5148feffaf55d4ad39 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | | | | | | | | Remove deprecated TransportHttp#httpOpen(String, URL)Matthias Sohn2018-03-101-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use TransportHttp#httpOpen(String, URL, AcceptEncoding) instead. Change-Id: I4ad423175daa5499caad9cccb88076d371331569 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>