if (processed.contains(registration)) {
LOGGER.config(LocalizationMessages.FEATURE_HAS_ALREADY_BEEN_PROCESSED(registration.getFeatureClass()));
continue;
}
Feature feature = registration.getFeature();
if (feature == null) {
feature = locator.create(registration.getFeatureClass());
} else {
// Disable injection of Feature instances on the client-side. Instances may be registered into multiple
// web-targets which means that injecting anything into these instances is not safe.
if (!RuntimeType.CLIENT.equals(type)) {
locator.inject(feature);
}
}
if (enabledFeatures.contains(feature)) {
LOGGER.config(LocalizationMessages.FEATURE_HAS_ALREADY_BEEN_PROCESSED(feature));
continue;
}
if (featureContextWrapper == null) {
// init lazily
featureContextWrapper = new FeatureContextWrapper(this, locator);
}
boolean success = feature.configure(featureContextWrapper);
if (success) {
processed.add(registration);
configureFeatures(locator, processed, resetRegistrations());