@@ -169,12 +169,12 @@ private static String absoluteResourcePath(String... components) {
169169 * Maps platform-specific paths to entries.
170170 */
171171 private final Map <String , BaseEntry > vfsEntries = new HashMap <>();
172-
173- /**
174- * Classloader used to read resources. By defaut, the classloader of
175- * VirtualFileSystem.class.
176- */
177- private final ClassLoader resourceClassLoader ;
172+
173+ /**
174+ * Classloader used to read resources. By defaut, the classloader of
175+ * VirtualFileSystem.class.
176+ */
177+ private final ClassLoader resourceClassLoader ;
178178
179179 static final String PLATFORM_SEPARATOR = Paths .get ("" ).getFileSystem ().getSeparator ();
180180 private static final char RESOURCE_SEPARATOR_CHAR = '/' ;
@@ -311,24 +311,26 @@ private void removeExtractDir() {
311311 */
312312 VirtualFileSystemImpl (Predicate <Path > extractFilter , Path mountPoint , String resourceDirectory , HostIO allowHostIO ,
313313 ClassLoader resourceClassLoader , boolean caseInsensitive ) {
314- if (resourceClassLoader != null ) {
315- this .resourceClassLoader = resourceClassLoader ;
316- } else {
317- this .resourceClassLoader = VirtualFileSystem .class .getClassLoader ();
318- }
314+ if (resourceClassLoader != null ) {
315+ this .resourceClassLoader = resourceClassLoader ;
316+ } else {
317+ this .resourceClassLoader = VirtualFileSystem .class .getClassLoader ();
318+ }
319319 this .caseInsensitive = caseInsensitive ;
320320 this .mountPoint = mountPoint ;
321321 this .mountPointLowerCase = mountPoint .toString ().toLowerCase (Locale .ROOT );
322322 this .vfsRoot = resourceDirectory == null ? DEFAULT_VFS_ROOT : resourceDirectory ;
323323 this .platformVenvPath = resourcePathToPlatformPath (absoluteResourcePath (vfsRoot , VFS_VENV ));
324324 this .platformSrcPath = resourcePathToPlatformPath (absoluteResourcePath (vfsRoot , VFS_SRC ));
325325
326- if (LOGGER .isLoggable (Level .FINE )) {
327- var classLoaderLabel = this .resourceClassLoader == VirtualFileSystem .class .getClassLoader () ? "VirtualFileSystem" : "custom" ;
328- fine ("VirtualFilesystem %s, allowHostIO: %s, resourceClassLoader: %s, caseInsensitive: %s, extractOnStartup: %s%s" ,
329- mountPoint , allowHostIO .toString (), classLoaderLabel , caseInsensitive ,
330- extractOnStartup , extractFilter != null ? "" : ", extractFilter: null" );
331- }
326+ if (LOGGER .isLoggable (Level .FINE )) {
327+ var classLoaderLabel = this .resourceClassLoader == VirtualFileSystem .class .getClassLoader ()
328+ ? "VirtualFileSystem"
329+ : "custom" ;
330+ fine ("VirtualFilesystem %s, allowHostIO: %s, resourceClassLoader: %s, caseInsensitive: %s, extractOnStartup: %s%s" ,
331+ mountPoint , allowHostIO .toString (), classLoaderLabel , caseInsensitive , extractOnStartup ,
332+ extractFilter != null ? "" : ", extractFilter: null" );
333+ }
332334 this .extractFilter = extractFilter ;
333335 if (extractFilter != null ) {
334336 try {
@@ -747,8 +749,7 @@ private void validateMultipleVFSLocations(List<URL> filelistUrls) {
747749 // by the Maven/Gradle plugin and should contain "pip freeze" of the venv
748750 ArrayList <URL > installedUrls ;
749751 try {
750- installedUrls = Collections .list (
751- resourceClassLoader .getResources (resourcePath (vfsRoot , INSTALLED_FILE )));
752+ installedUrls = Collections .list (resourceClassLoader .getResources (resourcePath (vfsRoot , INSTALLED_FILE )));
752753 } catch (IOException e ) {
753754 warn ("Cannot check compatibility of the merged virtual environments. Cannot read list of packages installed in the virtual environments. IOException: "
754755 + e .getMessage ());
@@ -792,8 +793,7 @@ private void validateMultipleVFSLocations(List<URL> filelistUrls) {
792793 // Check compatibility of GraalPy versions that were used to create the VFSs
793794 ArrayList <URL > contentsUrls ;
794795 try {
795- contentsUrls = Collections .list (
796- resourceClassLoader .getResources (resourcePath (vfsRoot , CONTENTS_FILE )));
796+ contentsUrls = Collections .list (resourceClassLoader .getResources (resourcePath (vfsRoot , CONTENTS_FILE )));
797797 } catch (IOException e ) {
798798 warn ("Cannot check compatibility of the merged virtual environments. Cannot read GraalPy version of the virtual environments. IOException: "
799799 + e .getMessage ());
0 commit comments