Browse Source

Fix null ref exception in DirCacheCheckout

Added missing null check for getDirCacheEntry(). This method may
return null for example if the curernt entry is a subtree.
stable-0.10
Lluis Sanchez 14 years ago
parent
commit
3b4dcb3c02
  1. 5
      org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java

5
org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java vendored

@ -274,8 +274,9 @@ public class DirCacheCheckout {
WorkingTreeIterator f) {
if (m != null) {
if (i == null || f == null || !m.idEqual(i)
|| f.isModified(i.getDirCacheEntry(), true,
config_filemode(), repo.getFS())) {
|| (i.getDirCacheEntry() != null && f.isModified(i
.getDirCacheEntry(), true, config_filemode(), repo
.getFS()))) {
update(m.getEntryPathString(), m.getEntryObjectId(),
m.getEntryFileMode());
} else

Loading…
Cancel
Save