exceptionfactory commented on code in PR #10546:
URL: https://github.com/apache/nifi/pull/10546#discussion_r2541190158
##########
nifi-extension-bundles/nifi-enrich-bundle/nifi-enrich-processors/src/main/java/org/apache/nifi/processors/AbstractEnrichIP.java:
##########
@@ -63,11 +66,31 @@ public abstract class AbstractEnrichIP extends
AbstractProcessor {
.addValidator(StandardValidators.createAttributeExpressionLanguageValidator(AttributeExpression.ResultType.STRING))
.build();
+ private static final Pattern LOG_LEVEL_PATTERN =
Pattern.compile("^(?:INFO|DEBUG|WARN|ERROR)$");
+ private static final Validator LOG_LEVEL_VALIDATOR = (subject, input,
context) -> {
+ if (!context.isExpressionLanguagePresent(input)) {
Review Comment:
I recommend inverting the statement so that it reads `if
(context.isExpressionLanguagePresent(input)) { ... }`
--
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]