Skip to content

Commit

Permalink
Merge pull request #6054 from bstansberry/WFCORE-6872
Browse files Browse the repository at this point in the history
[WFCORE-6872] Mark deprecated key server kernel code forRemoval=true …
  • Loading branch information
yersan authored Jul 1, 2024
2 parents c9aa242 + af9de1e commit e23ed34
Show file tree
Hide file tree
Showing 32 changed files with 49 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public interface ModelControllerClientConfiguration extends Closeable {
* @return the SSLContext.
* @deprecated Use {@link ModelControllerClientConfiguration#getSslContextFactory()}
*/
@Deprecated
@Deprecated(forRemoval = true)
SSLContext getSSLContext();


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ private static int getBootStackSize() {
* @param authorizer handles authorization
* @param capabilityRegistry the capability registry
*/
@Deprecated
@Deprecated(forRemoval = true)
protected AbstractControllerService(final ProcessType processType, final RunningModeControl runningModeControl,
final ConfigurationPersister configurationPersister,
final ControlledProcessState processState, final ResourceDefinition rootResourceDefinition,
Expand All @@ -217,7 +217,7 @@ protected AbstractControllerService(final ProcessType processType, final Running
* @param capabilityRegistry the capability registry
* @deprecated For use by legacy versions
*/
@Deprecated
@Deprecated(forRemoval = true)
protected AbstractControllerService(final Supplier<ExecutorService> executorService,
final Supplier<ControllerInstabilityListener> instabilityListener,
final ProcessType processType, final RunningModeControl runningModeControl,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public void setDomainRollout(boolean domainRollout) {
* @return The current {@link AccessAuditContext}
* @deprecated Internal use, will be changed without warning at any time.
*/
@Deprecated
@Deprecated(forRemoval = false)
public static AccessAuditContext currentAccessAuditContext() {
if (WildFlySecurityManager.isChecking()) {
System.getSecurityManager().checkPermission(ControllerPermission.GET_CURRENT_ACCESS_AUDIT_CONTEXT);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public interface CapabilityReferenceRecorder extends Feature {
* @return base name of dependant, usually name of the attribute that provides reference to capability
* @deprecated No longer required and may throw {@link java.lang.UnsupportedOperationException}
*/
@Deprecated
@Deprecated(forRemoval = true)
String getBaseDependentName();

/**
Expand All @@ -59,7 +59,7 @@ public interface CapabilityReferenceRecorder extends Feature {
* dependent attribute to construct name of capability
* @deprecated No longer required and may throw {@link java.lang.UnsupportedOperationException}
*/
@Deprecated
@Deprecated(forRemoval = true)
default boolean isDynamicDependent() {
throw new UnsupportedOperationException();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*/
public class CompositeOperationHandler implements OperationStepHandler {

@Deprecated
/** Key that domain mode handlers can use to communicate that domain-specific execution has occurred. */
public static final OperationContext.AttachmentKey<Boolean> DOMAIN_EXECUTION_KEY = OperationContext.AttachmentKey.create(Boolean.class);

public static final CompositeOperationHandler INSTANCE = new CompositeOperationHandler();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
public class ControlledProcessStateService implements ProcessStateNotifier {

/** @deprecated use the 'org.wildfly.management.process-state-notifier' capability to obtain a {@link ProcessStateNotifier}*/
@Deprecated
@Deprecated(forRemoval = true)
public static final ServiceName SERVICE_NAME = ServiceName.JBOSS.append("controlled-process-state");
/** Only for use within the WildFly Core kernel; may change or be removed at any time */
public static final ServiceName INTERNAL_SERVICE_NAME = AbstractControllerService.PROCESS_STATE_NOTIFIER_CAPABILITY.getCapabilityServiceName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @deprecated internal usage only
*/
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated
@Deprecated(forRemoval = false)
public final class CurrentOperationIdHolder {

private static final ThreadLocal<Integer> currentOperationID = new ThreadLocal<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public AttributeDefinition getValueAttributeDefinition() {
* @throws XMLStreamException if {@code value} is not valid
* @deprecated use {@link #getParser()}
*/
@Deprecated
@Deprecated(forRemoval = true)
public void parseAndAddParameterElement(final String value, final ModelNode operation, final XMLStreamReader reader) throws XMLStreamException {
ModelNode paramVal = AttributeParser.SIMPLE.parse(this, value, reader);
operation.get(getName()).add(paramVal);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ public abstract class PersistentResourceXMLParser implements XMLStreamConstants,
public abstract PersistentResourceXMLDescription getParserDescription();

/** @deprecated Experimental; for internal use only. May be removed at any time. */
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated(forRemoval = false)
public final void cacheXMLDescription() {
this.cachedDescription.updateAndGet(this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ protected void registerRemoveOperation(final ManagementResourceRegistration regi
* @param flags with flags
* @deprecated Redundant with {@link #registerAddOperation(ManagementResourceRegistration, OperationStepHandler, org.jboss.as.controller.registry.OperationEntry.Flag...)
*/
@Deprecated
@Deprecated(forRemoval = true)
protected void registerAddOperation(final ManagementResourceRegistration registration, final AbstractAddStepHandler handler, OperationEntry.Flag... flags) {
this.registerAddOperation(registration, (OperationStepHandler) handler, flags);
}
Expand All @@ -262,7 +262,7 @@ protected void registerAddOperation(final ManagementResourceRegistration registr
* @param flags with flags
* @deprecated Redundant with {@link #registerRemoveOperation(ManagementResourceRegistration, OperationStepHandler, org.jboss.as.controller.registry.OperationEntry.Flag...)
*/
@Deprecated
@Deprecated(forRemoval = true)
protected void registerRemoveOperation(final ManagementResourceRegistration registration, final AbstractRemoveStepHandler handler, OperationEntry.Flag... flags) {
registerRemoveOperation(registration, (OperationStepHandler) handler, flags);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class NonResolvingResourceDescriptionResolver extends StandardResourceDes
* No-arg constructor.
* @deprecated use {@link #INSTANCE} instead
*/
@Deprecated
@Deprecated(forRemoval = true)
public NonResolvingResourceDescriptionResolver() {
super("", "", NonResolvingResourceDescriptionResolver.class.getClassLoader());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
*
* @deprecated for internal use only; may be removed at any time
*/
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated(forRemoval = false)
public interface ExtensionContextSupplement {
/** @throws java.lang.UnsupportedOperationException if called from an invalid caller */
AuditLogger getAuditLogger(boolean inheritConfiguration, boolean manualCommit);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ private ExtensionRegistry(Builder builder) {
* @param hostControllerInfoAccessor the host controller
* @deprecated Use {@link #builder(ProcessType)} instead.
*/
@Deprecated
@Deprecated(forRemoval = true)
public ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl, ManagedAuditLogger auditLogger, JmxAuthorizer authorizer,
Supplier<SecurityIdentity> securityIdentitySupplier, RuntimeHostControllerInfoAccessor hostControllerInfoAccessor) {
this(builder(processType).withRunningModeControl(runningModeControl)
Expand All @@ -273,7 +273,7 @@ public ExtensionRegistry(ProcessType processType, RunningModeControl runningMode
* @param runningModeControl the process' running mode
* @deprecated Here for core-model-test and subsystem-test backwards compatibility
*/
@Deprecated
@Deprecated(forRemoval = true)
public ExtensionRegistry(ProcessType processType, RunningModeControl runningModeControl) {
this(builder(processType).withRunningModeControl(runningModeControl));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public static RemoteProxyController create(final TransactionalProtocolClient cli
*
* @deprecated only present for test case use
*/
@Deprecated
@Deprecated(forRemoval = false)
public static RemoteProxyController create(final ManagementChannelHandler channelAssociation, final PathAddress pathAddress, final ProxyOperationAddressTranslator addressTranslator) {
final TransactionalProtocolClient client = TransactionalProtocolHandlers.createClient(channelAssociation);
// the remote proxy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
*/
public abstract class PathManagerService implements PathManager, Service<PathManager> {

/** @deprecated ServiceName should be obtained from capability */
@Deprecated
/** @deprecated ServiceName should be obtained from capability 'org.wildfly.management.path-manager'.*/
@Deprecated(forRemoval = true)
public static final ServiceName SERVICE_NAME = ServiceName.JBOSS.append("path", "manager");

//@GuardedBy(pathEntries)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public static Builder of(final PathManager pathManager) {
*
* @return the operation handler builder
*/
@Deprecated
@Deprecated(forRemoval = false)
public static Builder of(final String operationName, final PathManager pathManager) {
Assert.checkNotNullParam("operationName", operationName);
Assert.checkNotNullParam("pathManager", pathManager);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*
* @author Emanuel Muckenhuber
*/
@Deprecated //todo could probably be removed as it is not used anywhere
public class AliasOperationTransformer implements CombinedTransformer {

public interface AddressTransformer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@ public Resource getTransformedRoot() {
return root;
}

@Deprecated
static ResourceTransformationContext createAliasContext(final PathAddress address, final ResourceTransformationContext context) {
if (context instanceof ResourceTransformationContextImpl) {
final ResourceTransformationContextImpl impl = (ResourceTransformationContextImpl) context;
Expand All @@ -333,7 +332,6 @@ static ResourceTransformationContext createAliasContext(final PathAddress addres
}
}

@Deprecated
static TransformationContext wrapForOperation(TransformationContext context, ModelNode operation) {
if(context instanceof ResourceTransformationContextImpl) {
final ResourceTransformationContextImpl impl = (ResourceTransformationContextImpl) context;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ String errorOrWarnOnResourceTransformation() throws OperationFailedException {
return null;
}

@Deprecated //todo replace with context.getLogger()....
//todo replace with context.getLogger()....
String getOperationRejectDescription() {
if (op == null) {
throw new IllegalStateException();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
*
* @author Brian Stansberry
*/
@Deprecated
@Deprecated(forRemoval = false)
public class ExternalManagementRequestExecutor implements Service<ExecutorService> {

/**
* The service name for this service.
*
* @deprecated may be removed at any time
*/
@Deprecated
@Deprecated(forRemoval = false)
public static final ServiceName SERVICE_NAME = Services.JBOSS_AS.append("external-mgmt-executor");

// The Executor settings.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ public ProcessType getProcessType() {
*
* @deprecated for internal us only, may change or be removed at any time without notice
*/
@Deprecated
@Deprecated(forRemoval = false)
public static final String JBOSS_PERSIST_SERVER_CONFIG = "jboss.server.persist.config";

public static final String DOMAIN_BASE_DIR = "jboss.domain.base.dir";
Expand Down
8 changes: 4 additions & 4 deletions server/src/main/java/org/jboss/as/server/Services.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ private Services() {
*
* @deprecated use capability @code{org.wildfly.management.executor}
*/
@Deprecated
@Deprecated(forRemoval = true)
public static final ServiceName JBOSS_SERVER_EXECUTOR = JBOSS_AS.append("server-executor");

/**
Expand All @@ -51,13 +51,13 @@ private Services() {
*
* @deprecated use capability @code{org.wildfly.management.external-module}
*/
@Deprecated
@Deprecated(forRemoval = true)
public static final ServiceName JBOSS_EXTERNAL_MODULE_SERVICE = JBOSS_AS.append("external-module-service");

public static final ServiceName JBOSS_PRODUCT_CONFIG_SERVICE = JBOSS_AS.append("product-config");

/** @deprecated use capability @code{org.wildfly.server.suspend-controller} */
@Deprecated
@Deprecated(forRemoval = true)
public static final ServiceName JBOSS_SUSPEND_CONTROLLER = ServerService.SUSPEND_CONTROLLER_CAPABILITY.getCapabilityServiceName();

/**
Expand All @@ -69,7 +69,7 @@ private Services() {
* @return service builder instance
* @deprecated Use {@link #requireServerExecutor(ServiceBuilder)} instead. This method will be removed in the future.
*/
@Deprecated
@Deprecated(forRemoval = true)
public static <T> ServiceBuilder<T> addServerExecutorDependency(ServiceBuilder<T> builder, Injector<ExecutorService> injector) {
return builder.addDependency(ServerService.MANAGEMENT_EXECUTOR, ExecutorService.class, injector);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public class ServerRootResourceDefinition extends SimpleResourceDefinition {
* The 'timeout' parameter for server lifecycle ops
* @deprecated Since Version 9.0.0, use suspend-timeout instead.
*/
@Deprecated
@Deprecated(forRemoval = false) // false because this @Deprected is just to help us remember to remove this some day. We don't want IDE errors about it.
public static final SimpleAttributeDefinition TIMEOUT = new SimpleAttributeDefinitionBuilder(ModelDescriptionConstants.TIMEOUT, ModelType.INT)
.setDefaultValue(ModelNode.ZERO)
.setRequired(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ public class ContentCleanerService implements Service {
*
* @deprecated DON'T USE IT.
*/
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated(forRemoval = true)
private static final String UNSUPPORTED_PROPERTY = "org.wildfly.unsupported.content.repository.obsolescence";
/**
* The conten repository cleaner will test content for clean-up every 5 minutes.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @author Emanuel Muckenhuber
* @deprecated Use {@link org.jboss.as.server.deployment.DeploymentResourceSupport} from an {@link Attachments#DEPLOYMENT_RESOURCE_SUPPORT attachment} on the {@link org.jboss.as.server.deployment.DeploymentUnit}
*/
@Deprecated
@Deprecated(forRemoval = true)
public class DeploymentModelUtils {

public static final AttachmentKey<Resource> DEPLOYMENT_RESOURCE = DeploymentResourceSupport.DEPLOYMENT_RESOURCE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
*
* @deprecated Use {@link org.jboss.as.controller.client.helpers.standalone.ServerDeploymentManager.Factory}
*/
@Deprecated
@Deprecated(forRemoval = true)
public class ModelControllerServerDeploymentManager extends AbstractServerDeploymentManager {

private final ModelControllerClient client;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,11 @@

/**
* Performs transformation operations on deployment content.
*
* <p>
* This interface is experimental and may be removed or altered at any time.
*/
@Deprecated
@SuppressWarnings("DeprecatedIsStillUsed")
@Deprecated(forRemoval = false)
public interface DeploymentTransformer {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@
*/
public class NetworkInterfaceService implements Service<NetworkInterfaceBinding> {

private static ServerLogger log = ServerLogger.NETWORK_LOGGER;
private static final ServerLogger log = ServerLogger.NETWORK_LOGGER;

/**
* The service base name.
*
* @deprecated use the org.wildfly.network.interface capability
*/
@Deprecated
@Deprecated(forRemoval = true)
public static final ServiceName JBOSS_NETWORK_INTERFACE = ServiceName.JBOSS.append("network");

private static final String IPV4_ANYLOCAL = "0.0.0.0";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static BoundedQueueThreadPoolResourceDefinition create(PathElement path,
/**
* @deprecated This class is not designed for subclassing and having this constructor be accessible is a specific workaround for WFCORE-1623 that may be reverted at any time
*/
@Deprecated
@Deprecated(forRemoval = false)
protected BoundedQueueThreadPoolResourceDefinition(boolean blocking, boolean registerRuntimeOnly,
String type, ServiceName serviceNameBase, String resolverPrefix, OperationStepHandler addHandler,
OperationStepHandler removeHandler) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
*
* @author Brian Stansberry (c) 2011 Red Hat Inc.
*/
@Deprecated
@SuppressWarnings("deprecation")
@Deprecated(forRemoval = true)
@SuppressWarnings({"removal", "DeprecatedIsStillUsed"})
class ThreadSubsystemResourceDefinition extends PersistentResourceDefinition {
private final boolean registerRuntimeOnly;

ThreadSubsystemResourceDefinition(boolean runtimeOnly) {
//noinspection deprecation
super(ThreadsExtension.SUBSYSTEM_PATH,
new DeprecatedResourceDescriptionResolver(ThreadsExtension.SUBSYSTEM_NAME, ThreadsExtension.SUBSYSTEM_NAME, ThreadsExtension.RESOURCE_NAME,
ThreadsExtension.class.getClassLoader(), true, false), ThreadsSubsystemAdd.INSTANCE, ReloadRequiredRemoveStepHandler.INSTANCE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@
*
* @author <a href="mailto:david.lloyd@redhat.com">David M. Lloyd</a>
* @author <a href="kabir.khan@jboss.com">Kabir Khan</a>
*
* @deprecated the code module containing this extension only exists to support use of particular resource definition classes in other subsystems.
*/
@Deprecated(forRemoval = true)
public class ThreadsExtension extends AbstractLegacyExtension {

public static final String SUBSYSTEM_NAME = "threads";
Expand Down Expand Up @@ -52,7 +55,7 @@ protected Set<ManagementResourceRegistration> initializeLegacyModel(ExtensionCon
registration.registerXMLElementWriter(ThreadsParser2_0::new);

// Remoting threads description and operation handlers
@SuppressWarnings("deprecation")
@SuppressWarnings({"removal"})
final ManagementResourceRegistration subsystem = registration.registerSubsystemModel(new ThreadSubsystemResourceDefinition(registerRuntimeOnly));

return Collections.singleton(subsystem);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class UnboundedQueueThreadPoolWriteAttributeHandler extends ThreadsWriteA
private final ServiceName serviceNameBase;
private final RuntimeCapability capability;

@Deprecated
@Deprecated(forRemoval = true)
public UnboundedQueueThreadPoolWriteAttributeHandler(ServiceName serviceNameBase) {
this(null, serviceNameBase);
}
Expand Down

0 comments on commit e23ed34

Please sign in to comment.