Closed
Description
Apache NetBeans version
Apache NetBeans 25
What happened
formatter is altering content as pointed in jvsce-issue
attaching additional cases for reference
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