[jboss-jira] [JBoss JIRA] (WFCORE-3056) Model is not validated for write attribute handlers like it is add/remove ones

Tomaz Cerar (JIRA) issues at jboss.org
Mon Jul 10 12:08:00 EDT 2017


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

Tomaz Cerar updated WFCORE-3056:
--------------------------------
    Summary: Model is not validated for write attribute handlers like it is add/remove ones  (was: SimpleAttributeDefinitionBuilder.setValidator(new StringAllowedValuesValidator()) doesn't validate the model on runtime, leading to WildFly not booting after writing invalid values)


> Model is not validated for write attribute handlers like it is add/remove ones
> ------------------------------------------------------------------------------
>
>                 Key: WFCORE-3056
>                 URL: https://issues.jboss.org/browse/WFCORE-3056
>             Project: WildFly Core
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 3.0.0.Beta28
>            Reporter: Ingo Weiss
>            Assignee: Brian Stansberry
>
> When creating a new subsystem attribute and using .setValidator(new StringAllowedValuesValidator()) as in the below example:
> {code:java}
> public static final SimpleAttributeDefinition CACHE_TYPE = new SimpleAttributeDefinitionBuilder(Constants.CACHE_TYPE, ModelType.STRING, true)
>         .setAllowExpression(true)
>         .setValidator(new StringAllowedValuesValidator("default", INFINISPAN_CACHE_TYPE))
>         .build();
> {code}
> The model is not validated during runtime, leading to WildFly not being able to boot after a reload due to an invalid model.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list