Skip to content
This repository has been archived by the owner on Feb 25, 2023. It is now read-only.

Commit

Permalink
Fixed: ProviderNotFoundException in JRTIndex.<init>
Browse files Browse the repository at this point in the history
  • Loading branch information
itsaky committed Oct 7, 2022
1 parent ffa1f64 commit 90ddc61
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@
import javax.tools.FileObject;

import com.itsaky.androidide.config.JavacConfigProvider;
import com.itsaky.androidide.zipfs2.AndroidFsProvider;
import com.sun.tools.javac.file.RelativePath.RelativeDirectory;
import com.sun.tools.javac.util.Context;
import com.sun.tools.javac.util.PlatformUtils;

/**
* A package-oriented index into the jrt: filesystem.
Expand Down Expand Up @@ -182,7 +184,11 @@ public String toString() {
* Create and initialize the index.
*/
private JRTIndex() throws IOException {
jrtfs = FileSystems.getFileSystem(URI.create("jrt:/"));
if (PlatformUtils.isAndroid()) {
jrtfs = AndroidFsProvider.INSTANCE.jrtFileSystem();
} else {
jrtfs = FileSystems.getFileSystem(URI.create("jrt:/"));
}
entries = new HashMap<>();
}

Expand Down

0 comments on commit 90ddc61

Please sign in to comment.