]> source.dussan.org Git - jgit.git/log
jgit.git
6 years agoTransport: Simplify scan method using try-with-resource 90/119290/2
David Pursehouse [Tue, 13 Mar 2018 06:50:27 +0000 (15:50 +0900)]
Transport: Simplify scan method using try-with-resource

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>
6 years agoUse CHARSET in FileOutputStream instead of hard-coded "UTF-8" 87/119287/4
David Pursehouse [Tue, 13 Mar 2018 05:21:29 +0000 (14:21 +0900)]
Use CHARSET in FileOutputStream instead of hard-coded "UTF-8"

Change-Id: I63ad25e1ebd94081c8848f4d21044cf9041f971d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTemporaryBufferTest: Suppress "should be managed by try-with-resource" 97/119297/2
David Pursehouse [Tue, 13 Mar 2018 08:24:10 +0000 (17:24 +0900)]
TemporaryBufferTest: Suppress "should be managed by try-with-resource"

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>
6 years agoOpen auto-closeable resources in try-with-resource 86/119286/4
David Pursehouse [Tue, 13 Mar 2018 02:44:23 +0000 (11:44 +0900)]
Open auto-closeable resources in try-with-resource

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>
6 years agoImplement --force option in FetchCommand and CLI fetch command 85/119285/1
Matthias Sohn [Tue, 13 Mar 2018 01:20:29 +0000 (02:20 +0100)]
Implement --force option in FetchCommand and CLI fetch command

Change-Id: I42cdb57b8fb54ce466d1958391f12f911045327f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge "Introduce SshSupport to centralize SSH related utility code"
Matthias Sohn [Mon, 12 Mar 2018 23:52:43 +0000 (19:52 -0400)]
Merge "Introduce SshSupport to centralize SSH related utility code"

6 years agoIntroduce SshSupport to centralize SSH related utility code 51/118951/2
Markus Duft [Thu, 8 Mar 2018 07:29:03 +0000 (08:29 +0100)]
Introduce SshSupport to centralize SSH related utility code

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>
6 years agoUploadPack: Remove redundant suppression of deprecation warning 89/119189/1
David Pursehouse [Mon, 12 Mar 2018 01:52:03 +0000 (10:52 +0900)]
UploadPack: Remove redundant suppression of deprecation warning

Change-Id: I9a7f46e1da42fd86adedc18b3394d5f755722624
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoConsistently use Constants.CHARSET rather than StandardCharsets.UTF_8 47/118947/4
David Pursehouse [Thu, 8 Mar 2018 00:44:01 +0000 (09:44 +0900)]
Consistently use Constants.CHARSET rather than StandardCharsets.UTF_8

Change-Id: I6714fc3666e1bced22abba94ceb700477349586e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoConstants: Initialize CHARSET and CHARACTER_ENCODING from StandardCharsets.UTF_8 45/118945/4
David Pursehouse [Thu, 8 Mar 2018 00:42:02 +0000 (09:42 +0900)]
Constants: Initialize CHARSET and CHARACTER_ENCODING from StandardCharsets.UTF_8

Change-Id: Ib4e0a35429892fa1581db09a9b77717120d03275
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoRemove deprecated LfsProtocolServlet#getLargeFileRepository 28/119128/2
Matthias Sohn [Fri, 9 Mar 2018 23:57:57 +0000 (00:57 +0100)]
Remove deprecated LfsProtocolServlet#getLargeFileRepository

Use LfsProtocolServlet##getLargeFileRepository(LfsRequest, String,
String) instead.

Change-Id: If68d06f2e6edbf843dc9d3b4e3b99c33b0fab766
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated Lfs#Lfs(Path) 27/119127/2
Matthias Sohn [Fri, 9 Mar 2018 23:56:04 +0000 (00:56 +0100)]
Remove deprecated Lfs#Lfs(Path)

Use Lfs#Lfs(Repository) instead.

Change-Id: I7303987ed047b42fd1bac8e27ed49333080e556b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated StreamCopyThread#flush 26/119126/2
Matthias Sohn [Fri, 9 Mar 2018 23:54:51 +0000 (00:54 +0100)]
Remove deprecated StreamCopyThread#flush

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>
6 years agoRemove deprecated SafeBufferedOutputStream 25/119125/2
Matthias Sohn [Fri, 9 Mar 2018 23:52:22 +0000 (00:52 +0100)]
Remove deprecated SafeBufferedOutputStream

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>
6 years agoRemove deprecated EolCanonicalizingInputStream 24/119124/2
Matthias Sohn [Fri, 9 Mar 2018 23:50:21 +0000 (00:50 +0100)]
Remove deprecated EolCanonicalizingInputStream

Use AutoLFInputStream instead.

Change-Id: If3765c425eed3a52d0c6aa8c7ea4925bb2e87395
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated FileUtils#relativize(String, String) 23/119123/2
Matthias Sohn [Fri, 9 Mar 2018 23:49:14 +0000 (00:49 +0100)]
Remove deprecated FileUtils#relativize(String, String)

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>
6 years agoRemove deprecated FileUtil using Java 7 NIO 22/119122/2
Matthias Sohn [Fri, 9 Mar 2018 23:46:47 +0000 (00:46 +0100)]
Remove deprecated FileUtil using Java 7 NIO

Change-Id: I180a7a0bf9fe36c42edab9fffc6c05d983c229a7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated TreeWalk#getEolStreamType 21/119121/2
Matthias Sohn [Fri, 9 Mar 2018 23:45:27 +0000 (00:45 +0100)]
Remove deprecated TreeWalk#getEolStreamType

Use TreeWalk#getEolStreamType(OperationType) instead.

Change-Id: I0f102ddf36102ff55a71448e376ed08743da5d1f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated FileTreeIterator(WorkingTreeIterator, File, FS) 20/119120/2
Matthias Sohn [Fri, 9 Mar 2018 23:44:11 +0000 (00:44 +0100)]
Remove deprecated FileTreeIterator(WorkingTreeIterator, File, FS)

Use FileTreeIterator#FileTreeIterator(FileTreeIterator, File, FS)
instead.

Change-Id: I675e14863a1a387e7da9fc5148feffaf55d4ad39
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated TransportHttp#httpOpen(String, URL) 19/119119/2
Matthias Sohn [Fri, 9 Mar 2018 23:40:52 +0000 (00:40 +0100)]
Remove deprecated TransportHttp#httpOpen(String, URL)

Use TransportHttp#httpOpen(String, URL, AcceptEncoding) instead.

Change-Id: I4ad423175daa5499caad9cccb88076d371331569
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated ResolveMerger#processEntry method 18/119118/2
Matthias Sohn [Fri, 9 Mar 2018 23:39:20 +0000 (00:39 +0100)]
Remove deprecated ResolveMerger#processEntry method

Change-Id: I687965f6e9f3bcafa28afd62621fea240b36939d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated Repository#getRef 17/119117/2
Matthias Sohn [Fri, 9 Mar 2018 23:37:07 +0000 (00:37 +0100)]
Remove deprecated Repository#getRef

Use Repository#exactRef(String) or Repository#findRef(String) instead.

Change-Id: I5c547a26604b4cd792111c699df5f3c9d955d3f2
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated BitmapBuilder#add 16/119116/2
Matthias Sohn [Fri, 9 Mar 2018 23:33:26 +0000 (00:33 +0100)]
Remove deprecated BitmapBuilder#add

Use BitmapBuilder#or or BitmapBuilder#addObject instead.

Change-Id: I4bd71a842cf9f6ba2f9a17015e8a36ac380bfd3a
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated LockFile(File, FS) constructor 14/119114/2
Matthias Sohn [Fri, 9 Mar 2018 23:02:35 +0000 (00:02 +0100)]
Remove deprecated LockFile(File, FS) constructor

Use org.eclipse.jgit.internal.storage.file.LockFile#LockFile(File)
instead.

Change-Id: I107d9879c02a2006799a238ccaddf87c89f33f77
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated IgnoreNode#isIgnored method 13/119113/2
Matthias Sohn [Fri, 9 Mar 2018 23:00:42 +0000 (00:00 +0100)]
Remove deprecated IgnoreNode#isIgnored method

Parameter negateFirstMatch is not honored anymore

Change-Id: Idff1a92643c1431c7e34a7730f8414135e1ac196
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoFix misspelled class name: EmtpyCommitException -> EmptyCommitException 71/100671/4
David Pursehouse [Tue, 19 Dec 2017 02:13:48 +0000 (11:13 +0900)]
Fix misspelled class name: EmtpyCommitException -> EmptyCommitException

Change-Id: I55196020146f26951988988c14ac9a6f85061ae2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoRemove deprecated Statistics, UploadPackLogger, UploadPackLoggerChain 15/119115/2
Matthias Sohn [Fri, 9 Mar 2018 23:31:07 +0000 (00:31 +0100)]
Remove deprecated Statistics, UploadPackLogger, UploadPackLoggerChain

Use PackStatistics and PostUploadHook and PostUploadHookChain instead.
Also remove
- UploadPack#getPackStatistics replaced by #getStatistics
- UploadPack#getLogger and UploadPack#setLogger

Change-Id: I70881c539af3094d68d594f19983dea0973604e8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated StoredObjectRepresentationnotAvailableException ctor 12/119112/1
Matthias Sohn [Fri, 9 Mar 2018 22:57:36 +0000 (23:57 +0100)]
Remove deprecated StoredObjectRepresentationnotAvailableException ctor

Use #StoredObjectRepresentationNotAvailableException(ObjectToPack,
Throwable) instead.

Change-Id: I766e00bc7292c7bd025aa2d7c54f10d278c7fabd
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove deprecated ArchiveCommand#putEntry method 11/119111/1
Matthias Sohn [Fri, 9 Mar 2018 22:55:43 +0000 (23:55 +0100)]
Remove deprecated ArchiveCommand#putEntry method

Use #putEntry(Closeable, ObjectId, String, FileMode, ObjectLoader)}
instead.

Change-Id: I2c58c07da00c6033c583eb2dc6c3a0889661f5f5
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoPrepare 5.0.0-SNAPSHOT builds 45/119045/1
Matthias Sohn [Thu, 8 Mar 2018 22:09:18 +0000 (23:09 +0100)]
Prepare 5.0.0-SNAPSHOT builds

Change-Id: I2d2f50ed8a12f310e7cac68eed5536bd460c403f
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMerge branch 'stable-4.11' 44/119044/1
Matthias Sohn [Thu, 8 Mar 2018 22:08:28 +0000 (23:08 +0100)]
Merge branch 'stable-4.11'

* stable-4.11:
  Prepare 4.11.1-SNAPSHOT builds
  JGit v4.11.0.201803080745-r

Change-Id: I225b9a6a9be6bda1d6fc8f605917645ff1fec852

6 years agoPrepare 4.11.1-SNAPSHOT builds 35/119035/1
Matthias Sohn [Thu, 8 Mar 2018 20:10:08 +0000 (21:10 +0100)]
Prepare 4.11.1-SNAPSHOT builds

Change-Id: Id9aa6b7e8f56de5183b6cd57ef0e790ec9debd4d
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoJGit v4.11.0.201803080745-r 96/118996/1 v4.11.0.201803080745-r
Matthias Sohn [Thu, 8 Mar 2018 12:43:46 +0000 (13:43 +0100)]
JGit v4.11.0.201803080745-r

Change-Id: Ie24a33bc8a24c30db06fe7b175f405efb95776ec
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoRemove useless for(;;) loop 13/118713/2
Thomas Wolf [Mon, 5 Mar 2018 19:49:29 +0000 (20:49 +0100)]
Remove useless for(;;) loop

Change-Id: Ic9a7824cc178e92f44126acc8e77b0304b20ef4f
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoFix DiffFormatter for diffs against working tree with autocrlf=true 97/117697/3
Thomas Wolf [Mon, 19 Feb 2018 22:42:46 +0000 (23:42 +0100)]
Fix DiffFormatter for diffs against working tree with autocrlf=true

The WorkingTreeSource produced an ObjectLoader that returned
inconsistent sizes: the file size in getSize(), but then a
correctly filtered smaller stream in openStream(). This resulted
either in an IOE "short read of block" or in an EOFException
depending on the resulting filtered size.

Fix this by ensuring that getSize() does return the size of the
filtered stream.

Bug: 530106
Change-Id: I7c7c85036047dc10030ed29c1d5a6c7f34f2bdff
Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
6 years agoMerge branch 'stable-4.10' 34/118934/1
Matthias Sohn [Wed, 7 Mar 2018 21:37:27 +0000 (22:37 +0100)]
Merge branch 'stable-4.10'

* stable-4.10:
  Don't subclass ThreadLocal to avoid memory leak in NLS
  Set context classloader to null in WorkQueue

Change-Id: Idacf9a15a27f8e1d73357a80ed11a02237eea49e
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoLFS: Adjust some API to make integration into tools (EGit,...) easier 48/118648/4
Markus Duft [Mon, 5 Mar 2018 09:34:29 +0000 (10:34 +0100)]
LFS: Adjust some API to make integration into tools (EGit,...) easier

Make the install command accessible without requiring reflection.

Expose the isEnabled(Repository) API to be able to check if calling the
install command is required for a repository.

Change-Id: I17e6eaefb6afda17fea8162cbf0cb86a20506753
Signed-off-by: Markus Duft <markus.duft@ssi-schaefer.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoMergeHeadMsgTest: Open FileOutputStream in try-with-resource 55/118855/1
David Pursehouse [Wed, 7 Mar 2018 05:49:21 +0000 (14:49 +0900)]
MergeHeadMsgTest: Open FileOutputStream in try-with-resource

Change-Id: I8efa549b98bf661665dc29d48d0e5661b0e8530c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMergeCommand: Open RevWalk in try-with-resource 54/118854/1
David Pursehouse [Wed, 7 Mar 2018 05:46:08 +0000 (14:46 +0900)]
MergeCommand: Open RevWalk in try-with-resource

Change-Id: I45ce481cc198b8dc78e9c46b433504840597e982
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMeasurePackSizeTest: Open Transport in try-with-resource 53/118853/1
David Pursehouse [Wed, 7 Mar 2018 05:43:51 +0000 (14:43 +0900)]
MeasurePackSizeTest: Open Transport in try-with-resource

Change-Id: If9a39f8eabe1cd3474bdc025ac92218cd2dd1640
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLongObjectIdTest: Open OutputStreamWriter in try-with-resource 52/118852/1
David Pursehouse [Wed, 7 Mar 2018 05:42:47 +0000 (14:42 +0900)]
LongObjectIdTest: Open OutputStreamWriter in try-with-resource

Change-Id: Ic7c2109204f94c70b933191b46d4a8f2c16a1533
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoJschConfigSessionFactory: Open FileInputStream in try-with-resource 51/118851/1
David Pursehouse [Wed, 7 Mar 2018 05:39:39 +0000 (14:39 +0900)]
JschConfigSessionFactory: Open FileInputStream in try-with-resource

Change-Id: I0f8f4629c93ed747f2f604538fccc52da3974b2e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCommandCatalog: Use StandardCharsets.UTF_8 39/118839/2
David Pursehouse [Tue, 6 Mar 2018 23:48:12 +0000 (08:48 +0900)]
CommandCatalog: Use StandardCharsets.UTF_8

Change-Id: I7c3356335cfedd81f663fd528799fc57b95fcf0f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoJGitTestUtil: Open auto-closeable resources in try-with-resource 35/118835/2
David Pursehouse [Tue, 6 Mar 2018 23:30:52 +0000 (08:30 +0900)]
JGitTestUtil: Open auto-closeable resources in try-with-resource

Change-Id: Ibc8dd8509109708628e5189888fa528add486452
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoUse StandardCharsets.UTF_8 in tests 34/118834/2
David Pursehouse [Tue, 6 Mar 2018 23:29:51 +0000 (08:29 +0900)]
Use StandardCharsets.UTF_8 in tests

Replace hard-coded "UTF-8" string with the constant.

Change-Id: Ie812add2df28e984090563ec7c6e2c0366616424
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoInfoRefsServlet: Open OutputStreamWriter in try-with-resource 33/118833/1
David Pursehouse [Tue, 6 Mar 2018 23:27:06 +0000 (08:27 +0900)]
InfoRefsServlet: Open OutputStreamWriter in try-with-resource

Change-Id: Iaf93d5c020ee67e9effbe93334f1ad419ffaee1f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoIndexDiffWithSymlinkTest: Open InputStream in try-with-resource 32/118832/1
David Pursehouse [Tue, 6 Mar 2018 23:25:15 +0000 (08:25 +0900)]
IndexDiffWithSymlinkTest: Open InputStream in try-with-resource

Change-Id: I5f49f80debb2259f665748408cd3604f869fa3ef
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoHugeFileTest: Open RandomAccessFile in try-with-resource 31/118831/1
David Pursehouse [Tue, 6 Mar 2018 23:14:08 +0000 (08:14 +0900)]
HugeFileTest: Open RandomAccessFile in try-with-resource

Change-Id: Iecb9a7348b40c91fa45c051c2a9c4eb47e4bdeca
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoHookMessageTest: Open Transport in try-with-resource 63/118763/1
David Pursehouse [Tue, 6 Mar 2018 08:42:50 +0000 (17:42 +0900)]
HookMessageTest: Open Transport in try-with-resource

Change-Id: Ie58b01a8a78e4f42a3b913708a545687c5c9f96b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGitSmartHttpTools: Open OutputStream in try-with-resource 62/118762/1
David Pursehouse [Tue, 6 Mar 2018 08:41:12 +0000 (17:41 +0900)]
GitSmartHttpTools: Open OutputStream in try-with-resource

Change-Id: Ifb50b923f58f73d323cc1492950e58b6dc39f376
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGitServletResponseTests: Open Transport in try-with-resource 61/118761/1
David Pursehouse [Tue, 6 Mar 2018 08:40:23 +0000 (17:40 +0900)]
GitServletResponseTests: Open Transport in try-with-resource

Change-Id: Ib74752c9185e38d0bfe9b4cef93b2427bf3afbd0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGetTextTest: Open InputStream in try-with-resource 60/118760/1
David Pursehouse [Tue, 6 Mar 2018 08:37:22 +0000 (17:37 +0900)]
GetTextTest: Open InputStream in try-with-resource

Change-Id: I3b68686de2d852b1f0b19c267a4e527229b40316
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGC: Open auto-closeable resources in try-with-resource 57/118757/2
David Pursehouse [Tue, 6 Mar 2018 08:23:53 +0000 (17:23 +0900)]
GC: Open auto-closeable resources in try-with-resource

Change-Id: If437e14636de7c5014ee2aa419d6518acd857792
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileSnapshotTest: Open FileOutputStream in try-with-resource 56/118756/1
David Pursehouse [Tue, 6 Mar 2018 08:19:59 +0000 (17:19 +0900)]
FileSnapshotTest: Open FileOutputStream in try-with-resource

Change-Id: I187dd61e3e7d6f141722bf1af86a7fe04711057d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileSender: Open OutputStream in try-with-resource 55/118755/1
David Pursehouse [Tue, 6 Mar 2018 08:19:07 +0000 (17:19 +0900)]
FileSender: Open OutputStream in try-with-resource

Change-Id: I2278950998dffc2b5730a91a5bb3bcc38f4d446b
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileRepository: Open FileInputStream in try-with-resource 54/118754/1
David Pursehouse [Tue, 6 Mar 2018 08:18:23 +0000 (17:18 +0900)]
FileRepository: Open FileInputStream in try-with-resource

Change-Id: Ief8aa4834437d76f7e636598bf9861312475e64a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileLfsServlet: Open PrintWriter in try-with-resource 53/118753/1
David Pursehouse [Tue, 6 Mar 2018 08:15:04 +0000 (17:15 +0900)]
FileLfsServlet: Open PrintWriter in try-with-resource

Change-Id: I6fa225e541c6d5c3dbf3d852a502f4e9c4f7d77e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFetchProcess: Open OutputStreamWriter in try-with-resource 52/118752/1
David Pursehouse [Tue, 6 Mar 2018 08:14:19 +0000 (17:14 +0900)]
FetchProcess: Open OutputStreamWriter in try-with-resource

Change-Id: Ide7768882a95f9e9706e50ca0774edd428dd07c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFS: Open TemporaryBuffer in try-with-resource 50/118750/1
David Pursehouse [Tue, 6 Mar 2018 07:58:12 +0000 (16:58 +0900)]
FS: Open TemporaryBuffer in try-with-resource

Change-Id: I52e048e491e838b7f762a5b5f4d148e91049877c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoEditListTest: Open InputStream in try-with-resource 49/118749/2
David Pursehouse [Tue, 6 Mar 2018 07:52:28 +0000 (16:52 +0900)]
EditListTest: Open InputStream in try-with-resource

Change-Id: Ib5b86e332ec674dec5460a9629d94d9f94c31c24
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoEGitPatchHistoryTest: Open BufferedReader in try-with-resource 48/118748/2
David Pursehouse [Tue, 6 Mar 2018 07:49:23 +0000 (16:49 +0900)]
EGitPatchHistoryTest: Open BufferedReader in try-with-resource

Change-Id: I74aede463c7b0a478a1e0e8b680c206d3964061d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoT0003_BasicTest: Use CommitBuilder.setEncoding(Charset) 47/118747/3
David Pursehouse [Tue, 6 Mar 2018 04:42:45 +0000 (13:42 +0900)]
T0003_BasicTest: Use CommitBuilder.setEncoding(Charset)

Change-Id: I1c4cdd4b856d715a204030d2de25ef91977186c2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoWalkEncryptionTest: Use StandardCharsets.UTF_8 46/118746/3
David Pursehouse [Tue, 6 Mar 2018 04:39:37 +0000 (13:39 +0900)]
WalkEncryptionTest: Use StandardCharsets.UTF_8

Change-Id: I6eb8a33be62c452c264fb0560b988144d80a41f9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoGetTextTest: Use StandardCharsets constants instead of CharSet.forName 45/118745/3
David Pursehouse [Tue, 6 Mar 2018 04:37:09 +0000 (13:37 +0900)]
GetTextTest: Use StandardCharsets constants instead of CharSet.forName

Change-Id: I61d626495338a89c014187c38a1f6b49accf7af4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoEGitPatchHistoryTest: Set input stream encoding with constant 44/118744/3
David Pursehouse [Tue, 6 Mar 2018 04:34:31 +0000 (13:34 +0900)]
EGitPatchHistoryTest: Set input stream encoding with constant

Change-Id: Ieff9b1d07704e37c8d5616b220b015855a7cc624
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDirCacheIterator: Open InputStream in try-with-resource 43/118743/3
David Pursehouse [Tue, 6 Mar 2018 04:31:32 +0000 (13:31 +0900)]
DirCacheIterator: Open InputStream in try-with-resource

Change-Id: I05d2d1de9a3d39466a6880f6e8107da8681876b1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDumbClientSmartServerTest: Open auto-closeable resources in try-with-resource 41/118741/3
David Pursehouse [Tue, 6 Mar 2018 01:49:58 +0000 (10:49 +0900)]
DumbClientSmartServerTest: Open auto-closeable resources in try-with-resource

Change-Id: I599c6e274fe80af7bfd2205f56f469c22d1dd3e0
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDirCacheCheckoutTest: Open FileInputStream in try-with-resource 40/118740/3
David Pursehouse [Tue, 6 Mar 2018 01:44:23 +0000 (10:44 +0900)]
DirCacheCheckoutTest: Open FileInputStream in try-with-resource

Change-Id: I3ceef36803752a19a4d74910b4db26c01279fd99
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDiffFormatterReflowTest: Open InputStream in try-with-resource 38/118738/3
David Pursehouse [Tue, 6 Mar 2018 01:42:36 +0000 (10:42 +0900)]
DiffFormatterReflowTest: Open InputStream in try-with-resource

Change-Id: Id7f420a2eac57e59fa3feb04236df6f5f8d07f02
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge changes from topic 'try-with-resource'
David Pursehouse [Tue, 6 Mar 2018 07:55:50 +0000 (02:55 -0500)]
Merge changes from topic 'try-with-resource'

* changes:
  DiffCommand: Open DiffFormatter in try-with-resource
  DiffAlgorithms: Open Repository in try-with-resource
  DescribeCommandTest: Open FileWriter in try-with-resource
  CommitCommand: Open InputStream in try-with-resource
  DefaultNoteMerger: Open UnionInputStream in try-with-resource

6 years agoDiffCommand: Open DiffFormatter in try-with-resource 37/118737/1
David Pursehouse [Tue, 6 Mar 2018 01:40:35 +0000 (10:40 +0900)]
DiffCommand: Open DiffFormatter in try-with-resource

Change-Id: I22bd1062d64b01bb98cdaf612482538114624b7f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoMerge "Silence API error raised for new CONFIG_SECTION_LFS constant"
David Pursehouse [Tue, 6 Mar 2018 00:53:55 +0000 (19:53 -0500)]
Merge "Silence API error raised for new CONFIG_SECTION_LFS constant"

6 years agoDiffAlgorithms: Open Repository in try-with-resource 33/118733/1
David Pursehouse [Tue, 6 Mar 2018 00:52:12 +0000 (09:52 +0900)]
DiffAlgorithms: Open Repository in try-with-resource

Change-Id: I67cb486283213f8aa964333533c55966518baa36
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDescribeCommandTest: Open FileWriter in try-with-resource 32/118732/1
David Pursehouse [Tue, 6 Mar 2018 00:49:16 +0000 (09:49 +0900)]
DescribeCommandTest: Open FileWriter in try-with-resource

Change-Id: Ida79bdae652faa88fbdb1b81e7e10b5019ff2c16
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCommitCommand: Open InputStream in try-with-resource 31/118731/1
David Pursehouse [Tue, 6 Mar 2018 00:48:19 +0000 (09:48 +0900)]
CommitCommand: Open InputStream in try-with-resource

Change-Id: I800a2afae17f84636cae593be7f07628fb8476c1
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDefaultNoteMerger: Open UnionInputStream in try-with-resource 30/118730/1
David Pursehouse [Tue, 6 Mar 2018 00:47:11 +0000 (09:47 +0900)]
DefaultNoteMerger: Open UnionInputStream in try-with-resource

Change-Id: I035aa89cdbf235992f41e752f49d735be4e5df0a
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoSilence API error raised for new CONFIG_SECTION_LFS constant 28/118728/1
Matthias Sohn [Mon, 5 Mar 2018 23:28:38 +0000 (00:28 +0100)]
Silence API error raised for new CONFIG_SECTION_LFS constant

Change-Id: I27e68d245c6b9c972ab9470c14d1f45d15d4c253
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
6 years agoCommitCommandTest: Open Repository in try-with-resource 27/118727/1
David Pursehouse [Mon, 5 Mar 2018 23:24:28 +0000 (08:24 +0900)]
CommitCommandTest: Open Repository in try-with-resource

Change-Id: Id9961a120ef9f949f04fc95455fae06ba95d8031
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCommitAndLogCommandTest: Open PrintWriter in try-with-resource 26/118726/1
David Pursehouse [Mon, 5 Mar 2018 23:22:48 +0000 (08:22 +0900)]
CommitAndLogCommandTest: Open PrintWriter in try-with-resource

Change-Id: I0c7f07e27d1881d8856dac008110fcaa85c98fbb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCloneCommandTest: Open Repository in try-with-resource 24/118724/1
David Pursehouse [Mon, 5 Mar 2018 23:20:45 +0000 (08:20 +0900)]
CloneCommandTest: Open Repository in try-with-resource

Change-Id: Id09d2126fb17d84581f8637e83a75dfa2e85ebe8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAutoCRLFInputStreamTest: Open auto-closeable resources in try-with-resource 68/118668/1
David Pursehouse [Mon, 5 Mar 2018 11:59:31 +0000 (20:59 +0900)]
AutoCRLFInputStreamTest: Open auto-closeable resources in try-with-resource

Change-Id: I427ab43a82861f7bc69b104e29dc4360048aec4e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCleanCommandTest: Open Repository in try-with-resource 67/118667/1
David Pursehouse [Mon, 5 Mar 2018 11:56:38 +0000 (20:56 +0900)]
CleanCommandTest: Open Repository in try-with-resource

Change-Id: If87cb729432ae711a2e7cfd08d288d7fec3f6de2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoCGitVsJGitRandomIgnorePatternTest: Open OutputStream in try-with-resource 66/118666/1
David Pursehouse [Mon, 5 Mar 2018 11:55:20 +0000 (20:55 +0900)]
CGitVsJGitRandomIgnorePatternTest: Open OutputStream in try-with-resource

Change-Id: I08e27d0ee48dabd94a4eeb608508f815a3000ec9
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoArchiveTest: Open auto-closeable resources in try-with-resource 64/118664/1
David Pursehouse [Mon, 5 Mar 2018 11:23:03 +0000 (20:23 +0900)]
ArchiveTest: Open auto-closeable resources in try-with-resource

Change-Id: If11017f21027b46c7a66e52e4bc0cc73f4fbdc07
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoArchiveCommand: Create archive output stream in try-with-resource 63/118663/1
David Pursehouse [Mon, 5 Mar 2018 11:19:25 +0000 (20:19 +0900)]
ArchiveCommand: Create archive output stream in try-with-resource

Change-Id: I72f4d303945275d400723aa17212b302e051dc15
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoApplyCommand: Open FileWriter in try-with-resource 62/118662/1
David Pursehouse [Mon, 5 Mar 2018 11:17:32 +0000 (20:17 +0900)]
ApplyCommand: Open FileWriter in try-with-resource

Change-Id: Ia473f74dc4608fc43edd57eda4f193c226e9004d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAmazonS3Client: Open Input/OutputStream in try-with-resource 59/118659/1
David Pursehouse [Mon, 5 Mar 2018 11:13:51 +0000 (20:13 +0900)]
AmazonS3Client: Open Input/OutputStream in try-with-resource

Change-Id: I32d4031159dff9005e839d0b53940431cba12beb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAmazonS3: Open InputStream/FileInputStream in try-with-resource 58/118658/1
David Pursehouse [Mon, 5 Mar 2018 11:11:59 +0000 (20:11 +0900)]
AmazonS3: Open InputStream/FileInputStream in try-with-resource

Change-Id: I71606e14d2b3cf085b8d1343c3858e7a729a173e
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAdvertiseErrorTest: Open Transport in try-with-resource 57/118657/1
David Pursehouse [Mon, 5 Mar 2018 11:10:12 +0000 (20:10 +0900)]
AdvertiseErrorTest: Open Transport in try-with-resource

Change-Id: I78adec7baf82d1a0eedc10e90b6d4f20008a046d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoAddCommandTest: Open PrintWriter in try-with-resource 56/118656/1
David Pursehouse [Mon, 5 Mar 2018 11:08:34 +0000 (20:08 +0900)]
AddCommandTest: Open PrintWriter in try-with-resource

Change-Id: I8ef769d12239447a20b670398293dbb64b90087d
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoFileBasedConfigTest: Open FileOutputStream in try-with-resource 34/118634/1
David Pursehouse [Mon, 5 Mar 2018 08:16:14 +0000 (17:16 +0900)]
FileBasedConfigTest: Open FileOutputStream in try-with-resource

Change-Id: Id4c49d4af30bcc5210d35630a8699574694060bb
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoWalkRemoteObjectDatabase: Open auto-closeable resources in try-with-resource 33/118633/1
David Pursehouse [Mon, 5 Mar 2018 08:15:04 +0000 (17:15 +0900)]
WalkRemoteObjectDatabase: Open auto-closeable resources in try-with-resource

Change-Id: Ie4f67ca8cab1031089782f202588b08cc157dd79
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTransportSftp: Open BufferedReader in try-with-resource 32/118632/1
David Pursehouse [Mon, 5 Mar 2018 08:13:20 +0000 (17:13 +0900)]
TransportSftp: Open BufferedReader in try-with-resource

Change-Id: Iab94cce80c11a5edeaf8f377001408cc53707c04
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoReflogReaderTest: Open FileOutputStream in try-with-resource 29/118629/1
David Pursehouse [Mon, 5 Mar 2018 07:35:09 +0000 (16:35 +0900)]
ReflogReaderTest: Open FileOutputStream in try-with-resource

Change-Id: I09af22292cc4b615b40a820dbc054282bb0c76b8
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoReflogReaderTest: Fix indentation 28/118628/1
David Pursehouse [Mon, 5 Mar 2018 07:33:42 +0000 (16:33 +0900)]
ReflogReaderTest: Fix indentation

Change-Id: I981dc14065ce435034d2072cff77e7efaa2c5573
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoReflogWriterTest: Open FileInputStream in try-with-resource 27/118627/1
David Pursehouse [Mon, 5 Mar 2018 07:30:36 +0000 (16:30 +0900)]
ReflogWriterTest: Open FileInputStream in try-with-resource

Change-Id: Ie111aead49d83d6acfbb89bb475ef6d3159b36c4
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoTransportHttp: Open auto-closeable resources in try-with-resource 26/118626/1
David Pursehouse [Mon, 5 Mar 2018 07:28:59 +0000 (16:28 +0900)]
TransportHttp: Open auto-closeable resources in try-with-resource

Change-Id: I2f713b79ff07f5759c189f384cd25adb9b9f5761
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoRebaseCommandTest: Open BufferedReader in try-with-resource 25/118625/1
David Pursehouse [Mon, 5 Mar 2018 07:23:50 +0000 (16:23 +0900)]
RebaseCommandTest: Open BufferedReader in try-with-resource

Change-Id: If8d77431edfdaec4a49a3c4ffe66a99e6d31c682
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoDirCacheCGitCompatabilityTest: Open BufferedReader in try-with-resource 24/118624/1
David Pursehouse [Mon, 5 Mar 2018 07:23:08 +0000 (16:23 +0900)]
DirCacheCGitCompatabilityTest: Open BufferedReader in try-with-resource

Change-Id: I0494eb475954927743174941a7d6c06d8431f57f
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
6 years agoLockFile: Open FileInputStream in try-with-resource 20/118620/1
David Pursehouse [Mon, 5 Mar 2018 02:03:21 +0000 (11:03 +0900)]
LockFile: Open FileInputStream in try-with-resource

Change-Id: I0784266814225428a6a0070d1653c465d268b342
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>