fix: coverity reported null returns in Log4j2 agent
authorMichael Jeanson <mjeanson@efficios.com>
Fri, 28 Jan 2022 18:58:12 +0000 (18:58 +0000)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 28 Jan 2022 19:59:30 +0000 (14:59 -0500)
According to the log4j javadoc, these methods should not return null but
since it's reported by Coverity, add the null checks.

*** CID 1469124:  Null pointer dereferences  (NULL_RETURNS)
src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/org/lttng/ust/agent/log4j2/LttngLogAppender.java:
194 in org.lttng.ust.agent.log4j2.LttngLogAppender.append(org.apache.logging.log4j.core.LogEvent)()

*** CID 1469123:  Null pointer dereferences  (NULL_RETURNS)
src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/org/lttng/ust/agent/log4j2/LttngLogAppender.java:
167 in org.lttng.ust.agent.log4j2.LttngLogAppender.append(org.apache.logging.log4j.core.LogEvent)()

Change-Id: Ib992b3cc6848492cfb6e7d8fec6ce3898d962db4
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>

No differences found
This page took 0.024972 seconds and 4 git commands to generate.