[jboss-jira] [JBoss JIRA] (WFLY-13015) Consolidate common instances of DiscardAttributeChecker that discard an attribute set to the default value
Paul Ferraro (Jira)
issues at jboss.org
Sat Jan 25 17:02:04 EST 2020
[ https://issues.redhat.com/browse/WFLY-13015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Ferraro moved WFCORE-4815 to WFLY-13015:
---------------------------------------------
Project: WildFly (was: WildFly Core)
Key: WFLY-13015 (was: WFCORE-4815)
Component/s: Management
(was: Management)
Affects Version/s: 19.0.0.Beta1
(was: 11.0.0.Beta7)
> Consolidate common instances of DiscardAttributeChecker that discard an attribute set to the default value
> ----------------------------------------------------------------------------------------------------------
>
> Key: WFLY-13015
> URL: https://issues.redhat.com/browse/WFLY-13015
> Project: WildFly
> Issue Type: Enhancement
> Components: Management
> Affects Versions: 19.0.0.Beta1
> Reporter: Paul Ferraro
> Assignee: Paul Ferraro
> Priority: Major
>
> A common transformer pattern for newly added attributes is to discard the attribute if the value is the default value, and reject if otherwise defined.
> e.g.
> {code:java}
> builder.getAttributeBuilder()
> .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(ATTRIBUTE.getDefaultValue()), ATTRIBUTE);
> .addRejectCheck(RejectAttributeChecker.DEFINED)
> ;
> {code}
> This common implementation can be implemented more concisely, such that a single instance can be used for any attribute.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list