Skip to content

Commit c85c547

Browse files
markhbradyError Prone Team
authored andcommitted
[IfChainToSwitch] test-only change: add explicit values for EnableSafe to tests, to replace implicit falses
PiperOrigin-RevId: 931326552
1 parent 554ac8f commit c85c547

2 files changed

Lines changed: 76 additions & 75 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public final class IfChainToSwitch extends BugChecker implements IfTreeMatcher {
125125

126126
@Inject
127127
IfChainToSwitch(ErrorProneFlags flags, ConstantExpressions constantExpressions) {
128-
enableMain = flags.getBoolean("IfChainToSwitch:EnableMain").orElse(false);
128+
enableMain = flags.getBoolean("IfChainToSwitch:EnableMain").orElse(true);
129129
enableSafe = flags.getBoolean("IfChainToSwitch:EnableSafe").orElse(false);
130130
maxChainLength = flags.getInteger("IfChainToSwitch:MaxChainLength").orElse(50);
131131
minChainLength = flags.getInteger("IfChainToSwitch:MinChainLength").orElse(5);

0 commit comments

Comments
 (0)