Github user markap14 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2672#discussion_r187427343
--- Diff:
nifi-mock/src/main/java/org/apache/nifi/util/MockPropertyValue.java ---
@@ -202,6 +203,9 @@ public PropertyValue evaluateAttributeExpressions(final
AttributeValueDecorator
@Override
public PropertyValue evaluateAttributeExpressions(final FlowFile
flowFile) throws ProcessException {
+ if (flowFile == null) {
--- End diff --
This feels a little bit odd to me, as it's very unclear just from looking
at this method what the intent is here - i think it would be cleaner to pass
down a boolean argument that indicates whether or not attributes are available.
It would be `true` in all cases except for `evaluateAttributeExpressions()`
with no arguments and `evaluateAttributeExpressions(AttributeValueDecorator
decorator)` - or otherwise to just have the no-arg version call the one that
takes only the decorator and implement that method there instead of calling
another override of the method. The actual implementation is only about 4-5
lines of code and quite trivial anyway.
---