exceptionfactory commented on code in PR #9927:
URL: https://github.com/apache/nifi/pull/9927#discussion_r2083236502


##########
nifi-extension-bundles/nifi-extension-utils/nifi-git-flow-registry/src/main/java/org/apache/nifi/registry/flow/git/AbstractGitFlowRegistryClient.java:
##########
@@ -93,12 +94,14 @@ public abstract class AbstractGitFlowRegistryClient extends 
AbstractFlowRegistry
             .required(true)
             .build();
 
-    public static final PropertyDescriptor EMPTY_PARAMETERS = new 
PropertyDescriptor.Builder()
-            .name("Remove Parameter Values")
-            .description("If true, the values of all parameters will be 
removed from the flow before storing it.")
-            .addValidator(StandardValidators.BOOLEAN_VALIDATOR)
-            .allowableValues("true", "false")
-            .defaultValue("false")
+    static final AllowableValue RETAIN = new AllowableValue("retain", 
"Retain", "Will not modify the parameter values");
+    static final AllowableValue REMOVE = new AllowableValue("remove", 
"Remove", "Will remove the parameter values");

Review Comment:
   Instead of using `AllowableValue`, it would be helpful to define this as an 
`enum`, there the enum name can be the value itself, as opposed to the 
lowercase `retain` and `remove`. This also makes the property retrieval cleaner 
with `asAllowableValue()`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to