[
https://issues.apache.org/jira/browse/NIFI-15686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18065680#comment-18065680
]
ASF subversion and git services commented on NIFI-15686:
--------------------------------------------------------
Commit 70a1b33896522d362d344b0a92ae3627e2e9f380 in nifi's branch
refs/heads/main from Pierre Villard
[ https://gitbox.apache.org/repos/asf?p=nifi.git;h=70a1b338965 ]
NIFI-15686 Fixed NullPointerException in ListenSyslog.getListenPorts (#11003)
Signed-off-by: David Handermann <[email protected]>
> NullPointerException when accessing /nifi-api/flow/listen-ports
> ---------------------------------------------------------------
>
> Key: NIFI-15686
> URL: https://issues.apache.org/jira/browse/NIFI-15686
> Project: Apache NiFi
> Issue Type: Bug
> Affects Versions: 2.8.0
> Reporter: Mathias Krueger
> Assignee: Pierre Villard
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> If a user adds a ListenSyslog processor to the canvas and doesnt configure a
> port, accessing nifi-api/flow/listen-ports results in the message:
> An unexpected error has occurred. Please check the logs for additional
> details.
> in nifi-user.log the following NPE is thrown
> {code:java}
> java.lang.NullPointerException: Cannot invoke "java.lang.Integer.intValue()"
> because "tcpPortNumber" is null
> at
> org.apache.nifi.processors.standard.ListenSyslog.getListenPorts(ListenSyslog.java:357)
> {code}
> In ListenSyslog in method getListenPorts should a null value check for TCP
> and UDP port be added.
> Also if the users enters an invalid value (e.g. empty text) this method
> should not fail.
> This problem exists for every components that inherits the method
> getListenPorts() form the interface ListenComponent
--
This message was sent by Atlassian Jira
(v8.20.10#820010)