Merge changes I3aa95f4c,Ic6055faa,I80430ef0 into stable-3.13 * changes: Ignore false positive errorprone error UnusedMethod Cleanup the `EmptyCatch` error in tests Fix errorprone error UnnecessaryAssignment
diff --git a/java/com/google/gerrit/acceptance/ProjectResetter.java b/java/com/google/gerrit/acceptance/ProjectResetter.java index dcbcad4..0da9d30 100644 --- a/java/com/google/gerrit/acceptance/ProjectResetter.java +++ b/java/com/google/gerrit/acceptance/ProjectResetter.java
@@ -187,15 +187,15 @@ } } - @Inject private GitRepositoryManager repoManager; - @Inject private AllUsersName allUsersName; - @Inject @Nullable private AccountCreator accountCreator; - @Inject @Nullable private AccountCache accountCache; - @Inject @Nullable private GroupCache groupCache; - @Inject @Nullable private GroupIncludeCache groupIncludeCache; - @Inject @Nullable private GroupIndexer groupIndexer; - @Inject @Nullable private AccountIndexer accountIndexer; - @Inject @Nullable private ProjectCache projectCache; + private GitRepositoryManager repoManager; + private AllUsersName allUsersName; + @Nullable private AccountCreator accountCreator; + @Nullable private AccountCache accountCache; + @Nullable private GroupCache groupCache; + @Nullable private GroupIncludeCache groupIncludeCache; + @Nullable private GroupIndexer groupIndexer; + @Nullable private AccountIndexer accountIndexer; + @Nullable private ProjectCache projectCache; private final Multimap<Project.NameKey, String> refsPatternByProject; private final boolean deleteNewProjects;
diff --git a/javatests/com/google/gerrit/pgm/http/jetty/ProjectQoSFilterTest.java b/javatests/com/google/gerrit/pgm/http/jetty/ProjectQoSFilterTest.java index dcbcc76..23c9724 100644 --- a/javatests/com/google/gerrit/pgm/http/jetty/ProjectQoSFilterTest.java +++ b/javatests/com/google/gerrit/pgm/http/jetty/ProjectQoSFilterTest.java
@@ -15,6 +15,7 @@ package com.google.gerrit.pgm.http.jetty; import static com.google.common.truth.Truth.assertThat; +import static com.google.common.truth.Truth.assertWithMessage; import static org.mockito.Mockito.when; import com.google.gerrit.server.CurrentUser; @@ -65,6 +66,7 @@ try { listener.onComplete(asyncEvent); } catch (Exception e) { + assertWithMessage("should never happen").fail(); } } }.run(); @@ -89,6 +91,7 @@ try { listener.onTimeout(asyncEvent); } catch (Exception e) { + assertWithMessage("should never happen").fail(); } } }.run(); @@ -114,6 +117,7 @@ try { listener.onError(asyncEvent); } catch (Exception e) { + assertWithMessage("should never happen").fail(); } } }.run();
diff --git a/javatests/com/google/gerrit/server/update/context/RefUpdateContextTest.java b/javatests/com/google/gerrit/server/update/context/RefUpdateContextTest.java index 55ec604..f2b481f 100644 --- a/javatests/com/google/gerrit/server/update/context/RefUpdateContextTest.java +++ b/javatests/com/google/gerrit/server/update/context/RefUpdateContextTest.java
@@ -197,6 +197,7 @@ } private static interface Callback { + @SuppressWarnings("unused") void callback(); } }