]> source.dussan.org Git - jgit.git/commitdiff
Avoid an NPE after 7b01a5369210 12/22712/1
authorRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 1 Mar 2014 11:44:34 +0000 (12:44 +0100)
committerRobin Rosenberg <robin.rosenberg@dewire.com>
Sat, 1 Mar 2014 12:02:06 +0000 (13:02 +0100)
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

org.eclipse.jgit/src/org/eclipse/jgit/treewalk/WorkingTreeIterator.java

index 2476e57ecf650a11da802fe55e65d4e441236ff1..2dd784fe7f82bc440921951b9e264b01d126b360 100644 (file)
@@ -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);
                }