[ 
https://issues.apache.org/jira/browse/NIFI-4348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard updated NIFI-4348:
---------------------------------
    Fix Version/s: 1.11.0
       Resolution: Fixed
           Status: Resolved  (was: Patch Available)

> isExpressionLanguagePresent throws NPE when attribute is null
> -------------------------------------------------------------
>
>                 Key: NIFI-4348
>                 URL: https://issues.apache.org/jira/browse/NIFI-4348
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>    Affects Versions: 1.3.0
>            Reporter: Kay-Uwe Moosheimer
>            Assignee: M Tien
>            Priority: Trivial
>             Fix For: 1.11.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The following code throws a NPE:
>     PropertyValue property = context.getProperty(SOME_PROPERTY);
>     if (property.isExpressionLanguagePresent()) {
> when the property is not set (NULL).
> So I have to write
>     PropertyValue property = context.getProperty(SOME_PROPERTY);
>     if (property.isSet() && property.isExpressionLanguagePresent()) {    
> It would be great if the method isExpressionLanguagePresent() checks for NULL 
> and then return false.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to