Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-4814

Consolidate common instances of DiscardAttributeChecker that discard an attribute set to the default value

XMLWordPrintable

      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.

      builder.getAttributeBuilder()
          .setDiscard(new DiscardAttributeChecker.DiscardAttributeValueChecker(ATTRIBUTE.getDefaultValue()), ATTRIBUTE);
          .addRejectCheck(RejectAttributeChecker.DEFINED)
          ;
      

      This common implementation can be implemented more concisely, such that a single instance can be used for any attribute.

              pferraro@redhat.com Paul Ferraro
              pferraro@redhat.com Paul Ferraro
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: