]> source.dussan.org Git - jgit.git/commit
ObjectDirectory: Fail immediately when atomic move is not supported 20/164120/1
authorDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 4 Jun 2020 04:51:17 +0000 (13:51 +0900)
committerDavid Pursehouse <david.pursehouse@gmail.com>
Thu, 4 Jun 2020 05:06:21 +0000 (14:06 +0900)
commitc2ab332e81caec773055da24c4a9d0ef58f04142
treef14ffaed1f3296cd18a62b508e68e7abd4b92806
parente624e1310836747c15afeb411d9fd7eaee41ddae
ObjectDirectory: Fail immediately when atomic move is not supported

If atomic move is not supported, AtomicMoveNotSupportedException will
be thrown on the first attempt to move the temp file. There is no
point attempting the move operation a second time because it will only
fail for the same reason.

Add an immediate return of FAILURE on the first occasion. Remove the
unnecessary handling of the exception in the second block.

Change-Id: I4658a8b37cfec2d7ef0217c8346e512968d0964c
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/ObjectDirectory.java