[
https://issues.apache.org/jira/browse/ARTEMIS-1410?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16163710#comment-16163710
]
ASF GitHub Bot commented on ARTEMIS-1410:
-----------------------------------------
GitHub user tabish121 opened a pull request:
https://github.com/apache/activemq-artemis/pull/1531
ARTEMIS-1410 remove redundant code processing openwire destination
Remove some redundant code in the processing of the OpenWire Destination
name, both in the topic handler and in the method in general the
destination name only needs to be converted once and only one
SimpleString instance needs to be created from that which will then feed
all the places that either the String form or the SimpleString form of
the result is needed.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tabish121/activemq-artemis ARTEMIS-1410
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/1531.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1531
----
commit b34f62f52fc6f14a7dd7e13aa678c9922a68ed57
Author: Timothy Bish <[email protected]>
Date: 2017-09-12T21:41:25Z
ARTEMIS-1410 remove redundant code processing openwire destination
Remove some redundant code in the processing of the OpenWire Destination
name, both in the topic handler and in the method in general the
destination name only needs to be converted once and only one
SimpleString instance needs to be created from that which will then feed
all the places that either the String form or the SimpleString form of
the result is needed.
----
> Coverity: Identical code for different branches
> -----------------------------------------------
>
> Key: ARTEMIS-1410
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1410
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: Broker, OpenWire
> Affects Versions: 2.4.0
> Reporter: Jiri Danek
> Priority: Trivial
>
> {noformat}
> CID 1410014 (#1 of 1): Identical code for different branches
> (IDENTICAL_BRANCHES)
> identical_branches: The same code is executed regardless of whether
> openwireDestination.isTemporary() is true, because the 'then' and 'else'
> branches are identical. Should one of the branches be modified, or the entire
> 'if' statement replaced?
> 103 if (openwireDestination.isTemporary()) {
> 104 address = new SimpleString(physicalName);
> 105 } else {
> 106 address = new SimpleString(physicalName);
> 107 }
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)