File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/main/java/io/quarkus/fs/util Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,20 @@ public class FileSystemProviders {
99 public static final FileSystemProvider ZIP_PROVIDER ;
1010 static {
1111 FileSystemProvider foundZipProvider = null ;
12+ final ClassLoader ccl = Thread .currentThread ().getContextClassLoader ();
13+ try {
14+ // We are loading "installed" FS providers that are loaded from from the system classloader anyway
15+ // To avoid potential ClassCastExceptions we are setting the context classloader to the system one
16+ Thread .currentThread ().setContextClassLoader (ClassLoader .getSystemClassLoader ());
17+ for (FileSystemProvider installedProvider : FileSystemProvider .installedProviders ()) {
18+ if (installedProvider .getScheme ().equals ("jar" )) {
19+ foundZipProvider = installedProvider ;
20+ break ;
21+ }
22+ }
23+ } finally {
24+ Thread .currentThread ().setContextClassLoader (ccl );
25+ }
1226 for (FileSystemProvider installedProvider : FileSystemProvider .installedProviders ()) {
1327 if (installedProvider .getScheme ().equals ("jar" )) {
1428 foundZipProvider = installedProvider ;
You can’t perform that action at this time.
0 commit comments