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>
Mon, 21 Feb 2022 15:18:02 +0000 (10:18 -0500)
commitb54feec98544d0e291309a9a5b205c4685374c2e
treea8c8a19ed1c38443a0716bc28b0bcec612264009
parent43c692e7a0f593984abffa5674c28e2c23c1e10a
fix: coverity reported null returns in Log4j2 agent

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>
src/lib/lttng-ust-java-agent/java/lttng-ust-agent-log4j2/org/lttng/ust/agent/log4j2/LttngLogAppender.java
This page took 0.025319 seconds and 4 git commands to generate.