naren2605 opened a new issue, #8483:
URL: https://github.com/apache/netbeans/issues/8483

   ### Apache NetBeans version
   
   Apache NetBeans 25
   
   ### What happened
   
   formatter is altering content  as pointed in 
[jvsce-issue](https://github.com/oracle/javavscode/issues/396)
   
   attaching additional cases for reference 
   
   
![Image](https://github.com/user-attachments/assets/cb599aa6-0599-4f2f-8366-16319875d9dc)
   
   ### Language / Project Type / NetBeans Component
   
   _No response_
   
   ### How to reproduce
   
   open java file sample as below and format document 
   
   `
   /*
    * Click 
nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change 
this license
    */
   
   package com.mycompany.formatting.issue;
   
   /**
    *
    * @author nbalyamm
    */
   public class FormattingIssue {
   
       public static void main(String[] args) {
           System.out.println("Hello World!");
       }
       
       public void case1(){
           if ("foo".contains("bar"))))) )))  {
                                   System.out.println("bar");
                       }
           
       }
       
       public void case2(){
           
           if ("foo".contains("bar"))))) )))
           
       }
       
       public void case3(){
           if ("foo".contains("bar"))))) ))) 
                    else {
                          System.out.println("bar2")
                       }
       }
   }
   
   
   `
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   macos
   
   ### JDK
   
   jdk24
   
   ### Apache NetBeans packaging
   
   Apache NetBeans platform
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   Yes


-- 
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-unsubscr...@netbeans.apache.org.apache.org

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


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