diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java index 365a82098..d85ea8cc5 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/filter/PathFilter.java @@ -44,7 +44,6 @@ package org.eclipse.jgit.treewalk.filter; -import org.eclipse.jgit.errors.StopWalkException; import org.eclipse.jgit.internal.JGitText; import org.eclipse.jgit.lib.Constants; import org.eclipse.jgit.treewalk.TreeWalk; @@ -98,10 +97,7 @@ public class PathFilter extends TreeFilter { @Override public boolean include(final TreeWalk walker) { - int cmp = walker.isPathPrefix(pathRaw, pathRaw.length); - if (cmp > 0) - throw StopWalkException.INSTANCE; - return cmp == 0; + return walker.isPathPrefix(pathRaw, pathRaw.length) == 0; } @Override