Skip to content

Commit 54ed3d8

Browse files
graememorganError Prone Team
authored andcommitted
Finalise removing GuardedByFlags.
This was a bodge because we couldn't just inject flags deep down in the call hierarchy. Of course, we have DI now. Startblock: cl-status javac.javabuilder contains feb0752 in prod PiperOrigin-RevId: 828934377
1 parent bc26f7b commit 54ed3d8

File tree

3 files changed

+0
-58
lines changed

3 files changed

+0
-58
lines changed

core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/GuardedByBinder.java

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,6 @@
4646
* @author [email protected] (Liam Miller-Cushon)
4747
*/
4848
public final class GuardedByBinder {
49-
50-
/** Stub method to allow removing the GuardedByFlags argument. */
51-
public static Optional<GuardedByExpression> bindExpression(
52-
JCTree.JCExpression exp, VisitorState visitorState, GuardedByFlags flags) {
53-
return bindExpression(exp, visitorState);
54-
}
55-
5649
/**
5750
* Creates a {@link GuardedByExpression} from a bound AST node, or returns {@code
5851
* Optional.empty()} if the AST node doesn't correspond to a 'simple' lock expression.
@@ -73,12 +66,6 @@ public static Optional<GuardedByExpression> bindExpression(
7366
}
7467
}
7568

76-
/** Stub method to allow removing the GuardedByFlags argument. */
77-
public static Optional<GuardedByExpression> bindString(
78-
String string, GuardedBySymbolResolver resolver, GuardedByFlags flags) {
79-
return bindString(string, resolver);
80-
}
81-
8269
/** Creates a {@link GuardedByExpression} from a string, given the resolution context. */
8370
public static Optional<GuardedByExpression> bindString(
8471
String string, GuardedBySymbolResolver resolver) {

core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/GuardedByFlags.java

Lines changed: 0 additions & 36 deletions
This file was deleted.

core/src/main/java/com/google/errorprone/bugpatterns/threadsafety/HeldLockAnalyzer.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -405,15 +405,6 @@ public static final class ExpectedLockCalculator {
405405

406406
private static final GuardedByExpression.Factory F = new GuardedByExpression.Factory();
407407

408-
/** Stub method to allow removing the GuardedByFlags argument. */
409-
public static Optional<GuardedByExpression> from(
410-
JCTree.JCExpression guardedMemberExpression,
411-
GuardedByExpression guard,
412-
VisitorState state,
413-
GuardedByFlags flags) {
414-
return from(guardedMemberExpression, guard, state);
415-
}
416-
417408
/**
418409
* Determine the lock expression that needs to be held when accessing a specific guarded member.
419410
*

0 commit comments

Comments
 (0)