Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WFCORE-6914 Remove usage of deprecated AbstractAddStepHandler constructors in tests #6093

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected void initializeExtraSubystemsAndModel(ExtensionRegistry extensionRegis

static void registerIOExtension(ExtensionRegistry extensionRegistry, ManagementResourceRegistration rootRegistration) {
ManagementResourceRegistration extReg = rootRegistration.registerSubModel(new SimpleResourceDefinition(PathElement.pathElement(EXTENSION, "org.wildfly.extension.io"),
NonResolvingResourceDescriptionResolver.INSTANCE, new ModelOnlyAddStepHandler(), ModelOnlyRemoveStepHandler.INSTANCE));
NonResolvingResourceDescriptionResolver.INSTANCE, ModelOnlyAddStepHandler.INSTANCE, ModelOnlyRemoveStepHandler.INSTANCE));
extReg.registerReadOnlyAttribute(new SimpleAttributeDefinitionBuilder("module", ModelType.STRING).build(), null);

Extension ioe = new IOExtension();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ protected static class TestResourceDefinition extends SimpleResourceDefinition {
protected TestResourceDefinition() {
super(SUBSYSTEM_PATH,
NonResolvingResourceDescriptionResolver.INSTANCE,
new ModelOnlyAddStepHandler(ATTRIBUTES),
ModelOnlyAddStepHandler.INSTANCE,
ModelOnlyRemoveStepHandler.INSTANCE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ private static final class TestResourceDefinition extends SimpleResourceDefiniti
private TestResourceDefinition() {
super(SUBSYSTEM_PATH,
NonResolvingResourceDescriptionResolver.INSTANCE,
new ModelOnlyAddStepHandler(TEST),
ModelOnlyAddStepHandler.INSTANCE,
ModelOnlyRemoveStepHandler.INSTANCE);
}

Expand All @@ -88,7 +88,7 @@ private static final class PropertyResourceDefinition extends SimpleResourceDefi
private PropertyResourceDefinition() {
super(PathElement.pathElement("property"),
NonResolvingResourceDescriptionResolver.INSTANCE,
new ModelOnlyAddStepHandler(VALUE),
ModelOnlyAddStepHandler.INSTANCE,
ModelOnlyRemoveStepHandler.INSTANCE);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,6 @@ private static ServiceName createServiceName(PathAddress address) {

private static class AddSubsystemHandler extends AbstractAddStepHandler {

AddSubsystemHandler() {
super(NAME, SOCKET_BINDING);
}

@Override
protected void performRuntime(OperationContext context, ModelNode operation, Resource resource)
throws OperationFailedException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,6 @@ public Collection<AttributeDefinition> getAttributes() {

public static final class AddHandler extends AbstractBoottimeAddStepHandler {

private AddHandler() {
super(ATTR);
}

@Override
protected void performBoottime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,6 @@ private static class AddSubsystemHandler extends AbstractAddStepHandler {

private static final AbstractAddStepHandler INSTANCE = new AddSubsystemHandler();

private AddSubsystemHandler() {
super(ATTRIBUTE);
}

@Override
protected void performRuntime(OperationContext context, ModelNode operation, Resource resource) throws OperationFailedException {
String osb = ATTRIBUTE.resolveModelAttribute(context, resource.getModel()).asString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private static class OperationTypesSubsystemResourceDefinition extends SimpleRes

private OperationTypesSubsystemResourceDefinition(ProcessType processType) {
super(new Parameters(PathElement.pathElement(SUBSYSTEM, SUBSYSTEM_NAME), NonResolvingResourceDescriptionResolver.INSTANCE)
.setAddHandler(new ModelOnlyAddStepHandler())
.setAddHandler(ModelOnlyAddStepHandler.INSTANCE)
.setRemoveHandler(new ModelOnlyRemoveStepHandler())
);
this.processType = processType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class CliExtCommandsSubsystemResourceDescription extends SimpleResourceDe
public static final PathElement PATH = PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, CliExtCommandsExtension.SUBSYSTEM_NAME);

public CliExtCommandsSubsystemResourceDescription() {
super(PATH, NonResolvingResourceDescriptionResolver.INSTANCE, new ModelOnlyAddStepHandler(), new AbstractRemoveStepHandler(){});
super(PATH, NonResolvingResourceDescriptionResolver.INSTANCE, ModelOnlyAddStepHandler.INSTANCE, new AbstractRemoveStepHandler(){});
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class DuplicateExtCommandSubsystemResourceDescription extends SimpleResou
public static final PathElement PATH = PathElement.pathElement(ModelDescriptionConstants.SUBSYSTEM, DuplicateExtCommandsExtension.SUBSYSTEM_NAME);

public DuplicateExtCommandSubsystemResourceDescription() {
super(PATH, NonResolvingResourceDescriptionResolver.INSTANCE, new ModelOnlyAddStepHandler(), new AbstractRemoveStepHandler() {
super(PATH, NonResolvingResourceDescriptionResolver.INSTANCE, ModelOnlyAddStepHandler.INSTANCE, new AbstractRemoveStepHandler() {
});
}

Expand Down