[ https://issues.apache.org/jira/browse/NIFI-12613?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17807999#comment-17807999 ]
ASF subversion and git services commented on NIFI-12613: -------------------------------------------------------- Commit 53bb995e4edb00235ac212317a6baba7f7bcaafb in nifi's branch refs/heads/main from EndzeitBegins [ https://gitbox.apache.org/repos/asf?p=nifi.git;h=53bb995e4e ] NIFI-12613 Renamed asDescribedValue() to asAllowableValue() This closes #8260 Signed-off-by: David Handermann <exceptionfact...@apache.org> > Align type-safe access to allowableValue with it's declaration > --------------------------------------------------------------- > > Key: NIFI-12613 > URL: https://issues.apache.org/jira/browse/NIFI-12613 > Project: Apache NiFi > Issue Type: Improvement > Reporter: endzeit > Assignee: endzeit > Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > NIFI-12452 introduced a new method on {{PropertyValue}} to type-safely access > a property with allowableValues constrained by an Enum. > {code:java} > <E extends Enum<E> & DescribedValue> E asDescribedValue(Class<E> enumType) > throws IllegalArgumentException {code} > 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. -- This message was sent by Atlassian Jira (v8.20.10#820010)