javavscode icon indicating copy to clipboard operation
javavscode copied to clipboard

Unwanted import added on save

Open chriskriel opened this issue 1 year ago • 0 comments

I have a class called SecurityManager. The issue currently appears to be limited to this specific class-name. Class X, for example, does not trigger the same behaviour.

package package1;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

public class SecurityManager {
    private static final Logger logger = LogManager.getLogger(SecurityManager.class);
}

As soon as I save it an import is added automatically and the extension shows a warning Import From The Same Package. After save the class looks like this:

package package1;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import package1.SecurityManager;

public class SecurityManager {
    private static final Logger logger = LogManager.getLogger(SecurityManager.class);
}

chriskriel avatar Jul 25 '24 12:07 chriskriel