You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Clebert Suconic (Jira)" <ji...@apache.org> on 2025/03/13 01:55:00 UTC
[jira] [Closed] (ARTEMIS-5115) remove needless null checks in ChannelImpl
[ https://issues.apache.org/jira/browse/ARTEMIS-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Clebert Suconic closed ARTEMIS-5115.
------------------------------------
> remove needless null checks in ChannelImpl
> ------------------------------------------
>
> Key: ARTEMIS-5115
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5115
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Alex
> Assignee: Justin Bertram
> Priority: Major
> Labels: pull-request-available
> Fix For: 2.40.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> In the {{clearUpTo}} method packages are cleared one at a time to the specified command ID. If the logger is enabled, information about {{RemotingConnectionID}}, {{lastReceived}}, {{commandId}}, and other data is displayed. In the first {{if}} the correct ternary operator is written which checks {{connection == null}}.
> Below in the loop is [another {{if}}|[https://github.com/apache/activemq-artemis/blob/4c6cded2e79cf10d2323de1b5fa7418b289ab034/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java#L874-L875]], where there is no check for null which can lead to a {{NullPointerException}}.
> [https://github.com/apache/activemq-artemis/blob/4c6cded2e79cf10d2323de1b5fa7418b289ab034/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/ChannelImpl.java#L856-L886]
--
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