timeabarna commented on code in PR #6115:
URL: https://github.com/apache/nifi/pull/6115#discussion_r895388577
##########
nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/main/java/org/apache/nifi/controller/StandardProcessorNode.java:
##########
@@ -505,24 +510,30 @@ public String getSchedulingPeriod() {
@Override
@SuppressWarnings("deprecation")
- public synchronized void setScheduldingPeriod(final String
schedulingPeriod) {
+ public synchronized void setSchedulingPeriod(final String
schedulingPeriod) {
if (isRunning()) {
throw new IllegalStateException("Cannot modify Processor
configuration while the Processor is running");
}
+ final String evaluatedSchedulingPeriod =
evaluateSchedulingPeriodFromParameter(schedulingPeriod);
+ final ParameterParser parameterParser = new
ExpressionLanguageAgnosticParameterParser();
+ final ParameterTokenList parameterTokenList =
parameterParser.parseTokens(schedulingPeriod);
+
+ parameterReferences = new
ArrayList<>(parameterTokenList.toReferenceList());
+
switch (schedulingStrategy) {
case CRON_DRIVEN: {
try {
- new CronExpression(schedulingPeriod);
+ new CronExpression(evaluatedSchedulingPeriod);
} catch (final Exception e) {
throw new IllegalArgumentException(
- "Scheduling Period is not a valid cron expression: " +
schedulingPeriod);
+ "Scheduling Period is not a valid cron expression: " +
evaluatedSchedulingPeriod);
Review Comment:
Corrected also in StandardProcessorDao.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]