Matt Burgess created NIFI-4590:
----------------------------------
Summary: customValidate() fails during unit tests when
isExpressionLanguagePresent() is called
Key: NIFI-4590
URL: https://issues.apache.org/jira/browse/NIFI-4590
Project: Apache NiFi
Issue Type: Test
Components: Core Framework
Reporter: Matt Burgess
When isExpressionLanguagePresent() is called from a customValidate() method in
a processor during a unit test, a NullPointerException is thrown.
Inside that method in MockPropertyValue, a Boolean (not boolean) reference
"expectExpressions" appears that expectExpressions has not yet been populated
by the time isExpressionLanguagePresent() is called, and the
if(!expectExpressions) clause results in an NPE.
Not sure if the fix is to change expectExpressions to be a boolean, or to allow
for expectExpressions == null in isExpressionLanguagePresent(), or some third
option to achieve the desired behavior while maintaining an accurate mock of
true behavior.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)