You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by GitBox <gi...@apache.org> on 2021/09/13 03:51:52 UTC

[GitHub] [netbeans] singh-akhilesh commented on a change in pull request #3007: [NETBEANS-5799] : Add support for Pattern Matching for switch (Preview)

singh-akhilesh commented on a change in pull request #3007:
URL: https://github.com/apache/netbeans/pull/3007#discussion_r706986588



##########
File path: java/java.source.base/src/org/netbeans/modules/java/source/save/Reformatter.java
##########
@@ -2809,6 +2815,41 @@ private Boolean scanBindingPattern(Tree node, Void p) {
             return true;
         }
 
+        private Boolean scanGuardedPattern(Tree node, Void p) {
+            try {
+                Tree gpt = TreeShims.getGuardedPattern(node);
+                if (gpt != null) {
+                    Name name = TreeShims.getBinding(gpt);

Review comment:
       Addressed code review comment. Added code to handle  ---- case (String s) && s.<any> -> stmt;




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