< prev index next >

src/java.base/share/classes/jdk/internal/module/SystemModuleFinders.java

Print this page
@@ -55,10 +55,11 @@
  
  import jdk.internal.jimage.ImageReader;
  import jdk.internal.jimage.SystemImageReader;
  import jdk.internal.access.JavaNetUriAccess;
  import jdk.internal.access.SharedSecrets;
+ import jdk.internal.misc.PreviewFeatures;
  import jdk.internal.util.StaticProperty;
  import jdk.internal.module.ModuleHashes.HashSupplier;
  
  /**
   * The factory for SystemModules objects and for creating ModuleFinder objects

@@ -202,11 +203,11 @@
  
          // exploded build (do not cache module finder)
          Path dir = Path.of(home, "modules");
          if (!Files.isDirectory(dir))
              throw new InternalError("Unable to detect the run-time image");
-         return ModulePath.of(ModuleBootstrap.patcher(), dir);
+         return ModulePath.of(ModuleBootstrap.patcher(), PreviewFeatures.isEnabled(), dir);
      }
  
      /**
       * Parses the {@code module-info.class} of all modules in the runtime image and
       * returns a ModuleFinder to find the modules.
< prev index next >