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

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

                Author: ASF GitHub Bot
            Created on: 02/May/24 19:03
            Start Date: 02/May/24 19:03
    Worklog Time Spent: 10m 
      Work Description: jbertram opened a new pull request, #4920:
URL: https://github.com/apache/activemq-artemis/pull/4920

   (no comment)




Issue Time Tracking
-------------------

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

> SIMILAR_BRANCHES.SWITCH in ../activemq/artemis/utils/ThreadDumpUtil.java
> ------------------------------------------------------------------------
>
>                 Key: ARTEMIS-4749
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4749
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>    Affects Versions: 2.25.0
>            Reporter: e.bykhanova
>            Priority: Minor
>         Attachments: image-2024-05-01-13-29-32-686.png, 
> image-2024-05-01-13-30-38-262.png
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The static analyzer has detected SIMILAR_BRANCHES.SWITCH: we have identical 
> branches in switch node in [private static String threadInfoToString] 
> [https://github.com/apache/activemq-artemis/blob/fb1b362b473cad51ae5d05a897be02b1fa8461d4/artemis-commons/src/main/java/org/apache/activemq/artemis/utils/ThreadDumpUtil.java#L106-L113|#L106-L113]
>  
> !image-2024-05-01-13-30-38-262.png|width=663,height=411!
>  
> It seems better to change code this way: 
>  
> {{case WAITING:}}
> {{case TIMED_WAITING:}}
> {{                  sb.append("\t-  waiting on " + 
> threadInfo.getLockInfo());}}
> {{                  sb.append('\n');}}
> {{                  break;}}
> {{               default:}}
>  
> Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
> Author E. Bykhanova (e.bykhan...@fobos-nt.ru).



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

Reply via email to