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

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

Commit 4c454e8abda2da77f8827810e7ac7367dde24aff in activemq-artemis's branch 
refs/heads/main from Justin Bertram
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=4c454e8abd ]

ARTEMIS-4747 remove unreachable code


> 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
>            Reporter: Andrey Slepykh
>            Assignee: Justin Bertram
>            Priority: Trivial
>         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) & 0xFFFF``` in unreachable
> !image-2024-04-29-00-46-36-280.png!
> 7) the line with  ```return getInt(index) & 0xFFFFFFFFL``` 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!



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@activemq.apache.org
For additional commands, e-mail: issues-h...@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact


Reply via email to