]> source.dussan.org Git - jgit.git/commit
FileSnapshot: don't try to read file attributes twice 88/174188/1
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 3 Jan 2021 14:33:36 +0000 (15:33 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Sun, 3 Jan 2021 14:33:36 +0000 (15:33 +0100)
commit877ce01d29ceaea7acbafd71812afc311550668b
treedb20ee37277412431cd0abb0cb89aa43e661e855
parent0f442d70836ee292ed916605448f806cc7d1fe78
FileSnapshot: don't try to read file attributes twice

If file doesn't exist set state to MISSING_FILE immediately. Doing that
by calling File#lastModified and File#length effectively does the same
since they set the value to 0 if the file doesn't exist.

Log an error if a different exception than NoSuchFileException is
caught.

Change-Id: I0d4396b9f80446692a088d17522d64f735ce6708
org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/file/FileSnapshot.java