void bindFeature()

in src/main/java/org/apache/sling/featureflags/impl/FeatureManager.java [165:177]


    void bindFeature(final Feature f, final Map<String, Object> props) {
        final String name = f.getName();
        if ( name != null && !name.isEmpty() ) {
            final FeatureDescription info = new FeatureDescription(f, props);
            this.idToNameMap.put(info.serviceId, name);
            final List<FeatureDescription> candidates = this.registeredFeatures.computeIfAbsent(name, key -> new ArrayList<>());
            synchronized (candidates) {
                candidates.add(info);
                Collections.sort(candidates);
                this.activeFeatures.put(name, candidates.get(0).feature);
            }
        }
    }