Skip to content

Commit

Permalink
fix: unable to access java.lang in JDK 11 version
Browse files Browse the repository at this point in the history
Signed-off-by: chenlang <chenlang02@100.me>
  • Loading branch information
chenlang authored and tiny-x committed May 12, 2023
1 parent 5fe4302 commit 15b1a34
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,9 @@ public String inferBinaryName(Location location, JavaFileObject file) {
@Override
public Iterable<JavaFileObject> list(Location location, String packageName, Set<Kind> kinds, boolean recurse)
throws IOException {
if (location == StandardLocation.PLATFORM_CLASS_PATH) {
if (location.getName().contains("SYSTEM_MODULES") && location.getName().contains("java.base")){
return super.list(location, packageName, kinds, recurse);
} else if (location == StandardLocation.PLATFORM_CLASS_PATH) {
return super.list(location, packageName, kinds, recurse);
} else if (location == StandardLocation.CLASS_PATH && kinds.contains(JavaFileObject.Kind.CLASS)) {
if (packageName.startsWith("java")) {
Expand Down

0 comments on commit 15b1a34

Please sign in to comment.