Paul Ferraro created WFCORE-4814:
------------------------------------
Summary: Consolidate common instances of DiscardAttributeChecker that discard
an attribute set to the default value
Key: WFCORE-4814
URL:
https://issues.redhat.com/browse/WFCORE-4814
Project: WildFly Core
Issue Type: Enhancement
Components: Management
Affects Versions: 11.0.0.Beta7
Reporter: Paul Ferraro
Assignee: Paul Ferraro
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)