You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2019/10/30 09:00:00 UTC
[jira] [Commented] (NIFI-4348) isExpressionLanguagePresent throws
NPE when attribute is null
[ https://issues.apache.org/jira/browse/NIFI-4348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16962822#comment-16962822 ]
ASF subversion and git services commented on NIFI-4348:
-------------------------------------------------------
Commit 3d56e2f26d2943c00f4ffdfe8629c6faf8be4998 in nifi's branch refs/heads/master from mtien
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=3d56e2f ]
NIFI-4348 handled NPE in isExpressionLanguagePresent.
Signed-off-by: Pierre Villard <pi...@gmail.com>
This closes #3857.
> 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
> Time Spent: 10m
> 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)