From 84c315b2a09b70904259628bfeb8dd002f954f77 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Sun, 2 Jun 2019 17:45:32 +0900 Subject: [PATCH] PackWriter: Make internal class static When Error Prone checks are enabled, the "ClassCanBeStatic" warning is triggered: Inner class is non-static but does not reference enclosing class see https://errorprone.info/bugpattern/ClassCanBeStatic Change-Id: I5a0e3bf0cf8c28176d9c98914c1c0dfab9c5736f Signed-off-by: David Pursehouse --- .../src/org/eclipse/jgit/internal/storage/pack/PackWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 2f7e1a656..714e8308f 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 @@ -878,7 +878,7 @@ public class PackWriter implements AutoCloseable { * already been visited at this depth or shallower, it is not necessary to * re-visit at this depth. */ - private class DepthAwareVisitationPolicy + private static class DepthAwareVisitationPolicy implements ObjectWalk.VisitationPolicy { private final Map lowestDepthVisited = new HashMap<>();