Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
NIFI-12452 introduced a new method on PropertyValue to type-safely access a property with allowableValues constrained by an Enum.
<E extends Enum<E> & DescribedValue> E asDescribedValue(Class<E> enumType) throws IllegalArgumentException
I think it makes sense to align the access site in PropertyValue with the declaration site in PropertyDescriptor.Builder.
This would involve renaming the method to asAllowableValue for improved symmetry.
This is a breaking change, however the method was never part of an stable release.
Additionally, NIFI-12573 unified the behaviour of specifying Enums (not) implementing DescribedValue as allowableValues. With this change in place, I think it's reasonable to open the method to accepts any Enum as well.
Attachments
Issue Links
- links to