Browse Source

Avoid an NPE after 7b01a53692

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
stable-3.3
Robin Rosenberg 11 years ago
parent
commit
abff667d40
  1. 3
      org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java

3
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) { public boolean isModified(DirCacheEntry entry, boolean forceContentCheck) {
try { try {
return isModified(entry, forceContentCheck, null); return isModified(entry, forceContentCheck,
repository.newObjectReader());
} catch (IOException e) { } catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e); throw new JGitInternalException(e.getMessage(), e);
} }

Loading…
Cancel
Save