Github user ottobackwards commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2705#discussion_r188281072
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractJsonPathProcessor.java
 ---
    @@ -112,10 +111,10 @@ static String getResultRepresentation(Object 
jsonPathResult, String defaultValue
             public ValidationResult validate(final String subject, final 
String input, final ValidationContext context) {
                 String error = null;
                 if (isStale(subject, input)) {
    -                if (JsonPathExpressionValidator.isValidExpression(input)) {
    +                try {
                         JsonPath compiledJsonPath = JsonPath.compile(input);
                         cacheComputedValue(subject, input, compiledJsonPath);
    --- End diff --
    
    This throws an IllegalArgumentException if the input is null, and an 
InvalidPathException if the compile is wrong.  Maybe we should catch the 
explicit exception?  This is a nit I know.


---

Reply via email to