javavscode icon indicating copy to clipboard operation
javavscode copied to clipboard

Duplication of "--enable-preview" tag in pom.xml

Open subhash-arabhi opened this issue 1 year ago • 0 comments

Error

The enable-preview tag that has been added using extension quick fix is getting duplicated on subsequent operations such as run main, create tests etc

Steps to Reproduce

  1. Create an new Maven project or use an existing one
  2. Use a preview feature, If you are using jdk22 you can use the below code
public class Test6 {
    Test6(){
        int i = 1;
        super();
    }
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
} 
  1. Use QuickAction Enable Preview to add CompilerArgs to your pom file
  2. Now Run Main or Create Tests to see another enable preview arg added to your pom file
  3. It only happens when you use QuickAction, No issues found If you manually edit your pom

subhash-arabhi avatar Sep 19 '24 07:09 subhash-arabhi