diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java index 95d8f17a7..b6e6a6c49 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/internal/storage/pack/PackWriter.java @@ -881,7 +881,7 @@ public class PackWriter implements AutoCloseable { */ private class DepthAwareVisitationPolicy implements ObjectWalk.VisitationPolicy { - private final Map lowestDepthVisited = new HashMap<>(); + private final Map lowestDepthVisited = new HashMap<>(); private final ObjectWalk walk; @@ -891,16 +891,16 @@ public class PackWriter implements AutoCloseable { @Override public boolean shouldVisit(RevObject o) { - Long lastDepth = lowestDepthVisited.get(o); + Integer lastDepth = lowestDepthVisited.get(o); if (lastDepth == null) { return true; } - return walk.getTreeDepth() < lastDepth; + return walk.getTreeDepth() < lastDepth.intValue(); } @Override public void visited(RevObject o) { - lowestDepthVisited.put(o, (long) walk.getTreeDepth()); + lowestDepthVisited.put(o, Integer.valueOf(walk.getTreeDepth())); } }