This is an automated email from the ASF dual-hosted git repository.
pvillard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 8c0f0a4 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
8c0f0a4 is described below
commit 8c0f0a40ccffcacf50c291f057f00903e21f574d
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 f9e14f7..b363683 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
@@ -76,7 +76,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);
}
}