From abff667d40dc520e70fe72702159b6f4985d014b Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Sat, 1 Mar 2014 12:44:34 +0100 Subject: [PATCH] Avoid an NPE after 7b01a5369210 While fixing an NPE, I introduced another one in a deprecated isModified method. It cannot avoid NPE's entirely, which is the reason the method is deprecated Change-Id: I5147c1c94621586dd84bd11e6090a954523b6c1c --- .../src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java index 2476e57ec..2dd784fe7 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java @@ -803,7 +803,8 @@ public abstract class WorkingTreeIterator extends AbstractTreeIterator { */ public boolean isModified(DirCacheEntry entry, boolean forceContentCheck) { try { - return isModified(entry, forceContentCheck, null); + return isModified(entry, forceContentCheck, + repository.newObjectReader()); } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); }