Object apply()

in src/main/java/org/apache/sling/scripting/core/impl/BindingsValuesProvidersByContextImpl.java [95:110]


        Object apply(ServiceReference<?> ref) {
            final Object service = bundleContext.getService(ref);
            if (service != null) {
                for (String context : getContexts(ref)) {
                    ContextBvpCollector c = customizers.get(context);
                    if (c == null) {
                        synchronized (BindingsValuesProvidersByContextImpl.this) {
                            c = new ContextBvpCollector(bundleContext);
                            customizers.put(context, c);
                        }
                    }
                    applyInContext(c);
                }
            }
            return service;
        }