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 <[email protected]>
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 <[email protected]>
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);
}
}