]> source.dussan.org Git - jgit.git/commit
Move throw of PackInvalidException outside the catch 63/138163/5
authorLuca Milanesio <luca.milanesio@gmail.com>
Wed, 6 Mar 2019 11:30:07 +0000 (11:30 +0000)
committerMatthias Sohn <matthias.sohn@sap.com>
Tue, 12 Mar 2019 14:06:05 +0000 (15:06 +0100)
commitafef866a44cd65fef292c174cad445b3fb526400
tree2f8b048243feae66f1bb98b365127a7ae661ee51
parent2d116cd0ab5f68613da8be4907460089c6f1fa22
Move throw of PackInvalidException outside the catch

When a packfile is invalid, throw an exception explicitly
outside any catch scope, so that is not accidentally caught
by the generic catch-all cause, which would set the packfile
as valid again.

Flagging an invalid packfile as valid again would have
dangerous consequences such as the corruption of the in-memory
packlist.

Bug: 544199
Change-Id: If7a3188a68d7985776b509d636d5ddf432bec798
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java