From 41d73907d9cf4b08c7483a6a07d5ad4efaf13f84 Mon Sep 17 00:00:00 2001 From: Sébastien Lesaint Date: Tue, 12 May 2020 13:52:39 +0200 Subject: SONAR-14951 Scanners require Java 11 --- .../src/main/java/org/sonar/server/rule/RegisterRules.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'server/sonar-webserver-core') diff --git a/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/RegisterRules.java b/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/RegisterRules.java index 86b5c3148c5..ce0fc6e48e0 100644 --- a/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/RegisterRules.java +++ b/server/sonar-webserver-core/src/main/java/org/sonar/server/rule/RegisterRules.java @@ -225,7 +225,7 @@ public class RegisterRules implements Startable { .filter(Objects::nonNull) .findFirst(); // may occur in case of plugin downgrade - if (!res.isPresent()) { + if (res.isEmpty()) { return Optional.ofNullable(dbRulesByDbDeprecatedKey.get(ruleKey)); } return res; -- cgit v1.2.3