ChrisSamo632 commented on a change in pull request #4691: URL: https://github.com/apache/nifi/pull/4691#discussion_r723728282
########## File path: nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttpRecord.java ########## @@ -405,11 +424,17 @@ public void onTrigger(final ProcessContext context, final ProcessSession session this.nullSuppression = context.getProperty(SUPPRESS_NULLS).getValue(); - final String id_path = context.getProperty(ID_RECORD_PATH).evaluateAttributeExpressions(flowFile).getValue(); - final RecordPath recordPath = StringUtils.isEmpty(id_path) ? null : recordPathCache.getCompiled(id_path); + final String idPath = context.getProperty(ID_RECORD_PATH).evaluateAttributeExpressions(flowFile).getValue(); + final RecordPath recordPath = StringUtils.isEmpty(idPath) ? null : recordPathCache.getCompiled(idPath); final StringBuilder sb = new StringBuilder(); final Charset charset = Charset.forName(context.getProperty(CHARSET).evaluateAttributeExpressions(flowFile).getValue()); + final String atTimestamp = context.getProperty(AT_TIMESTAMP).evaluateAttributeExpressions(flowFile).getValue(); + final String atTimestampPath = context.getProperty(AT_TIMESTAMP_RECORD_PATH).isSet() + ? context.getProperty(AT_TIMESTAMP_RECORD_PATH).evaluateAttributeExpressions(flowFile).getValue() + : null; Review comment: I just copied the existing code for the other property values to be fair, but I think you could be right and all the code like this could be simplified -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org