arusinha commented on a change in pull request #1126: [NETBEANS-1675]Java Hint 
to fix error :different case kinds used in s…
URL: 
https://github.com/apache/incubator-netbeans/pull/1126#discussion_r258011913
 
 

 ##########
 File path: 
java/java.source.base/src/org/netbeans/modules/java/source/pretty/VeryPretty.java
 ##########
 @@ -1436,13 +1437,16 @@ public void visitExec(JCExpressionStatement tree) {
 
     @Override
     public void visitBreak(JCBreak tree) {
-       print("break");
-        //TODO: value breaks
-       if (tree.getLabel() != null) {
-           needSpace();
-           print(tree.getLabel());
-       }
-       print(';');
+        print("break");
+        if (TreeShims.getValue(tree) != null) {
+            needSpace();
+            print((JCTree) TreeShims.getValue(tree));
+        }
+        if (tree.getLabel() != null) {
 
 Review comment:
   should it not be else if (tree.getLabel() != null).
   Also tree.getLabel() and TreeShims.getValue(tree)  can be stored as 
variables and can be reused

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

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

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

Reply via email to