From 73dfcc737fb28dbc9de64ac84b5f398151bd4b8d Mon Sep 17 00:00:00 2001 From: Brian Stansberry Date: Mon, 17 Jan 2022 13:57:56 -0600 Subject: [PATCH] [WFCORE-5775] Remove the org.wildfly.management.expression-resolver-extension-registry capability --- .../controller/AbstractControllerService.java | 22 ------------------- .../extension/ResolverExtensionRegistry.java | 2 -- 2 files changed, 24 deletions(-) diff --git a/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java b/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java index 14cce32b886..3f7c05afa50 100644 --- a/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java +++ b/controller/src/main/java/org/jboss/as/controller/AbstractControllerService.java @@ -47,9 +47,7 @@ import org.jboss.as.controller.client.OperationResponse; import org.jboss.as.controller.client.impl.AdditionalBootCliScriptInvoker; import org.jboss.as.controller.descriptions.DescriptionProvider; -import org.jboss.as.controller.extension.ExpressionResolverExtension; import org.jboss.as.controller.extension.MutableRootResourceRegistrationProvider; -import org.jboss.as.controller.extension.ResolverExtensionRegistry; import org.jboss.as.controller.logging.ControllerLogger; import org.jboss.as.controller.notification.NotificationHandlerRegistry; import org.jboss.as.controller.notification.NotificationSupport; @@ -162,13 +160,6 @@ private static int getBootStackSize() { RuntimeCapability.Builder.of("org.wildfly.management.process-state-notifier", ProcessStateNotifier.class) .build(); - /** - * Name of a capability that extensions that provide {@link ExpressionResolverExtension} implementations - * can use to register their extensions with the core {@link ExpressionResolver}. - */ - private static final String EXPRESSION_RESOLVER_EXTENSION_REGISTRY_CAPABILITY_NAME = - "org.wildfly.management.expression-resolver-extension-registry"; - private static final OperationDefinition INIT_CONTROLLER_OP = new SimpleOperationDefinitionBuilder("boottime-controller-initializer-step", null) .setPrivateEntry() .build(); @@ -190,7 +181,6 @@ private static int getBootStackSize() { private final BootErrorCollector bootErrorCollector; private final CapabilityRegistry capabilityRegistry; private final ConfigurationExtension configExtension; - private final RuntimeCapability extensionRegistryCapability; private volatile ModelControllerClientFactory clientFactory; /** @@ -300,13 +290,6 @@ private AbstractControllerService(final Supplier executorServic this.processState = processState; this.prepareStep = prepareStep; this.expressionResolver = expressionResolver; - if (expressionResolver instanceof ResolverExtensionRegistry) { - this.extensionRegistryCapability = - RuntimeCapability.Builder.of(EXPRESSION_RESOLVER_EXTENSION_REGISTRY_CAPABILITY_NAME, - (ResolverExtensionRegistry) expressionResolver).build(); - } else { - this.extensionRegistryCapability = null; - } this.auditLogger = auditLogger; this.authorizer = authorizer; this.securityIdentitySupplier = securityIdentitySupplier; @@ -364,11 +347,6 @@ bootErrorCollector, createExtraValidationStepHandler(), capabilityRegistry, getP notifyRegistrySB.setInstance(new SimpleService(notifyRegistrySB.provides(notifyRegistrySN), controller.getNotificationRegistry())); notifyRegistrySB.install(); } - if (extensionRegistryCapability != null) { - capabilityRegistry.registerCapability( - new RuntimeCapabilityRegistration(extensionRegistryCapability, CapabilityScope.GLOBAL, new RegistrationPoint(PathAddress.EMPTY_ADDRESS, null))); - rootResourceRegistration.registerCapability(extensionRegistryCapability); - } capabilityRegistry.publish(); // These are visible immediately; no waiting for finishBoot // We publish even if we didn't register anything in case parent services did diff --git a/controller/src/main/java/org/jboss/as/controller/extension/ResolverExtensionRegistry.java b/controller/src/main/java/org/jboss/as/controller/extension/ResolverExtensionRegistry.java index c5eee142e68..deb9cad8ae7 100644 --- a/controller/src/main/java/org/jboss/as/controller/extension/ResolverExtensionRegistry.java +++ b/controller/src/main/java/org/jboss/as/controller/extension/ResolverExtensionRegistry.java @@ -9,8 +9,6 @@ /** * Registry for {@link ExpressionResolverExtension extensions} to a server or host controller's {@link ExpressionResolver}. - * The registry will be available using the {@code org.wildfly.management.expression-resolver-extension-registry} - * capability. */ public interface ResolverExtensionRegistry {