[ 
https://issues.apache.org/jira/browse/NIFI-4082?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090447#comment-16090447
 ] 

ASF GitHub Bot commented on NIFI-4082:
--------------------------------------

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

    https://github.com/apache/nifi/pull/1969#discussion_r127808068
  
    --- Diff: 
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-processors/src/main/java/org/apache/nifi/processors/mongodb/GetMongo.java
 ---
    @@ -59,14 +59,21 @@
         public static final Validator DOCUMENT_VALIDATOR = new Validator() {
             @Override
             public ValidationResult validate(final String subject, final 
String value, final ValidationContext context) {
    +            final ValidationResult.Builder builder = new 
ValidationResult.Builder();
    +            builder.subject(subject).input(value);
    +
    +            if (context.isExpressionLanguageSupported(subject) && 
context.isExpressionLanguagePresent(value)) {
    +                return builder.valid(true).explanation("Contains 
Expression Language").build();
    +            }
    +
                 String reason = null;
                 try {
                     Document.parse(value);
                 } catch (final RuntimeException e) {
                     reason = e.getClass().getName();
    --- End diff --
    
    Seems like this should be `e.getMessage()` or `get.getClass().getName() + 
": " + e.getMessage()` if you want the underlying exception class.


> Enable nifi expression language for GetMongo - Query property
> -------------------------------------------------------------
>
>                 Key: NIFI-4082
>                 URL: https://issues.apache.org/jira/browse/NIFI-4082
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 1.3.0
>            Reporter: Dmitry Lukyanov
>            Assignee: Pierre Villard
>            Priority: Trivial
>
> Currently the `Query` property of the  `GetMongo` processor does not support 
> expression language.
> That disables query parametrization.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to