TFyre opened a new issue, #7073: URL: https://github.com/apache/netbeans/issues/7073
### Apache NetBeans version Apache NetBeans 20 ### What happened Looks like "Fix All Imports" imports invalid static methods when the method name matches an existing import's root package.  ### Language / Project Type / NetBeans Component Java Maven Application ### How to reproduce Create Maven Application and set source to 17 or 21 (works fine with 8): pom.xml: ```xml <maven.compiler.source>21</maven.compiler.source> ``` NewClass.java ```java package com.tfyre.test; import java.util.List; import javax.xml.parsers.DocumentBuilder; import org.xml.sax.InputSource; public class NewClass { private List<String> list; private DocumentBuilder foo; private InputSource is; public static class SomeClass2 { public static String java(String value) { return value; } public static String javax(String value) { return value; } public static String org(String value) { return value; } } } ``` ```shell java -version openjdk version "21.0.2" 2024-01-16 LTS OpenJDK Runtime Environment Zulu21.32+17-CA (build 21.0.2+13-LTS) OpenJDK 64-Bit Server VM Zulu21.32+17-CA (build 21.0.2+13-LTS, mixed mode, sharing) ``` ### Did this work correctly in an earlier version? Apache NetBeans 19 ### Operating System Windows ### JDK Zulu21.32+17-CA ### Apache NetBeans packaging Apache NetBeans binary zip ### Anything else Every time ### 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
