]> source.dussan.org Git - jgit.git/commit
Don't flag a packfile invalid if opening existing file failed 75/93775/4
authorLuca Milanesio <luca.milanesio@gmail.com>
Fri, 24 Mar 2017 00:18:12 +0000 (00:18 +0000)
committerMatthias Sohn <matthias.sohn@sap.com>
Sat, 25 Mar 2017 00:33:18 +0000 (01:33 +0100)
commit363a3657b133ea4668bd832410eff67cfdb7dfd1
treefd504cb21912c9e9f7924bd62bc8cc0ff646f8eb
parent11a12ceb0be1bf13e2e6d5de2368688a58f9400c
Don't flag a packfile invalid if opening existing file failed

A packfile random file open operation may fail with a
FileNotFoundException even if the file exists, possibly
for the temporary lack of resources.

Instead of managing the FileNotFoundException as any generic
IOException it is best to rethrow the exception but prevent
the packfile for being flagged as invalid until it is actually
opened and read successfully or unsuccessfully.

Bug: 514170
Change-Id: Ie37edba2df77052bceafc0b314fd1d487544bf35
Signed-off-by: Luca Milanesio <luca.milanesio@gmail.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/PackFile.java