You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by pv...@apache.org on 2021/03/09 07:49:27 UTC

[nifi] branch support/nifi-1.13 updated: NIFI-8301: When we create a PreparedQuery in the StandardProcessContext, we do so with the effective property values. As a result, the Parameters have already been evaluated, so we need to use Query.prepareWithParametersPreEvaluated instead of Query.prepare

This is an automated email from the ASF dual-hosted git repository.

pvillard pushed a commit to branch support/nifi-1.13
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/support/nifi-1.13 by this push:
     new b12e43f  NIFI-8301: When we create a PreparedQuery in the StandardProcessContext, we do so with the effective property values. As a result, the Parameters have already been evaluated, so we need to use Query.prepareWithParametersPreEvaluated instead of Query.prepare
b12e43f is described below

commit b12e43f7b75fbc5369f3c58f4ff8b5c391e558d0
Author: Mark Payne <ma...@hotmail.com>
AuthorDate: Mon Mar 8 16:05:15 2021 -0500

    NIFI-8301: When we create a PreparedQuery in the StandardProcessContext, we do so with the effective property values. As a result, the Parameters have already been evaluated, so we need to use Query.prepareWithParametersPreEvaluated instead of Query.prepare
    
    Signed-off-by: Pierre Villard <pi...@gmail.com>
    
    This closes #4874.
---
 .../apache/nifi/controller/service/StandardConfigurationContext.java    | 2 +-
 .../src/main/java/org/apache/nifi/processor/StandardProcessContext.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardConfigurationContext.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardConfigurationContext.java
index 476ea0e..f77062d 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardConfigurationContext.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/service/StandardConfigurationContext.java
@@ -66,7 +66,7 @@ public class StandardConfigurationContext implements ConfigurationContext {
                 value = desc.getDefaultValue();
             }
 
-            final PreparedQuery pq = Query.prepare(value);
+            final PreparedQuery pq = Query.prepareWithParametersPreEvaluated(value);
             preparedQueries.put(desc, pq);
         }
     }
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/processor/StandardProcessContext.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/processor/StandardProcessContext.java
index ca66598..89258ac 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/processor/StandardProcessContext.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/processor/StandardProcessContext.java
@@ -75,7 +75,7 @@ public class StandardProcessContext implements ProcessContext, ControllerService
             }
 
             if (value != null) {
-                final PreparedQuery pq = Query.prepare(value);
+                final PreparedQuery pq = Query.prepareWithParametersPreEvaluated(value);
                 preparedQueries.put(desc, pq);
             }
         }