lordgamez commented on code in PR #1965:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1965#discussion_r2139661922


##########
utils/include/core/PropertyDefinitionBuilder.h:
##########
@@ -99,6 +99,17 @@ struct PropertyDefinitionBuilder {
   }
 
   constexpr PropertyDefinition<NumAllowedValues, NumDependentProperties, 
NumExclusiveOfProperties> build() {
+    if (property.name.size() == 0) {
+      throw std::logic_error("A Property must have a name");
+    }
+    if (property.supports_expression_language) {
+      if (property.allowed_values.size() > 0) {
+        throw std::logic_error("Either supports EL or has allowed values");
+      }
+      if (property.validator != 
&StandardPropertyValidators::NON_BLANK_VALIDATOR && property.validator != 
&StandardPropertyValidators::ALWAYS_VALID_VALIDATOR) {
+        throw std::logic_error("Only ALWAYS_VALID_VALIDATOR and 
NON_BLANK_VALIDATOR has EL support");

Review Comment:
   I think we can remove the support for it with EL, if it can be evaluated to 
empty string we should not make an exception for it.



-- 
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