From a7e6cf2bfc5f4d013b50b775c92f2d751b130cc4 Mon Sep 17 00:00:00 2001 From: Sanne Grinovero Date: Tue, 23 Nov 2021 17:55:59 +0000 Subject: [PATCH] ArC: simplify Resolvable constructor --- .../src/main/java/io/quarkus/arc/impl/ArcContainerImpl.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcContainerImpl.java b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcContainerImpl.java index a0b76c39f4397..6e108f4761182 100644 --- a/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcContainerImpl.java +++ b/independent-projects/arc/runtime/src/main/java/io/quarkus/arc/impl/ArcContainerImpl.java @@ -844,7 +844,6 @@ private void requireRunning() { private static final class Resolvable { - private static final Set BUILT_IN_TYPES = Set.of(Event.class, Instance.class); private static final Annotation[] ANY_QUALIFIER = { Any.Literal.INSTANCE }; final Type requiredType; @@ -852,10 +851,10 @@ private static final class Resolvable { final Annotation[] qualifiers; Resolvable(Type requiredType, Annotation[] qualifiers) { - // if the type is any of BUILT_IN_TYPES, the resolution simplifies type to raw type and ignores qualifiers + // if the type is Event or Instance (the built-in types), the resolution simplifies type to raw type and ignores qualifiers // this is so that every injection point matches the bean we provide for that type Type rawType = Reflections.getRawType(requiredType); - if (BUILT_IN_TYPES.contains(rawType)) { + if (Event.class.equals(rawType) || Instance.class.equals(rawType)) { this.requiredType = rawType; this.qualifiers = ANY_QUALIFIER; } else {