[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:46:21 EST 2012


     [ https://issues.jboss.org/browse/AS7-6018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Stefan Guilhen updated AS7-6018:
--------------------------------

    Description: 
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.

  was:
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.


    
> 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:
> {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