[jira] [Commented] (NIFI-8400) SystemDiagnostics throws NPE on Windows

2021-04-08 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17316944#comment-17316944
 ] 

ASF subversion and git services commented on NIFI-8400:
---

Commit 33ec8c8427eb2cebf52f5f91e81785bc285e6544 in nifi's branch 
refs/heads/main from Matt Burgess
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=33ec8c8 ]

NIFI-8400: Use longs in SystemDiagnostics, add null checks

This closes #4980.

Signed-off-by: Peter Turcsanyi 


> SystemDiagnostics throws NPE on Windows
> ---
>
> Key: NIFI-8400
> URL: https://issues.apache.org/jira/browse/NIFI-8400
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Matt Burgess
>Assignee: Matt Burgess
>Priority: Major
> Fix For: 1.14.0
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> SystemDiagnostics includes some Long member variables such as openFileHandles 
> that are not populated on Windows, so they remain null and when 
> getOpenFileHandles() is called, the null is cast to a long which throws an 
> NPE.
> The member variables should be long not Long, thereby getting a default value 
> of zero and avoiding an NPE when the values are not populated. If Long is 
> used elsewhere, a null check should be added to avoid possible NPEs when 
> calling the setter methods.



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


[jira] [Commented] (NIFI-8400) SystemDiagnostics throws NPE on Windows

2021-04-07 Thread Otto Fowler (Jira)


[ 
https://issues.apache.org/jira/browse/NIFI-8400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17316461#comment-17316461
 ] 

Otto Fowler commented on NIFI-8400:
---

If you read this description, and initially thought "That variable name doesn't 
seem very long", please leave a comment here.
:D

> SystemDiagnostics throws NPE on Windows
> ---
>
> Key: NIFI-8400
> URL: https://issues.apache.org/jira/browse/NIFI-8400
> Project: Apache NiFi
>  Issue Type: Bug
>  Components: Core Framework
>Reporter: Matt Burgess
>Priority: Major
>
> SystemDiagnostics includes some Long member variables such as openFileHandles 
> that are not populated on Windows, so they remain null and when 
> getOpenFileHandles() is called, the null is cast to a long which throws an 
> NPE.
> The member variables should be long not Long, thereby getting a default value 
> of zero and avoiding an NPE when the values are not populated. If Long is 
> used elsewhere, a null check should be added to avoid possible NPEs when 
> calling the setter methods.



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