dan-s1 commented on code in PR #11012:
URL: https://github.com/apache/nifi/pull/11012#discussion_r3016311564
##########
nifi-extension-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/ValidateJson.java:
##########
@@ -298,27 +339,36 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
}
}
+ if (schema == null) {
+ getLogger().error("JSON schema not configured for {}", flowFile);
+ session.getProvenanceReporter().route(flowFile, REL_FAILURE);
+ session.transfer(flowFile, REL_FAILURE);
+ return;
+ }
Review Comment:
@exceptionfactory Looking at this code further, I think this `if` statement
is completely unwarranted since the `schema` variable either gets set in the
`onScheduled` method or here in the `onTrigger` method based on which
`JsonSchemaStrategy` is chosen. Should I make another ticket to clean this part
up? Was there anything else you wanted fixed up?
--
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]