public static List<Bundle> getBundles(File bundleDir) {
        try {
            List<Bundle> bundles =  new ArrayList<>();
            for (File bundleFile : getBundleFiles(bundleDir)) {
                JarFile jarFile;
                try {
                    jarFile = new JarFile(bundleFile);
                } catch (ZipException e) {
                    throw new IllegalArgumentException("Error opening jar file '" + bundleFile.getName() +
                            "'. Please check that this is a valid jar file");
                }
                bundles.add(new Bundle(jarFile, bundleFile));
            }
            return bundles;
        } catch (IOException e) {
            throw new IllegalArgumentException(e);
        }
    }
A Bundle represents an OSGi bundle inside the model, and provides utilities
for accessing resources within that bundle.

@author Tony Vaagenes, Ulf Lilleengen
@since 5.1
config-application-package/src/main/java/com/yahoo/config/model/application/provider/Bundle.java