David Pursehouse
217760fee5
IndexModificationTimesTest: Open Git instances in try-with-resource
...
Change-Id: If52c071b71f5df822b1ac276a6f665515f6c9d00
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
de73fbf597
InterIndexDiffFilterTest: Open TreeWalk in try-with-resource
...
Change-Id: Ie0046771b1ab1c9784d9a3bb597a9d76c6c3017d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
6d33322df4
LockFileTest: Open Git instance in try-with-resource
...
Change-Id: Ie2b0e55e606f50c46e21227f23de74dbea8388e5
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
Matthias Sohn
29159f1171
JGit v4.1.2.201602141800-r
...
Change-Id: If0721109f389835a3a00b1a97559fd8f8c156556
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
9 years ago
David Pursehouse
50e21322de
NoteMapTest: Open TreeWalk instances in try-with-resource
...
Change-Id: I70da0140fe087e7e69c28e9ddd125495d916ec1b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
35ba741cd4
ObjectDirectoryTest: Fix warnings about variable hiding
...
The variable and parameter named 'db' were hiding class members
with the same name.
Change-Id: I27017afdc5f49c38c6f5be494e7a21239ea601a7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
101ac16e8d
PackWriterTest: Open RevWalk in try-with-resource
...
Change-Id: Ic8ed941d096718e81c7ffeb166bcf7faaa2ff57d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
53b6bb9cca
PatchIdDiffFormatterTest: Open Git and PatchIdDiffFormatter in try-with-resource
...
Change-Id: I39e898e52c3d9dffaba9dabf11c085503fbc1acf
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
f7a3643fb8
PathSuffixFilterTest: Open TreeWalk in try-with-resource
...
Change-Id: If0ee71f09a5464e27f0496dac364f8f9bb015eb6
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
a3923f6b95
PostOrderTreeWalkTest: Open TreeWalk in try-with-resource
...
Also remove unnecessary nesting in test methods.
Change-Id: Id59f8403c0a7b38ebb6b3a24814257cd59ea575d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
ad9b326e3f
PullCommandWithRebaseTest: Open RevWalk in try-with-resource
...
Change-Id: I16f4d219e8b103d30149b2a94d3484424f3de84b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
f3c250bd08
PushCommandTest: Open Git instances in try-with-resource
...
Change-Id: I3a8e28a4097e868a34ee1b23256c7f28d570cd75
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
83f1f8fc7c
RacyGitTests: Open NameConflictTreeWalk in try-with-resource
...
Change-Id: Ic17b05fd7d056761b352168de97efb607a289276
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
3adea9ac7f
RecursiveMergerTest: Open TreeWalk and BufferedReader in try-with-resource
...
Change-Id: I381d535eb4ed7535ba8541c5320f81ce11d5b173
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
964da41d52
ReflogConfigTest: refactor commit method to avoid variable hiding
...
The author and committer parameters were hiding class members of
the same name.
Since the passed in PersonIdent instances were being created from
the class members anyway, remove the parameters and instead create
the PersonIdent instances inline in the method.
Change-Id: I66b057df388835d57f332fdcbadb8a9f4e1094a4
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
615280ba07
RefDirectoryTest: Fix warning about member variable hiding
...
The parameter name 'totalWork' was hiding a class member variable
of the same name.
Change-Id: I646525e82900e23ffabfc756bcf5052ef873656a
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
952f381981
ReflogResolveTest: Open Git instances in try-with-resource
...
Change-Id: I11ee38bfcf4951bf05a1632df08b1d074d38338b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
5ca9aaa172
RepoCommandTest: Open Git instances in try-with-resource
...
Change-Id: I171e84eeb7862e74761ba6c961f14c86beaba9e7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
143ba06cd6
RepositoryResolveTest: Open Git in try-with-resource
...
Change-Id: Ibb612f3d8fd0f9913291430474311d9da62f4e6f
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
a176c6055a
ResetCommandTest: Use Git member in testHardResetAfterSquashMerge
...
Use the class member instance of the Git rather than creating
a new one in the test. This makes it consistent with the other
tests in the module.
Change-Id: Ibe822ded76a80b94922e92bbc6f5d90bcc52f8a3
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
8074f50b58
ResolveMergerTest: Open Git in try-with-resource
...
Change-Id: Ic378ec25c4a3ea4354ee643029f87e46b6449ed4
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
3c4e7c08a7
RevCommitListTest: Open Git and RevWalk in try-with-resource
...
Change-Id: I4ba273a364a12f82a3b3b06ba050bc633411daf6
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
5bfdc3341c
RevCommitParseTest: Open ObjectInserter.Formatter in try-with-resource
...
Change-Id: Iaa87c51bc19b4fa832393c11db20b69865d30d48
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
f0ef7748b4
RevObjectTest: Open RevWalk in try-with-resource
...
Change-Id: I19bcbb2f12036c5043436f3d544ccefbb7385b8d
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
44f64de091
RevTagParseTest: Open ObjectInserter.Formatter in try-with-resource
...
Change-Id: I2341977223be1dc5252492f4775626122f56496b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
895510fc48
RevertCommandTest: Open Git in try-with-resource
...
Change-Id: I659adbb0a6f741c4c6f615c8a24b4603c3f6681e
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
d882bf8c4d
SquashMessageFormatterTest: Open git in try-with-resource
...
Change-Id: Ife94d1f0279ed3671a9bca79fb26c0403549fa17
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
6aa619ec5c
StatusCommandTest: Open Git in try-with-resource
...
Change-Id: Id13ad9fa3157d0479da12fb8184437be3ca8c948
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
96ff311049
SubmoduleAddTest: Open Git in try-with-resource
...
Change-Id: I1276ce206e891729adfa681e00952ca0ba6ffc53
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
3742946a03
SymlinksTest: Open git and TreeWalk in try-with-resource
...
Change-Id: I0fd1933e843375029fa795447b688f23a893f84b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
d0d3773763
T0003_BasicTest: Open autocloseable types in try-with-resource
...
FileRepository and ObjectInserter.Formatter are autocloseable, so
use try-with-resource for these.
Remove suppression of unused variable warning that is no longer
necessary.
Change-Id: I270829f0a4030083c9599eb5785b0145dc590ed8
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
a82f5c7425
TreeFilterTest: Open TreeWalk in try-with-resource
...
Change-Id: If100a66e544926bcffe9a9a0b31bfd4806902864
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
62637584d8
TreeWalkJava7Test: Open TreeWalk in try-with-resource
...
Change-Id: I99a483c482b5395653b0d57b368ec1b5fdba450c
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
Hugo Arès
df904a4227
Fix diff for added and removed submodule
...
Since If13f7b406, submodule difference are shown as a hunk. The issue
was that added and removed submodule were considered as Edit.REPLACE
instead of Edit.INSERT and Edit.DELETE in the DiffFormatter result.
Change-Id: I4330c2aa3f10e29d7d6b0b2e5286e59293a06239
Signed-off-by: Hugo Arès <hugo.ares@ericsson.com>
9 years ago
David Pursehouse
06bf69d8ca
DirCacheCheckoutTest: Open Git and TreeWalk in try-with-resource
...
Change-Id: Icc8eda841e6a437e1acf3438525014e7c46d5eb2
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
d4ddb6fc2b
ApplyCommandTest: Open Git in try-with-resource
...
Also, add missing braces around if-block.
Change-Id: I9390b2c7d5c4507923b6f06271a070dc868534e5
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
5c84145fd0
PackFileTest: Open ObjectInserter.Formatter in try-with-resource
...
Change-Id: I9c56b5efdb9c13b929073a786092a707fca21281
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
bebd30f364
FileTreeIteratorTest: Open Git and RevWalk in try-with-resource
...
Change-Id: I6e68c4b028e0aa01964eace10307372060371df7
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
92a8e0184c
RebaseCommandTest: Open RevWalk in try-with-resource
...
Change-Id: If7b7a90171d1349d634a84f135471ebac29e3210
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
7ccda5f63e
PullCommandTest: Open RevWalk in try-with-resource
...
Change-Id: I676cd7ef4bb29f980a313acd77506dd070e6c98f
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
e5cf4a89fd
BlameGeneratorTest: Create Git instances in try-with-resource
...
Change-Id: I2dc4191603fbd6c3214763b869882c51b0e53284
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
88d63ce174
Remove unnecessary suppression of deprecation warnings in tests
...
Change-Id: I722f8c2e80129e0129349b55a53b29626e2af21c
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
4c128b0764
DiffEntryTest: Open Git and TreeWalk in try-with-resource
...
Change-Id: If4a49268b9b7ec3a44ed1508ed78db365b0c9e5b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
6b66240311
DiffCommandTest: Open Git and RevWalk in try-with-resource
...
Change-Id: I966f7e5053651661abc7de63c968e1f5bf2de464
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
ff90192a05
CommitCommandTest: Open Git and TreeWalk in try-with-resource
...
Change-Id: I65a6fd7028e209c300d992c2756100c09ab4dc19
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
4319086892
ConcurrentRepackTest: Don't use deprecated WindowCache.reconfigure
...
Replace with calls to WindowCacheConfig.install() as mentioned in
WindowCache.reconfigure's deprecation notice.
Change-Id: Ifdb33501a2209239029c815b1e4e844ea5b56075
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
8bbd9077e4
ConcurrentRepackTest: Open RevWalk in try-with-resource
...
Change-Id: Idc7b7bbdc1df05372b873cbe4c495474f3ffd64b
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
625a21f5f4
CommitOnlyTest: Open RevWalk in try-with-resource
...
Change-Id: Ia3db8696f66f8d294e1d443fb54e716d26d517b1
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
84ac3cc379
UnpackedObjectTest: Create ObjectInserter.Formatter in try-with-resource
...
The ObjectInserter.Formatter instance is only used to call idFor.
Factor out a utility method to do that.
Change-Id: I4ef823110c2152ac7905681df3217eb8001f5bd9
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago
David Pursehouse
3ee9e2ac07
FileRepositoryBuilderTest: Use try-with-resource for auto-closeables
...
Use try-with-resource to create instances of FileRepository and
FileWriter.
"resource" and "unused" warnings no longer occur, so remove the
suppression annotations.
Change-Id: I3ad58d4cc2d4c019cd8edda7cb401e9d9f3fb790
Signed-off-by: David Pursehouse <david.pursehouse@sonymobile.com>
9 years ago