eclipse-jdt / eclipse.jdt.core

Eclipse Public License 2.0
156 stars 123 forks source link

EclipseFileManager doesn't properly handle `-extdirs` for target 8 #2755

Open iloveeclipse opened 1 month ago

iloveeclipse commented 1 month ago

Found during https://github.com/eclipse-jdt/eclipse.jdt.core/pull/2551.

org.eclipse.jdt.internal.compiler.tool.EclipseFileManager.handleOption(String, Iterator<String>) doesn't properly handle -extdirs argument (see added TODO).

The condition this.isOnJvm9 checks whether we run on Java 9 and the code will throw an error if -extdirs is given, however, if I understand it right, -extdirs is allowed with -target == 8 independently on which JVM we compile.