]> source.dussan.org Git - jgit.git/commit
[spotbugs] Fix potential NPE in WorkingTreeIterator#isModified 67/173367/4
authorMatthias Sohn <matthias.sohn@sap.com>
Thu, 3 Dec 2020 01:04:36 +0000 (02:04 +0100)
committerChristian Halstrick <christian.halstrick@sap.com>
Thu, 17 Dec 2020 17:42:00 +0000 (18:42 +0100)
commit90b046e7abcfe56f072d0cf8733ffb576d2997af
treed298756b411d39e6be6cc620d2df3e9dc22f6598
parentb1d8e8642f1143edc1141f1ce00e39a5b95f0b6d
[spotbugs] Fix potential NPE in WorkingTreeIterator#isModified

File#list can return null. Fix the potential NPE by using Files#list
which is also faster since it retrieves directory entries lazily while
File#list retrieves them eagerly.

Change-Id: Idf4bda398861c647587e357326b8bc8b587a2584
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java