Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-12573

Improve support for Enum values in PropertyDescriptor.Builder

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 2.0.0-M2
    • Core Framework
    • None

    Description

      The PropertyDescriptor.Builder provides several methods accepting Enum values. 
      However, some of those are restricted to implement DescribedValue while other do not.
      This limitation should be lifted to provide support for both Enum that implement DescribedValue and those that do not.
      Additionally, parameters should not be restricted to AllowableValue but rather the underlying interface DescribedValue.

      This affected the following methods:

      <E extends Enum<E> & DescribedValue> Builder allowableValues(final Class<E> enumClass)
      -> <E extends Enum<E>> Builder allowableValues(final Class<E> enumClass)
      
      public <E extends Enum<E> & DescribedValue> Builder allowableValues(final EnumSet<E> enumValues)
      -> public <E extends Enum<E>> Builder allowableValues(final EnumSet<E> enumValues)
      
      public Builder allowableValues(final AllowableValue... values)
      -> public Builder allowableValues(final DescribedValue... values)
      

      Attachments

        Issue Links

          Activity

            People

              EndzeitBegins endzeit
              EndzeitBegins endzeit
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 50m
                  50m