[jboss-jira] [JBoss JIRA] (AS7-6018) NillableOrExpressionParameterValidator fails when undefining a nillable attribute

Stefan Guilhen (JIRA) jira-events at lists.jboss.org
Thu Nov 22 11:44:21 EST 2012


Stefan Guilhen created AS7-6018:
-----------------------------------

             Summary: NillableOrExpressionParameterValidator fails when undefining a nillable attribute
                 Key: AS7-6018
                 URL: https://issues.jboss.org/browse/AS7-6018
             Project: Application Server 7
          Issue Type: Bug
    Affects Versions: 7.1.3.Final (EAP)
            Reporter: Stefan Guilhen
            Assignee: Stefan Guilhen
             Fix For: 7.2.0.Alpha1, 7.1.4.Final (EAP)


Undefining a nillable attribute via CLI results in a validation error:

[standalone at localhost:9999 /] /subsystem=security/security-domain=other:undefine-attribute(name=cache-type)
{
    "outcome" => "failed",
    "failure-description" => "JBAS014746: value may not be null",
    "rolled-back" => true
}

This is caused by the validateResolvedParameter method in the NillableOrExpressionParameterValidator. The method incorrectly qualifies the value as an expression when its undefined:

        if (!value.isDefined()) {
            if (!allowExpression) {
                throw MESSAGES.nullNotAllowed(parameterName);
            }
        } else {
            delegate.validateResolvedParameter(parameterName, value);
        }

It should check the value type instead, just like validateParameter does.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list