Skip to content

Commit cb15103

Browse files
graememorganError Prone Team
authored and
Error Prone Team
committed
Hardcode AlwaysThrows:MatchUuidParse.
PiperOrigin-RevId: 441882375
1 parent 2d20166 commit cb15103

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

core/src/main/java/com/google/errorprone/bugpatterns/AlwaysThrows.java

+1-7
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,9 @@ void validate(MethodInvocationTree tree, String argument) {
134134
}
135135

136136
private final ConstantExpressions constantExpressions;
137-
private final boolean matchUuidParse;
138137

139138
public AlwaysThrows(ErrorProneFlags flags) {
140139
this.constantExpressions = ConstantExpressions.fromFlags(flags);
141-
this.matchUuidParse = flags.getBoolean("AlwaysThrows:MatchUuidParse").orElse(true);
142140
}
143141

144142
@Override
@@ -170,11 +168,7 @@ public Description matchMethodInvocation(MethodInvocationTree tree, VisitorState
170168
}
171169
}
172170
Api api =
173-
stream(Api.values())
174-
.filter(a -> matchUuidParse || !a.equals(Api.UUID_PARSE))
175-
.filter(m -> m.matcher.matches(tree, state))
176-
.findAny()
177-
.orElse(null);
171+
stream(Api.values()).filter(m -> m.matcher.matches(tree, state)).findAny().orElse(null);
178172
if (api == null) {
179173
return NO_MATCH;
180174
}

0 commit comments

Comments
 (0)