From d108b24480010fa5774b76b5581534a8dfa5833e Mon Sep 17 00:00:00 2001 From: Laird Nelson Date: Mon, 14 Aug 2023 17:11:30 -0700 Subject: [PATCH] Squashable commit; simplifies code Signed-off-by: Laird Nelson --- .../oci/sdk/cdi/OciExtension.java | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/integrations/oci/sdk/cdi/src/main/java/io/helidon/integrations/oci/sdk/cdi/OciExtension.java b/integrations/oci/sdk/cdi/src/main/java/io/helidon/integrations/oci/sdk/cdi/OciExtension.java index 7cf52e0d12e..7a4332bec2d 100644 --- a/integrations/oci/sdk/cdi/src/main/java/io/helidon/integrations/oci/sdk/cdi/OciExtension.java +++ b/integrations/oci/sdk/cdi/src/main/java/io/helidon/integrations/oci/sdk/cdi/OciExtension.java @@ -836,7 +836,7 @@ private static void installAdps(AfterBeanDiscovery event, BeanManager bm, Annota Set qualifiers = Set.of(qualifiersArray); // AbstractAuthenticationDetailsProvider - if (isUnsatisfied(bm, new TypeAndQualifiers(AbstractAuthenticationDetailsProvider.class, qualifiersArray))) { + if (isUnsatisfied(bm, AbstractAuthenticationDetailsProvider.class, qualifiersArray)) { Supplier s = ociAuthenticationProvider(); event.addBean() .types(AbstractAuthenticationDetailsProvider.class) @@ -847,8 +847,7 @@ private static void installAdps(AfterBeanDiscovery event, BeanManager bm, Annota } // BasicAuthenticationDetailsProvider - if (isUnsatisfied(bm, - new TypeAndQualifiers(BasicAuthenticationDetailsProvider.class, qualifiersArray))) { + if (isUnsatisfied(bm, BasicAuthenticationDetailsProvider.class, qualifiersArray)) { Supplier s = ociAuthenticationProvider(); event.addBean() .types(BasicAuthenticationDetailsProvider.class) @@ -859,16 +858,14 @@ private static void installAdps(AfterBeanDiscovery event, BeanManager bm, Annota } // InstancePrincipalsAuthenticationDetailsProvider - if (isUnsatisfied(bm, - new TypeAndQualifiers(InstancePrincipalsAuthenticationDetailsProviderBuilder.class, qualifiersArray))) { + if (isUnsatisfied(bm, InstancePrincipalsAuthenticationDetailsProviderBuilder.class, qualifiersArray)) { event.addBean() .types(InstancePrincipalsAuthenticationDetailsProviderBuilder.class) .qualifiers(qualifiers) .scope(Singleton.class) .produceWith(i -> fire(i, InstancePrincipalsAuthenticationDetailsProvider.builder(), qualifiersArray)); } - if (isUnsatisfied(bm, - new TypeAndQualifiers(InstancePrincipalsAuthenticationDetailsProvider.class, qualifiersArray))) { + if (isUnsatisfied(bm, InstancePrincipalsAuthenticationDetailsProvider.class, qualifiersArray)) { event.addBean() .types(InstancePrincipalsAuthenticationDetailsProvider.class) .qualifiers(qualifiers) @@ -881,16 +878,14 @@ private static void installAdps(AfterBeanDiscovery event, BeanManager bm, Annota } // ResourcePrincipalAuthenticationDetailsProvider - if (isUnsatisfied(bm, - new TypeAndQualifiers(ResourcePrincipalAuthenticationDetailsProviderBuilder.class, qualifiersArray))) { + if (isUnsatisfied(bm, ResourcePrincipalAuthenticationDetailsProviderBuilder.class, qualifiersArray)) { event.addBean() .types(ResourcePrincipalAuthenticationDetailsProviderBuilder.class) .qualifiers(qualifiers) .scope(Singleton.class) .produceWith(i -> fire(i, ResourcePrincipalAuthenticationDetailsProvider.builder(), qualifiersArray)); } - if (isUnsatisfied(bm, - new TypeAndQualifiers(ResourcePrincipalAuthenticationDetailsProvider.class, qualifiersArray))) { + if (isUnsatisfied(bm, ResourcePrincipalAuthenticationDetailsProvider.class, qualifiersArray)) { event.addBean() .types(ResourcePrincipalAuthenticationDetailsProvider.class) .qualifiers(qualifiers) @@ -903,14 +898,14 @@ private static void installAdps(AfterBeanDiscovery event, BeanManager bm, Annota } // SimpleAuthenticationDetailsProvider - if (isUnsatisfied(bm, new TypeAndQualifiers(SimpleAuthenticationDetailsProviderBuilder.class, qualifiersArray))) { + if (isUnsatisfied(bm, SimpleAuthenticationDetailsProviderBuilder.class, qualifiersArray)) { event.addBean() .types(SimpleAuthenticationDetailsProviderBuilder.class) .qualifiers(qualifiers) .scope(Singleton.class) .produceWith(i -> fire(i, SimpleAuthenticationDetailsProvider.builder(), qualifiersArray)); } - if (isUnsatisfied(bm, new TypeAndQualifiers(SimpleAuthenticationDetailsProvider.class, qualifiersArray))) { + if (isUnsatisfied(bm, SimpleAuthenticationDetailsProvider.class, qualifiersArray)) { event.addBean() .types(SimpleAuthenticationDetailsProvider.class) .qualifiers(qualifiers)