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

[jira] [Updated] (ARTEMIS-4746) SIMILAR_BRANCHES.SWITCH Identical branches in switch node

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

Justin Bertram updated ARTEMIS-4746:
------------------------------------
    Description: 
In [class JMSExceptionHelper|#L27]]

In this stack of screenshots I show that there is unnecessary logic, by correcting which you can reduce the load on the computer and shorten the code

!Screenshot from 2024-04-28 17-46-07.png!

Some cases can be classified into groups, such as:

a) 
 # case CONNECTION_TIMEDOUT:

        2. case INTERNAL_ERROR:

        3. case NOT_CONNECTED:

b)
 # {{case ILLEGAL_STATE:}}

        2. {{{}case OBJECT_CLOSED{}}}{{{}:{}}}

        3. {{case UNSUPPORTED_PACKET}}

c)

       1. {{case QUEUE_DOES_NOT_EXIST:}}

       2. {{case QUEUE_EXISTS:}}

 

  was:
In [class JMSExceptionHelper|#L27]]

In this stack of screenshots I show that there is unnecessary logic, by correcting which you can reduce the load on the computer and shorten the code

!Screenshot from 2024-04-28 17-46-07.png!

Some cases can be classified into groups, such as:

a) 
 # case CONNECTION_TIMEDOUT:

        2. case INTERNAL_ERROR:

        3. case NOT_CONNECTED:

b)
 # {{case ILLEGAL_STATE:}}

        2. {{{}case OBJECT_CLOSED{}}}{{{}:{}}}

        3. {{case UNSUPPORTED_PACKET}}

c)

       1. {{case QUEUE_DOES_NOT_EXIST:}}

       2. {{case QUEUE_EXISTS:}}

 

Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.

Author: Firsov Vladimir, BMSTU (fvv22u102@student.bmstu.ru)

 


> SIMILAR_BRANCHES.SWITCH Identical branches in switch node
> ---------------------------------------------------------
>
>                 Key: ARTEMIS-4746
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4746
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.33.0
>            Reporter: Andrey Slepykh
>            Assignee: Justin Bertram
>            Priority: Trivial
>             Fix For: 2.34.0
>
>         Attachments: Screenshot from 2024-04-28 17-46-07.png
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> In [class JMSExceptionHelper|#L27]]
> In this stack of screenshots I show that there is unnecessary logic, by correcting which you can reduce the load on the computer and shorten the code
> !Screenshot from 2024-04-28 17-46-07.png!
> Some cases can be classified into groups, such as:
> a) 
>  # case CONNECTION_TIMEDOUT:
>         2. case INTERNAL_ERROR:
>         3. case NOT_CONNECTED:
> b)
>  # {{case ILLEGAL_STATE:}}
>         2. {{{}case OBJECT_CLOSED{}}}{{{}:{}}}
>         3. {{case UNSUPPORTED_PACKET}}
> c)
>        1. {{case QUEUE_DOES_NOT_EXIST:}}
>        2. {{case QUEUE_EXISTS:}}
>  



--
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