You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "lahodaj (via GitHub)" <gi...@apache.org> on 2025/08/06 11:49:36 UTC

Re: [PR] Refactoring class/record duplicates switch guard clause in case statements [netbeans]

lahodaj commented on code in PR #8591:
URL: https://github.com/apache/netbeans/pull/8591#discussion_r2256901042


##########
java/java.source.base/src/org/netbeans/modules/java/source/save/CasualDiff.java:
##########
@@ -2131,7 +2131,11 @@ protected int diffCase(JCCase oldT, JCCase newT, int[] bounds) {
         do { } while (tokenSequence.moveNext() && JavaTokenId.COLON != tokenSequence.token().id() && JavaTokenId.ARROW != tokenSequence.token().id());
         boolean reindentStatements = false;
         if (Objects.equals(oldT.getCaseKind(), newT.getCaseKind())) {
+            localPointer= tokenSequence.offset();

Review Comment:
   I'm sorry I wasn't very precise - I meant the above change is the only change needed in `CasualDiff`. The other changes (adjusting the `localPointer`) are not (I believe) needed.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists