From c783cb56d3473a6fa07423f25ae5b2de79b20606 Mon Sep 17 00:00:00 2001 From: "Lu, Jun" Date: Wed, 7 Aug 2024 23:34:04 +0800 Subject: [PATCH] refactor: align with Quarkus code guidelines --- .../quarkus/deployment/dev/ClassComparisonUtil.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/dev/ClassComparisonUtil.java b/core/deployment/src/main/java/io/quarkus/deployment/dev/ClassComparisonUtil.java index 670043b5a97245..534eec7cc85c27 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/dev/ClassComparisonUtil.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/dev/ClassComparisonUtil.java @@ -3,7 +3,6 @@ import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; -import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Objects; @@ -21,12 +20,10 @@ import org.jboss.jandex.Type; public class ClassComparisonUtil { - static Set ignores = new HashSet<>(); - - static { - ignores.add(DotName.createSimple("kotlin.jvm.internal.SourceDebugExtension")); - ignores.add(DotName.createSimple("kotlin.Metadata")); - } + private static final Set IGNORED_ANNOTATIONS = Set.of( + DotName.createSimple("kotlin.jvm.internal.SourceDebugExtension"), + DotName.createSimple("kotlin.Metadata") + ); static boolean isSameStructure(ClassInfo clazz, ClassInfo old) { if (clazz.flags() != old.flags()) { @@ -170,7 +167,7 @@ private static void methodMap(Collection b, List valuesA = a.values();