From baf3417bff7f8af61ead1bd165ac04ecfa2678d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Fournier?= Date: Fri, 2 Jun 2023 15:01:52 +0200 Subject: [PATCH] Fix compilation issue with regex (illegal escape character) --- .../lang/apex/rule/bestpractices/UnusedLocalVariableRule.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/UnusedLocalVariableRule.java b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/UnusedLocalVariableRule.java index c125368d28..cdb59a31e0 100644 --- a/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/UnusedLocalVariableRule.java +++ b/pmd-apex/src/main/java/net/sourceforge/pmd/lang/apex/rule/bestpractices/UnusedLocalVariableRule.java @@ -34,7 +34,7 @@ public class UnusedLocalVariableRule extends AbstractApexRule { "Database.countQuery".toLowerCase(Locale.ROOT) )); - private static final Pattern BINDING_VARIABLE = Pattern.compile("(?i):(?:\s|)([_a-z0-9]+)"); + private static final Pattern BINDING_VARIABLE = Pattern.compile("(?i):\\s*+([_a-z0-9]+)"); @Override protected @NonNull RuleTargetSelector buildTargetSelector() {