[jboss-jira] [JBoss JIRA] (WFCORE-4462) Restart level calculation in SimpleResourceDefinition.Parameters is ineffective.

Brian Stansberry (Jira) issues at jboss.org
Tue May 7 15:33:00 EDT 2019


Brian Stansberry created WFCORE-4462:
----------------------------------------

             Summary: Restart level calculation in SimpleResourceDefinition.Parameters is ineffective.
                 Key: WFCORE-4462
                 URL: https://issues.jboss.org/browse/WFCORE-4462
             Project: WildFly Core
          Issue Type: Bug
          Components: Management
    Affects Versions: 9.0.0.Beta4, 8.0.0.Final
            Reporter: Brian Stansberry
            Assignee: Jeff Mesnil


Parameters attempts to set a restart level for add or remove based on the type of the handler for the op:

{code}
    public Parameters setAddHandler(OperationStepHandler addHandler) {
            this.addHandler = addHandler;
            if (this.addRestartLevel == null) {
                this.addRestartLevel = restartLevelForAdd(addHandler);
            }
            return this;
        }
{code}

The problem is restartLevelForAdd(addHandler) doesn't get called because this.addRestartLevel and this.removeRestartLevel are initialized to non-null values.

The effect of this is SimpleResourceDefinition impls that moved from passing multiple params to the constructor to instead passing a Parameters object have had the restart-level description of their add and remove ops changed.

This is tricky because fixing this means some things may get changed back.



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list