scala-ide/scala-ide — comment on commit f71ac73714894fed873aa7934970b3197ceef935
File: org.scala-ide.sdt.aspects/src/scala/tools/eclipse/contribution/weaving/jdt/jcompiler/BuildManagerStore.java line 38
By froden:

If I have a maven project with a parent pom and several submodules and import it using m2e I get one project for each of the submodules plus a project for the parent pom. If I haven't checked the "Hide folders of physically nested modules (experimental)" maven setting, this project contains all the files from the other modules.

In this case workspaceRoot.findFilesForLocationURI(file.toURI()) always returns two files, one from the parent project and one from the actual project where the source folder is. The parent relative file is (in my case) listed first and causes a NPE later (see other comment).

Example:
workspaceRoot.findFilesForLocationURI(file.toURI()) gives
[L/parent/web-server/src/test/java/org/apache/commons/httpclient/contrib/ssl/EasyX509TrustManager.java, L/web-server/src/test/java/org/apache/commons/httpclient/contrib/ssl/EasyX509TrustManager.java]