modules/fxpackager/src/main/java/com/oracle/tools/packager/AbstractBundler.java

Print this page

        

@@ -32,11 +32,10 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
 import java.text.MessageFormat;
 import java.util.*;
-import java.util.regex.Pattern;
 
 public abstract class AbstractBundler implements Bundler {
 
     private static final ResourceBundle I18N =
             ResourceBundle.getBundle(AbstractBundler.class.getName());

@@ -53,27 +52,10 @@
     // we use it for classpath lookup and there / are not platform specific
     public final static String BUNDLER_PREFIX = "package/";
 
     protected Class baseResourceLoader = null;
     
-    //helper method to test if required files are present in the runtime
-    public void testRuntime(RelativeFileSet runtime, String[] file) throws ConfigException {
-        if (runtime == null) {
-            return; //null runtime is ok (request to use system)
-        }
-
-        Pattern[] weave = Arrays.stream(file).map(Pattern::compile).toArray(Pattern[]::new);
-
-        if (!runtime.getIncludedFiles().stream().anyMatch(s ->
-                Arrays.stream(weave).anyMatch(pattern -> pattern.matcher(s).matches())
-        )) {
-            throw new ConfigException(
-                    MessageFormat.format(I18N.getString("error.jre-missing-file"), Arrays.toString(file)),
-                    I18N.getString("error.jre-missing-file.advice"));
-        }
-    }
-
     protected void fetchResource(
             String publicName, String category,
             String defaultName, File result, boolean verbose, File publicRoot)
             throws IOException {
         URL u = locateResource(publicName, category, defaultName, verbose, publicRoot);