You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Ekaterina Zilotina (Jira)" <ji...@apache.org> on 2024/10/10 06:20:00 UTC

[jira] [Created] (ARTEMIS-5094) potential null dereference in QueueImpl

Ekaterina Zilotina created ARTEMIS-5094:
-------------------------------------------

             Summary: potential null dereference in QueueImpl
                 Key: ARTEMIS-5094
                 URL: https://issues.apache.org/jira/browse/ARTEMIS-5094
             Project: ActiveMQ Artemis
          Issue Type: Bug
            Reporter: Ekaterina Zilotina


In results of static analyze with Svace I found potential error of category "*DEREF_AFTER_NULL*" (situation when value compared with null and then dereferenced without checks) in [QueueImpl constructor|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java#L623]:

There is *server* parameter, which compared with null [at line 633|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java#L633C7-L633C11] while *super* calls. And below, at line 638, *server* [dereferences in TransientQueueManagerImpl() call|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java#L638] without check for null. Is it correct?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact