Skip to content

Commit

Permalink
refactor: align with Quarkus code guidelines
Browse files Browse the repository at this point in the history
  • Loading branch information
lujun2 committed Aug 7, 2024
1 parent 594ccc8 commit c783cb5
Showing 1 changed file with 5 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -21,12 +20,10 @@
import org.jboss.jandex.Type;

public class ClassComparisonUtil {
static Set<DotName> ignores = new HashSet<>();

static {
ignores.add(DotName.createSimple("kotlin.jvm.internal.SourceDebugExtension"));
ignores.add(DotName.createSimple("kotlin.Metadata"));
}
private static final Set<DotName> 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()) {
Expand Down Expand Up @@ -170,7 +167,7 @@ private static void methodMap(Collection<AnnotationInstance> b, List<AnnotationI
}

private static boolean compareAnnotation(AnnotationInstance a, AnnotationInstance b) {
if (ignores.contains(a.name())) {
if (IGNORED_ANNOTATIONS.contains(a.name())) {
return true;
}
List<AnnotationValue> valuesA = a.values();
Expand Down

0 comments on commit c783cb5

Please sign in to comment.