package io.quarkus.arc;

import static io.quarkus.arc.CreationalContextImpl.unwrap;

import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
import javax.enterprise.inject.Intercepted;
import javax.enterprise.inject.spi.Bean;

/**
 * {@link Intercepted} {@link Bean} metadata provider.
 */
public class InterceptedBeanMetadataProvider implements InjectableReferenceProvider<Contextual<?>> {

    @Override
    public Contextual<?> get(CreationalContext<Contextual<?>> creationalContext) {
        CreationalContextImpl<?> parent = unwrap(creationalContext).getParent();
        if (parent != null) {
            if (parent != null) {
                // Intercepted bean creational context
                return parent.getContextual();
            }
        }
        return null;
    }

}

@@ -644,46 +644,8 @@
 ) %7B%0A
-            if (parent != null) %7B%0A    
     
@@ -691,20 +691,16 @@
 context%0A
-    
         
@@ -738,22 +738,8 @@
 ();%0A
-            %7D%0A
     

Fix double if in InterceptedBeanMetadataProvider.