Skip to content

Commit

Permalink
FORCE on check
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 645227800
  • Loading branch information
markhbrady authored and Error Prone Team committed Aug 5, 2024
1 parent 86df5cf commit 39fdedd
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import com.google.errorprone.util.ASTHelpers;
import com.google.errorprone.util.ErrorProneComment;
import com.google.errorprone.util.Reachability;
import com.google.errorprone.util.SourceVersion;
import com.sun.source.tree.AssignmentTree;
import com.sun.source.tree.BlockTree;
import com.sun.source.tree.BreakTree;
Expand Down Expand Up @@ -135,7 +134,10 @@ static enum CaseQualifications {
@Inject
StatementSwitchToExpressionSwitch(ErrorProneFlags flags) {
this.enableDirectConversion =
flags.getBoolean("StatementSwitchToExpressionSwitch:EnableDirectConversion").orElse(false);
true
|| flags
.getBoolean("StatementSwitchToExpressionSwitch:EnableDirectConversion")
.orElse(false);
this.enableReturnSwitchConversion =
flags
.getBoolean("StatementSwitchToExpressionSwitch:EnableReturnSwitchConversion")
Expand All @@ -148,9 +150,9 @@ static enum CaseQualifications {

@Override
public Description matchSwitch(SwitchTree switchTree, VisitorState state) {
if (!SourceVersion.supportsSwitchExpressions(state.context)) {
return NO_MATCH;
}
// if (!SourceVersion.supportsSwitchExpressions(state.context)) {
// return NO_MATCH;
// }

AnalysisResult analysisResult = analyzeSwitchTree(switchTree, state);

Expand Down

0 comments on commit 39fdedd

Please sign in to comment.