in src/main/java/org/apache/sling/featureflags/impl/FeatureManager.java [186:202]
void unbindFeature(final Feature f, final Map<String, Object> props) {
final FeatureDescription info = new FeatureDescription(f, props);
final String name = this.idToNameMap.remove(info.serviceId);
if ( name != null ) {
final List<FeatureDescription> candidates = this.registeredFeatures.get(name);
if (candidates != null) { // sanity check
synchronized ( candidates ) {
candidates.remove(info);
if ( candidates.isEmpty() ) {
this.activeFeatures.remove(name);
} else {
this.activeFeatures.put(name, candidates.get(0).feature);
}
}
}
}
}