From 314228f3803b84c72328daf097477a98340bc0c9 Mon Sep 17 00:00:00 2001 From: markbrady Date: Thu, 13 Aug 2026 01:10:27 -0700 Subject: [PATCH] [IfChainToSwitch] Lower the minimum if-chain length from `5` to `4` PiperOrigin-RevId: 963920009 --- .../java/com/google/errorprone/bugpatterns/IfChainToSwitch.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/IfChainToSwitch.java b/core/src/main/java/com/google/errorprone/bugpatterns/IfChainToSwitch.java index 85a483c3e9a..d3a088d78b8 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/IfChainToSwitch.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/IfChainToSwitch.java @@ -128,7 +128,7 @@ public final class IfChainToSwitch extends BugChecker implements IfTreeMatcher { enableMain = flags.getBoolean("IfChainToSwitch:EnableMain").orElse(true); enableSafe = flags.getBoolean("IfChainToSwitch:EnableSafe").orElse(false); maxChainLength = flags.getInteger("IfChainToSwitch:MaxChainLength").orElse(50); - minChainLength = flags.getInteger("IfChainToSwitch:MinChainLength").orElse(5); + minChainLength = flags.getInteger("IfChainToSwitch:MinChainLength").orElse(4); this.constantExpressions = constantExpressions; }