--- old/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java 2017-02-08 11:44:11.385663898 -0800 +++ new/src/jdk.compiler/share/classes/com/sun/tools/javac/file/JavacFileManager.java 2017-02-08 11:44:11.237662786 -0800 @@ -980,7 +980,7 @@ public Location getLocationForModule(Location location, JavaFileObject fo, String pkgName) throws IOException { checkModuleOrientedOrOutputLocation(location); if (!(fo instanceof PathFileObject)) - throw new IllegalArgumentException(fo.getName()); + return null; int depth = 1; // allow 1 for filename if (pkgName != null && !pkgName.isEmpty()) { depth += 1;