[ 
https://issues.apache.org/jira/browse/ARTEMIS-5115?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Robbie Gemmell updated ARTEMIS-5115:
------------------------------------
    Summary: remove needless null checks in ChannelImpl  (was: deref after NULL 
in ChannelImpl.java)

> 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
>          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: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to