extscript-core-root/extscript-weld/src/main/java/org/apache/myfaces/extension/scripting/weld/api/CdiContainerLoader.java [39:64]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static CdiContainer getCdiContainer()
    {
        CdiContainer testContainer;

        //doesn't support the implementation loader (there is no dependency to owb-impl
        ServiceLoader<CdiContainer> cdiContainerLoader = ServiceLoader.load(CdiContainer.class);
        Iterator<CdiContainer> cdiIt = cdiContainerLoader.iterator();
        if (cdiIt.hasNext())
        {
            testContainer = cdiIt.next();
        }
        else
        {
            throw new IllegalStateException("Could not find an implementation of " + CdiContainer.class.getName() +
                " available in the classpath!");
        }

        if (cdiIt.hasNext())
        {
            String foundContainers = getContainerDetails();
            throw new IllegalStateException("Too many implementations of " + CdiContainer.class.getName() +
                " found in the classpath! Details: " + foundContainers);
        }

        return testContainer;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



extscript-core-root/extscript-cdi/src/main/java/org/apache/myfaces/extensions/scripting/cdi/api/CdiContainerLoader.java [39:64]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    public static CdiContainer getCdiContainer()
    {
        CdiContainer testContainer;

        //doesn't support the implementation loader (there is no dependency to owb-impl
        ServiceLoader<CdiContainer> cdiContainerLoader = ServiceLoader.load(CdiContainer.class);
        Iterator<CdiContainer> cdiIt = cdiContainerLoader.iterator();
        if (cdiIt.hasNext())
        {
            testContainer = cdiIt.next();
        }
        else
        {
            throw new IllegalStateException("Could not find an implementation of " + CdiContainer.class.getName() +
                " available in the classpath!");
        }

        if (cdiIt.hasNext())
        {
            String foundContainers = getContainerDetails();
            throw new IllegalStateException("Too many implementations of " + CdiContainer.class.getName() +
                " found in the classpath! Details: " + foundContainers);
        }

        return testContainer;
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



