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

Andrey Slepykh 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:}}

 

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

Author: Firsov Vladimir, BMSTU ([email protected])

 

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

 


> 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: Clebert Suconic
>            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:}}
>  
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author: Firsov Vladimir, BMSTU ([email protected])
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to