From 60b815b0a8ce2e788ca4d2ffb35ae5eb860f3b94 Mon Sep 17 00:00:00 2001 From: Michael Dombrowski Date: Mon, 18 Sep 2023 08:18:24 -0400 Subject: [PATCH] chore: keep java 8 compatibility --- .../src/main/java/io/moquette/broker/subscriptions/CTrie.java | 4 +--- pom.xml | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/broker/src/main/java/io/moquette/broker/subscriptions/CTrie.java b/broker/src/main/java/io/moquette/broker/subscriptions/CTrie.java index c8669da1f..70ba7d302 100644 --- a/broker/src/main/java/io/moquette/broker/subscriptions/CTrie.java +++ b/broker/src/main/java/io/moquette/broker/subscriptions/CTrie.java @@ -2,10 +2,8 @@ import java.util.ArrayList; import java.util.Collections; -import java.util.HashSet; import java.util.List; import java.util.Optional; -import java.util.Set; public class CTrie { @@ -35,7 +33,7 @@ Optional lookup(Topic topic) { Token token = topic.headToken(); while (!topic.isEmpty()) { Optional child = inode.mainNode().childOf(token); - if (child.isEmpty()) { + if (!child.isPresent()) { break; } topic = topic.exceptHeadToken(); diff --git a/pom.xml b/pom.xml index 1556eb0e2..a40363840 100644 --- a/pom.xml +++ b/pom.xml @@ -8,8 +8,8 @@ 1.8 5.7.0 1.7.36 - 11 - 11 + 8 + 8 io.moquette