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

ASF GitHub Bot logged work on KNOX-3236:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Jan/26 20:10
            Start Date: 06/Jan/26 20:10
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on code in PR #1135:
URL: https://github.com/apache/knox/pull/1135#discussion_r2666150812


##########
gateway-service-knoxtoken/src/test/java/org/apache/knox/gateway/service/knoxtoken/TokenServiceResourceTest.java:
##########
@@ -1689,19 +1689,12 @@ private Map.Entry<TestTokenStateService, Response> 
doTestTokenLifecyle(final Tok
     final TokenResource tr = new TokenResource();
     final String accessToken = getAccessToken(tr);
 
-    Response response;
-    switch (operation) {
-      case Renew:
-        response = requestTokenRenewal(tr, accessToken, caller);
-        break;
-      case Revoke:
-        response = requestTokenRevocation(tr, accessToken, caller);
-        break;
-      default:
-        throw new Exception("Invalid operation: " + operation);

Review Comment:
   Based on the current state of the code, I believe it's ok. As the switch 
statement covers both existing operations, the previous default case is 
redundant. The only difference is that now PMD signals it.
   Even in previous versions, it was impossible to see that exception.





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

    Worklog Id:     (was: 998858)
    Time Spent: 1h 40m  (was: 1.5h)

> Upgrade Maven PMD plugin to 3.28.0
> ----------------------------------
>
>                 Key: KNOX-3236
>                 URL: https://issues.apache.org/jira/browse/KNOX-3236
>             Project: Apache Knox
>          Issue Type: Task
>          Components: Build
>    Affects Versions: 2.1.0, 3.0.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Critical
>             Fix For: 3.0.0
>
>         Attachments: image-2026-01-06-13-56-44-933.png
>
>          Time Spent: 1h 40m
>  Remaining Estimate: 0h
>
> I noticed that my build occasionally hanging here:
> {code:java}
> [INFO] --- pmd:3.26.0:pmd (pmd) @ gateway-provider-security-shiro ---
> [INFO] PMD version: 7.7.0 {code}
> The last time it happened I got a thread dump (see attachment) which 
> confirmed my suspicion that PMD indeed has an intermittent issue running on 
> multiple threads.
> I also found this bug of theirs: [https://github.com/pmd/pmd/issues/5293]
> So, I checked and found that the latest Maven PMD plugin version, 3.28.0, 
> comes with PMD 7.17.0, where this issue is resolved.
> !image-2026-01-06-13-56-44-933.png|height=400!



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

Reply via email to