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

Wolf-Dieter Fink (JIRA) jira-events at lists.jboss.org
Mon Nov 26 05:55:21 EST 2012


Wolf-Dieter Fink created AS7-6028:
-------------------------------------

             Summary: CLONE - NillableOrExpressionParameterValidator fails when undefining a nillable attribute
                 Key: AS7-6028
                 URL: https://issues.jboss.org/browse/AS7-6028
             Project: Application Server 7
          Issue Type: Bug
    Affects Versions: 7.1.3.Final (EAP)
            Reporter: Wolf-Dieter Fink
            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:

{code}
[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
}
{code}

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

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

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