This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Created attachment 149013 [details] sample project I created a maven project which contains interfaces of the original java classes in the folder src/main/resources/java/ (e.g. src/main/resources/java/lang/Iterable.java). Now Netbeans thinks I want to use this files instead of the original java classes. Means that it warns for compiler errors (in this case the Iterable in the resource folder is not generic, but in my source code I use the original generic version). At my point of view Netbeans should ignore the files in resources/java instead of compiling them and use them like they would be classes in src/main/java. Before somebody asks: I really need this interfaces at this place, because they represent a subset of Java (JavaCard) which I need as resources in my program. I added a sample project as attachment to show the bug.
reassigning for further evaluation
Ouch; I believe that Maven does not other choice than put the resources folder onto SOURCE classpath, which is then read by parser/indexer and scanned for presence of .java files ... The indexer process all text/x-java on the SOURCE classpath, regardless whether the path item is hinted as SOURCES_TYPE_JAVA or SOURCES_TYPE_RESOURCES Tomasi, could it be the cause ?
Yes, the java knows nothing about the SOURCES_TYPE_JAVA or SOURCES_TYPE_RESOURCES hints. It uses ClassPath (sourcepath) and all roots on the source path are processed. As far as I know the resources are on source path in maven project.
I believe the issue should be solved (if it should be solved at all) in (maven) projects - so reassinging. IMHO we could just leave it as it is and document it as a known issue.
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss