[jira] [Updated] (ARTEMIS-4748) FB.DLS_DEAD_LOCAL_STORE Dead store

2024-04-28 Thread Justin Bertram (Jira)


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

Justin Bertram updated ARTEMIS-4748:

Language:   (was: JAVA Java java)

> FB.DLS_DEAD_LOCAL_STORE Dead store
> --
>
> Key: ARTEMIS-4748
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4748
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: Andrey Slepykh
>Assignee: Clebert Suconic
>Priority: Major
> Attachments: image-2024-04-29-01-38-00-000.png
>
>
> in [class 
> LocalGroupingHandler|https://github.com/apache/activemq-artemis/blob/b50f01b02b4c829e7330980837629951eeafb304/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java#L51C20-L51C40]
>  
> !image-2024-04-29-01-38-00-000.png|width=785,height=63!
> You create an instance of a class and immediately use the remove method, 
> although you should first check that this instance is full
>  
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author: Firsov Vladimir, BMSTU (fvv22u...@student.bmstu.ru)



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


[jira] [Assigned] (ARTEMIS-4748) FB.DLS_DEAD_LOCAL_STORE Dead store

2024-04-28 Thread Justin Bertram (Jira)


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

Justin Bertram reassigned ARTEMIS-4748:
---

Assignee: (was: Clebert Suconic)

> FB.DLS_DEAD_LOCAL_STORE Dead store
> --
>
> Key: ARTEMIS-4748
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4748
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: Andrey Slepykh
>Priority: Major
> Attachments: image-2024-04-29-01-38-00-000.png
>
>
> in [class 
> LocalGroupingHandler|https://github.com/apache/activemq-artemis/blob/b50f01b02b4c829e7330980837629951eeafb304/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java#L51C20-L51C40]
>  
> !image-2024-04-29-01-38-00-000.png|width=785,height=63!
> You create an instance of a class and immediately use the remove method, 
> although you should first check that this instance is full
>  
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author: Firsov Vladimir, BMSTU (fvv22u...@student.bmstu.ru)



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


[jira] [Updated] (ARTEMIS-4748) FB.DLS_DEAD_LOCAL_STORE Dead store

2024-04-28 Thread Justin Bertram (Jira)


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

Justin Bertram updated ARTEMIS-4748:

Component/s: (was: ActiveMQ-Artemis-Native)

> FB.DLS_DEAD_LOCAL_STORE Dead store
> --
>
> Key: ARTEMIS-4748
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4748
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: Andrey Slepykh
>Assignee: Clebert Suconic
>Priority: Major
> Attachments: image-2024-04-29-01-38-00-000.png
>
>
> in [class 
> LocalGroupingHandler|https://github.com/apache/activemq-artemis/blob/b50f01b02b4c829e7330980837629951eeafb304/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java#L51C20-L51C40]
>  
> !image-2024-04-29-01-38-00-000.png|width=785,height=63!
> You create an instance of a class and immediately use the remove method, 
> although you should first check that this instance is full
>  
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author: Firsov Vladimir, BMSTU (fvv22u...@student.bmstu.ru)



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


[jira] [Created] (ARTEMIS-4748) FB.DLS_DEAD_LOCAL_STORE Dead store

2024-04-28 Thread Andrey Slepykh (Jira)
Andrey Slepykh created ARTEMIS-4748:
---

 Summary: FB.DLS_DEAD_LOCAL_STORE Dead store
 Key: ARTEMIS-4748
 URL: https://issues.apache.org/jira/browse/ARTEMIS-4748
 Project: ActiveMQ Artemis
  Issue Type: Bug
  Components: ActiveMQ-Artemis-Native
Affects Versions: 2.25.0
Reporter: Andrey Slepykh
Assignee: Clebert Suconic
 Attachments: image-2024-04-29-01-38-00-000.png

in [class 
LocalGroupingHandler|https://github.com/apache/activemq-artemis/blob/b50f01b02b4c829e7330980837629951eeafb304/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/group/impl/LocalGroupingHandler.java#L51C20-L51C40]

 

!image-2024-04-29-01-38-00-000.png|width=785,height=63!

You create an instance of a class and immediately use the remove method, 
although you should first check that this instance is full

 

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

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



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


[jira] [Updated] (ARTEMIS-4747) UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable

2024-04-28 Thread Justin Bertram (Jira)


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

Justin Bertram updated ARTEMIS-4747:

Language:   (was: JAVA Java java)

> UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable
> ---
>
> Key: ARTEMIS-4747
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4747
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: Andrey Slepykh
>Priority: Major
> Attachments: image-2024-04-29-00-32-18-126.png, 
> image-2024-04-29-00-38-29-717.png, image-2024-04-29-00-40-51-302.png, 
> image-2024-04-29-00-42-09-598.png, image-2024-04-29-00-42-42-738.png, 
> image-2024-04-29-00-43-17-889.png, image-2024-04-29-00-45-35-605.png, 
> image-2024-04-29-00-46-36-280.png, image-2024-04-29-00-48-23-220.png, 
> image-2024-04-29-00-48-27-918.png, image-2024-04-29-00-50-16-576.png, 
> image-2024-04-29-00-52-04-906.png, image-2024-04-29-00-54-09-929.png, 
> image-2024-04-29-00-55-27-169.png, image-2024-04-29-00-57-19-800.png
>
>
> In [class 
> CompressedLargeMessageControllerImpl|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36]|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36)]
> this function is called in a number of other methods, but since there is an 
> exception and no handler, it turns out that part of the code is unreachable
> !image-2024-04-29-00-32-18-126.png!
> The code is unreachable in these cases:
> 1) the line with  ```return 0``` in unreachable
>   !image-2024-04-29-00-38-29-717.png!
> 2) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-42-42-738.png!
> 3) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-42-09-598.png!
> 4) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-43-17-889.png!
> 5) the line with  ```return (short) (getByte(index) & 0xFF)``` in unreachable
> !image-2024-04-29-00-45-35-605.png!
> 6) the line with  ```return getShort(index) & 0x``` in unreachable
> !image-2024-04-29-00-46-36-280.png!
> 7) the line with  ```return getInt(index) & 0xL``` in unreachable
> !image-2024-04-29-00-48-23-220.png!
> 8) the line with  ```dst[i] = getByte(index++)``` in unreachable
> !image-2024-04-29-00-50-16-576.png!
> 9) the line with  ```dst.writerIndex(dst.writerIndex() + length)``` in 
> unreachable
> !image-2024-04-29-00-52-04-906.png!
> 10) the line with  ```return (char) getShort(index)``` in unreachable
> !image-2024-04-29-00-54-09-929.png!
> 11) the line with  ```return Double.longBitsToDouble(getLong(index))``` in 
> unreachable
> !image-2024-04-29-00-55-27-169.png!
> 12) the line with  ```return Float.intBitsToFloat(getInt(index));``` in 
> unreachable
> !image-2024-04-29-00-57-19-800.png!
>  
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author: Firsov Vladimir, BMSTU (fvv22u...@student.bmstu.ru)



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


[jira] [Updated] (ARTEMIS-4747) UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable

2024-04-28 Thread Justin Bertram (Jira)


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

Justin Bertram updated ARTEMIS-4747:

Component/s: (was: ActiveMQ-Artemis-Native)

> UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable
> ---
>
> Key: ARTEMIS-4747
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4747
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: Andrey Slepykh
>Assignee: Clebert Suconic
>Priority: Major
> Attachments: image-2024-04-29-00-32-18-126.png, 
> image-2024-04-29-00-38-29-717.png, image-2024-04-29-00-40-51-302.png, 
> image-2024-04-29-00-42-09-598.png, image-2024-04-29-00-42-42-738.png, 
> image-2024-04-29-00-43-17-889.png, image-2024-04-29-00-45-35-605.png, 
> image-2024-04-29-00-46-36-280.png, image-2024-04-29-00-48-23-220.png, 
> image-2024-04-29-00-48-27-918.png, image-2024-04-29-00-50-16-576.png, 
> image-2024-04-29-00-52-04-906.png, image-2024-04-29-00-54-09-929.png, 
> image-2024-04-29-00-55-27-169.png, image-2024-04-29-00-57-19-800.png
>
>
> In [class 
> CompressedLargeMessageControllerImpl|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36]|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36)]
> this function is called in a number of other methods, but since there is an 
> exception and no handler, it turns out that part of the code is unreachable
> !image-2024-04-29-00-32-18-126.png!
> The code is unreachable in these cases:
> 1) the line with  ```return 0``` in unreachable
>   !image-2024-04-29-00-38-29-717.png!
> 2) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-42-42-738.png!
> 3) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-42-09-598.png!
> 4) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-43-17-889.png!
> 5) the line with  ```return (short) (getByte(index) & 0xFF)``` in unreachable
> !image-2024-04-29-00-45-35-605.png!
> 6) the line with  ```return getShort(index) & 0x``` in unreachable
> !image-2024-04-29-00-46-36-280.png!
> 7) the line with  ```return getInt(index) & 0xL``` in unreachable
> !image-2024-04-29-00-48-23-220.png!
> 8) the line with  ```dst[i] = getByte(index++)``` in unreachable
> !image-2024-04-29-00-50-16-576.png!
> 9) the line with  ```dst.writerIndex(dst.writerIndex() + length)``` in 
> unreachable
> !image-2024-04-29-00-52-04-906.png!
> 10) the line with  ```return (char) getShort(index)``` in unreachable
> !image-2024-04-29-00-54-09-929.png!
> 11) the line with  ```return Double.longBitsToDouble(getLong(index))``` in 
> unreachable
> !image-2024-04-29-00-55-27-169.png!
> 12) the line with  ```return Float.intBitsToFloat(getInt(index));``` in 
> unreachable
> !image-2024-04-29-00-57-19-800.png!
>  
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author: Firsov Vladimir, BMSTU (fvv22u...@student.bmstu.ru)



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


[jira] [Assigned] (ARTEMIS-4747) UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable

2024-04-28 Thread Justin Bertram (Jira)


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

Justin Bertram reassigned ARTEMIS-4747:
---

Assignee: (was: Clebert Suconic)

> UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable
> ---
>
> Key: ARTEMIS-4747
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4747
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>Affects Versions: 2.25.0
>Reporter: Andrey Slepykh
>Priority: Major
> Attachments: image-2024-04-29-00-32-18-126.png, 
> image-2024-04-29-00-38-29-717.png, image-2024-04-29-00-40-51-302.png, 
> image-2024-04-29-00-42-09-598.png, image-2024-04-29-00-42-42-738.png, 
> image-2024-04-29-00-43-17-889.png, image-2024-04-29-00-45-35-605.png, 
> image-2024-04-29-00-46-36-280.png, image-2024-04-29-00-48-23-220.png, 
> image-2024-04-29-00-48-27-918.png, image-2024-04-29-00-50-16-576.png, 
> image-2024-04-29-00-52-04-906.png, image-2024-04-29-00-54-09-929.png, 
> image-2024-04-29-00-55-27-169.png, image-2024-04-29-00-57-19-800.png
>
>
> In [class 
> CompressedLargeMessageControllerImpl|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36]|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36)]
> this function is called in a number of other methods, but since there is an 
> exception and no handler, it turns out that part of the code is unreachable
> !image-2024-04-29-00-32-18-126.png!
> The code is unreachable in these cases:
> 1) the line with  ```return 0``` in unreachable
>   !image-2024-04-29-00-38-29-717.png!
> 2) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-42-42-738.png!
> 3) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-42-09-598.png!
> 4) the line with  ```return 0``` in unreachable
> !image-2024-04-29-00-43-17-889.png!
> 5) the line with  ```return (short) (getByte(index) & 0xFF)``` in unreachable
> !image-2024-04-29-00-45-35-605.png!
> 6) the line with  ```return getShort(index) & 0x``` in unreachable
> !image-2024-04-29-00-46-36-280.png!
> 7) the line with  ```return getInt(index) & 0xL``` in unreachable
> !image-2024-04-29-00-48-23-220.png!
> 8) the line with  ```dst[i] = getByte(index++)``` in unreachable
> !image-2024-04-29-00-50-16-576.png!
> 9) the line with  ```dst.writerIndex(dst.writerIndex() + length)``` in 
> unreachable
> !image-2024-04-29-00-52-04-906.png!
> 10) the line with  ```return (char) getShort(index)``` in unreachable
> !image-2024-04-29-00-54-09-929.png!
> 11) the line with  ```return Double.longBitsToDouble(getLong(index))``` in 
> unreachable
> !image-2024-04-29-00-55-27-169.png!
> 12) the line with  ```return Float.intBitsToFloat(getInt(index));``` in 
> unreachable
> !image-2024-04-29-00-57-19-800.png!
>  
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author: Firsov Vladimir, BMSTU (fvv22u...@student.bmstu.ru)



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


[jira] [Created] (ARTEMIS-4747) UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable

2024-04-28 Thread Andrey Slepykh (Jira)
Andrey Slepykh created ARTEMIS-4747:
---

 Summary: UNREACHABLE_CODE.EXCEPTION This statement in the source 
code is unreachable
 Key: ARTEMIS-4747
 URL: https://issues.apache.org/jira/browse/ARTEMIS-4747
 Project: ActiveMQ Artemis
  Issue Type: Bug
  Components: ActiveMQ-Artemis-Native
Affects Versions: 2.25.0
Reporter: Andrey Slepykh
Assignee: Clebert Suconic
 Attachments: image-2024-04-29-00-32-18-126.png, 
image-2024-04-29-00-38-29-717.png, image-2024-04-29-00-40-51-302.png, 
image-2024-04-29-00-42-09-598.png, image-2024-04-29-00-42-42-738.png, 
image-2024-04-29-00-43-17-889.png, image-2024-04-29-00-45-35-605.png, 
image-2024-04-29-00-46-36-280.png, image-2024-04-29-00-48-23-220.png, 
image-2024-04-29-00-48-27-918.png, image-2024-04-29-00-50-16-576.png, 
image-2024-04-29-00-52-04-906.png, image-2024-04-29-00-54-09-929.png, 
image-2024-04-29-00-55-27-169.png, image-2024-04-29-00-57-19-800.png

In (class 
CompressedLargeMessageControllerImpl|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36)]

this function is called in a number of other methods, but since there is an 
exception and no handler, it turns out that part of the code is unreachable

!image-2024-04-29-00-32-18-126.png!

The code is unreachable in these cases:

1) the line with  ```return 0``` in unreachable

  !image-2024-04-29-00-38-29-717.png!

2) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-42-42-738.png!

3) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-42-09-598.png!

4) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-43-17-889.png!

5) the line with  ```return (short) (getByte(index) & 0xFF)``` in unreachable

!image-2024-04-29-00-45-35-605.png!

6) the line with  ```return getShort(index) & 0x``` in unreachable

!image-2024-04-29-00-46-36-280.png!

7) the line with  ```return getInt(index) & 0xL``` in unreachable

!image-2024-04-29-00-48-23-220.png!

8) the line with  ```dst[i] = getByte(index++)``` in unreachable

!image-2024-04-29-00-50-16-576.png!

9) the line with  ```dst.writerIndex(dst.writerIndex() + length)``` in 
unreachable

!image-2024-04-29-00-52-04-906.png!

10) the line with  ```return (char) getShort(index)``` in unreachable

!image-2024-04-29-00-54-09-929.png!

11) the line with  ```return Double.longBitsToDouble(getLong(index))``` in 
unreachable

!image-2024-04-29-00-55-27-169.png!

12) the line with  ```return Float.intBitsToFloat(getInt(index));``` in 
unreachable

!image-2024-04-29-00-57-19-800.png!

 

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

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



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


[jira] [Updated] (ARTEMIS-4747) UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable

2024-04-28 Thread Andrey Slepykh (Jira)


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

Andrey Slepykh updated ARTEMIS-4747:

Description: 
In [class 
CompressedLargeMessageControllerImpl|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36]|https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36)]

this function is called in a number of other methods, but since there is an 
exception and no handler, it turns out that part of the code is unreachable

!image-2024-04-29-00-32-18-126.png!

The code is unreachable in these cases:

1) the line with  ```return 0``` in unreachable

  !image-2024-04-29-00-38-29-717.png!

2) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-42-42-738.png!

3) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-42-09-598.png!

4) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-43-17-889.png!

5) the line with  ```return (short) (getByte(index) & 0xFF)``` in unreachable

!image-2024-04-29-00-45-35-605.png!

6) the line with  ```return getShort(index) & 0x``` in unreachable

!image-2024-04-29-00-46-36-280.png!

7) the line with  ```return getInt(index) & 0xL``` in unreachable

!image-2024-04-29-00-48-23-220.png!

8) the line with  ```dst[i] = getByte(index++)``` in unreachable

!image-2024-04-29-00-50-16-576.png!

9) the line with  ```dst.writerIndex(dst.writerIndex() + length)``` in 
unreachable

!image-2024-04-29-00-52-04-906.png!

10) the line with  ```return (char) getShort(index)``` in unreachable

!image-2024-04-29-00-54-09-929.png!

11) the line with  ```return Double.longBitsToDouble(getLong(index))``` in 
unreachable

!image-2024-04-29-00-55-27-169.png!

12) the line with  ```return Float.intBitsToFloat(getInt(index));``` in 
unreachable

!image-2024-04-29-00-57-19-800.png!

 

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

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

  was:
In (class 
CompressedLargeMessageControllerImpl|[https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/CompressedLargeMessageControllerImpl.java#L36)]

this function is called in a number of other methods, but since there is an 
exception and no handler, it turns out that part of the code is unreachable

!image-2024-04-29-00-32-18-126.png!

The code is unreachable in these cases:

1) the line with  ```return 0``` in unreachable

  !image-2024-04-29-00-38-29-717.png!

2) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-42-42-738.png!

3) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-42-09-598.png!

4) the line with  ```return 0``` in unreachable

!image-2024-04-29-00-43-17-889.png!

5) the line with  ```return (short) (getByte(index) & 0xFF)``` in unreachable

!image-2024-04-29-00-45-35-605.png!

6) the line with  ```return getShort(index) & 0x``` in unreachable

!image-2024-04-29-00-46-36-280.png!

7) the line with  ```return getInt(index) & 0xL``` in unreachable

!image-2024-04-29-00-48-23-220.png!

8) the line with  ```dst[i] = getByte(index++)``` in unreachable

!image-2024-04-29-00-50-16-576.png!

9) the line with  ```dst.writerIndex(dst.writerIndex() + length)``` in 
unreachable

!image-2024-04-29-00-52-04-906.png!

10) the line with  ```return (char) getShort(index)``` in unreachable

!image-2024-04-29-00-54-09-929.png!

11) the line with  ```return Double.longBitsToDouble(getLong(index))``` in 
unreachable

!image-2024-04-29-00-55-27-169.png!

12) the line with  ```return Float.intBitsToFloat(getInt(index));``` in 
unreachable

!image-2024-04-29-00-57-19-800.png!

 

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

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


> UNREACHABLE_CODE.EXCEPTION This statement in the source code is unreachable
> ---
>
> Key: ARTEMIS-4747
> URL: https://issues.apache.org/jira/browse/ARTEMIS-4747
> Project: ActiveMQ Artemis
>  Issue Type: Bug
>  Components: ActiveMQ-Artemis-Native
>Affects Versions: 2.25.0
>Reporter: Andrey Slepykh
>Assignee: Clebert Suconic
>Priority: Major
> Attachments: image-2024-04-29-00-32-18-126.png, 
> image-2024-04-29-00-38-29-717.png, image-2024-04-29-00-40-51-302.png, 
> image-2024-04-29-00-42-09-598.png, image-2024-04-29-00-42-42-738.png, 
> image-2024-04-29-00-43-17-88

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

2024-04-28 Thread Andrey Slepykh (Jira)


 [ 
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 (fvv22u...@student.bmstu.ru)

 

  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 (fvv22u...@student.bmstu.ru)
>  



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


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

2024-04-28 Thread Justin Bertram (Jira)


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

Justin Bertram resolved ARTEMIS-4746.
-
Resolution: Fixed

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



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


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

2024-04-28 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841773#comment-17841773
 ] 

ASF subversion and git services commented on ARTEMIS-4746:
--

Commit b50f01b02b4c829e7330980837629951eeafb304 in activemq-artemis's branch 
refs/heads/main from Clebert Suconic
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=b50f01b02b ]

ARTEMIS-4746 Simplifying switch case on JMSExceptionHelper


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



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


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

2024-04-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4746?focusedWorklogId=916776&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-916776
 ]

ASF GitHub Bot logged work on ARTEMIS-4746:
---

Author: ASF GitHub Bot
Created on: 28/Apr/24 20:42
Start Date: 28/Apr/24 20:42
Worklog Time Spent: 10m 
  Work Description: jbertram merged PR #4908:
URL: https://github.com/apache/activemq-artemis/pull/4908




Issue Time Tracking
---

Worklog Id: (was: 916776)
Time Spent: 20m  (was: 10m)

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



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


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

2024-04-28 Thread Clebert Suconic (Jira)


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

Clebert Suconic updated ARTEMIS-4746:
-
  Component/s: Broker
   (was: ActiveMQ-Artemis-Native)
Fix Version/s: 2.34.0
Affects Version/s: 2.33.0
   (was: 2.25.0)
 Priority: Trivial  (was: Major)

> 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: 10m
>  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)


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

2024-04-28 Thread Clebert Suconic (Jira)


[ 
https://issues.apache.org/jira/browse/ARTEMIS-4746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17841691#comment-17841691
 ] 

Clebert Suconic commented on ARTEMIS-4746:
--

PR: https://github.com/apache/activemq-artemis/pull/4908

> 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: 10m
>  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)


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

2024-04-28 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/ARTEMIS-4746?focusedWorklogId=916773&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-916773
 ]

ASF GitHub Bot logged work on ARTEMIS-4746:
---

Author: ASF GitHub Bot
Created on: 28/Apr/24 18:32
Start Date: 28/Apr/24 18:32
Worklog Time Spent: 10m 
  Work Description: clebertsuconic opened a new pull request, #4908:
URL: https://github.com/apache/activemq-artemis/pull/4908

   (no comment)




Issue Time Tracking
---

Worklog Id: (was: 916773)
Remaining Estimate: 0h
Time Spent: 10m

> 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
>
>  Time Spent: 10m
>  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)


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

2024-04-28 Thread Andrey Slepykh (Jira)


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

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)


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

2024-04-28 Thread Andrey Slepykh (Jira)


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

 

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


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

2024-04-28 Thread Andrey Slepykh (Jira)


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

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]

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: 

 # case INTERNAL_ERROR: 

 # case NOT_CONNECTED:

b)```

   1. {{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]
> 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)


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

2024-04-28 Thread Andrey Slepykh (Jira)


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


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

2024-04-28 Thread Andrey Slepykh (Jira)


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

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: 

 # case INTERNAL_ERROR: 

 # case NOT_CONNECTED:

b)```

   1. {{case ILLEGAL_STATE:}}

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

   3. {{ case UNSUPPORTED_PACKET```}}

c) ```

   1. {{case QUEUE_DOES_NOT_EXIST:}}

{{}}   2. {{case QUEUE_EXISTS:}} ```

 


{{}}

 

{{{}{}}}{{{}{}}}

 

{{}}

 

 

 

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

 


> 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]
> 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: 
>  # case INTERNAL_ERROR: 
>  # case NOT_CONNECTED:
> b)```
>    1. {{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)


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

2024-04-28 Thread Andrey Slepykh (Jira)


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

Andrey Slepykh updated ARTEMIS-4746:

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

 

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

 

 


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



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


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

2024-04-28 Thread Andrey Slepykh (Jira)


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

Andrey Slepykh updated ARTEMIS-4746:

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

 

 

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


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



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


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

2024-04-28 Thread Andrey Slepykh (Jira)


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

Andrey Slepykh updated ARTEMIS-4746:

Attachment: Screenshot from 2024-04-28 17-46-07.png

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



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


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

2024-04-28 Thread Andrey Slepykh (Jira)
Andrey Slepykh created ARTEMIS-4746:
---

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


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



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