Mathias Krueger created NIFI-15686:
--------------------------------------
Summary: 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
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 in line 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 message was sent by Atlassian Jira
(v8.20.10#820010)