[
https://issues.apache.org/jira/browse/ARTEMIS-5147?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914235#comment-17914235
]
ASF subversion and git services commented on ARTEMIS-5147:
----------------------------------------------------------
Commit c71a1644bf2e55249c4045e856307c3c48c08cb7 in activemq-artemis's branch
refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=c71a1644bf ]
ARTEMIS-5147 eliminate unnecessary check
The `transportConnection` variable will always be `null` so there's no
use in checking it.
> Unreachable code in ClientSessionFactoryImpl.java
> -------------------------------------------------
>
> Key: ARTEMIS-5147
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5147
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Alex
> Assignee: Justin Bertram
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 20m
> Remaining Estimate: 0h
>
> The createTransportConnection() function (line 1288) uses the try{}...catch{}
> block. In this block, the transportConnection variable is created, which,
> under any conditions of creation, is checked for the value != NULL. There is
> no security threat, as this is just an unnecessary check.
> https://github.com/apache/activemq-artemis/blob/935690a0b40d2887a765ca962e769215a680e1d6/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java#L1288-L1293
--
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