Skip to content

Commit

Permalink
Suppress unused method errors flagged by error prone
Browse files Browse the repository at this point in the history
The most recent Bazel version is flagging assisted inject methods as
unused.

Details: google/error-prone#3174
Release-Notes: skip
Change-Id: Ibcdb2e509c8a48a9dd0824eddaf09f519d1959c1
  • Loading branch information
davido authored and David Ostrovsky committed May 9, 2022
1 parent f8ec5da commit 5ea0b4a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ MultiProgressMonitor create(
* @param out stream for writing progress messages.
* @param taskName name of the overall task.
*/
@SuppressWarnings("UnusedMethod")
@AssistedInject
private MultiProgressMonitor(
CancellationMetrics cancellationMetrics,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ private static Key key(HumanComment c) {
private List<HumanComment> put = new ArrayList<>();
private Map<Key, DeleteReason> delete = new HashMap<>();

@SuppressWarnings("UnusedMethod")
@AssistedInject
private ChangeDraftUpdate(
@GerritPersonIdent PersonIdent serverIdent,
Expand Down
1 change: 1 addition & 0 deletions java/com/google/gerrit/server/notedb/ChangeUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ ChangeUpdate create(
private DeleteChangeMessageRewriter deleteChangeMessageRewriter;
private List<SubmitRequirementResult> submitRequirementResults;

@SuppressWarnings("UnusedMethod")
@AssistedInject
private ChangeUpdate(
@GerritPersonIdent PersonIdent serverIdent,
Expand Down
2 changes: 2 additions & 0 deletions java/com/google/gerrit/server/notedb/RobotCommentUpdate.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ RobotCommentUpdate create(

private List<RobotComment> put = new ArrayList<>();

@SuppressWarnings("UnusedMethod")
@AssistedInject
private RobotCommentUpdate(
@GerritPersonIdent PersonIdent serverIdent,
Expand All @@ -81,6 +82,7 @@ private RobotCommentUpdate(
super(noteUtil, serverIdent, notes, null, accountId, realAccountId, authorIdent, when);
}

@SuppressWarnings("UnusedMethod")
@AssistedInject
private RobotCommentUpdate(
@GerritPersonIdent PersonIdent serverIdent,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ private static class UserTermExpected extends Exception {
private final PrologOptions opts;
private Term submitRule;

@SuppressWarnings("UnusedMethod")
@AssistedInject
private PrologRuleEvaluator(
AccountCache accountCache,
Expand Down

0 comments on commit 5ea0b4a

Please sign in to comment.