[ 
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|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSExceptionHelper.java#L27]|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSExceptionHelper.java#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|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSExceptionHelper.java#L27)|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSExceptionHelper.java#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: ActiveMQ-Artemis-Native
>    Affects Versions: 2.25.0
>            Reporter: Andrey Slepykh
>            Assignee: Clebert Suconic
>            Priority: Major
>         Attachments: Screenshot from 2024-04-28 17-46-07.png
>
>
> In [class 
> JMSExceptionHelper|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSExceptionHelper.java#L27]|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-jms-client/src/main/java/org/apache/activemq/artemis/jms/client/JMSExceptionHelper.java#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)

Reply via email to