private void refreshStaleBundles() throws BundleException { Collection<Module> needsRefresh = new ArrayList<>(0); // First uninstall any modules that had their content changed or deleted for (Module module : moduleContainer.getModules()) { if (module.getId() == Constants.SYSTEM_BUNDLE_ID) continue; ModuleRevision revision = module.getCurrentRevision(); Generation generation = (Generation) revision.getRevisionInfo(); if (needsDiscarding(generation)) { needsRefresh.add(module); moduleContainer.uninstall(module); generation.delete(); } } // Next check if we need to refresh Multi-Release Jar bundles // because the runtime version changed. if (refreshMRBundles.get()) { needsRefresh.addAll(refreshMRJarBundles()); } // refresh the modules that got deleted or are Multi-Release bundles if (!needsRefresh.isEmpty()) { moduleContainer.refresh(needsRefresh); } }
private void refreshStaleBundles() throws BundleException { Collection<Module> needsRefresh = new ArrayList<>(0); // First uninstall any modules that had their content changed or deleted for (Module module : moduleContainer.getModules()) { if (module.getId() == Constants.SYSTEM_BUNDLE_ID) continue; ModuleRevision revision = module.getCurrentRevision(); Generation generation = (Generation) revision.getRevisionInfo(); if (needsDiscarding(generation)) { needsRefresh.add(module); moduleContainer.uninstall(module); generation.delete(); } } // Next check if we need to refresh Multi-Release Jar bundles // because the runtime version changed. if (refreshMRBundles.get()) { needsRefresh.addAll(refreshMRJarBundles()); } // refresh the modules that got deleted or are Multi-Release bundles if (!needsRefresh.isEmpty()) { moduleContainer.refresh(needsRefresh); } }
private void discardBundlesOnLoad() throws BundleException { Collection<Module> discarded = new ArrayList<Module>(0); for (Module module : moduleContainer.getModules()) { if (module.getId() == Constants.SYSTEM_BUNDLE_ID) continue; ModuleRevision revision = module.getCurrentRevision(); Generation generation = (Generation) revision.getRevisionInfo(); if (needsDiscarding(generation)) { discarded.add(module); moduleContainer.uninstall(module); generation.delete(); } } if (!discarded.isEmpty()) { moduleContainer.refresh(discarded); } }
newGen.delete(); if (t instanceof SecurityException) {
newGen.delete(); if (t instanceof SecurityException) {
newGen.delete(); if (t instanceof SecurityException) {
newGen.delete(); if (t instanceof SecurityException) {
newGen.delete(); if (t instanceof SecurityException) {
newGen.delete(); if (t instanceof SecurityException) {
private void discardBundlesOnLoad() throws BundleException { Collection<Module> discarded = new ArrayList<Module>(0); for (Module module : moduleContainer.getModules()) { if (module.getId() == Constants.SYSTEM_BUNDLE_ID) continue; ModuleRevision revision = module.getCurrentRevision(); Generation generation = (Generation) revision.getRevisionInfo(); if (needsDiscarding(generation)) { discarded.add(module); moduleContainer.uninstall(module); generation.delete(); } } if (!discarded.isEmpty()) { moduleContainer.refresh(discarded); } }
private void discardBundlesOnLoad() throws BundleException { Collection<Module> discarded = new ArrayList<Module>(0); for (Module module : moduleContainer.getModules()) { if (module.getId() == Constants.SYSTEM_BUNDLE_ID) continue; ModuleRevision revision = module.getCurrentRevision(); Generation generation = (Generation) revision.getRevisionInfo(); if (needsDiscarding(generation)) { discarded.add(module); moduleContainer.uninstall(module); generation.delete(); } } if (!discarded.isEmpty()) { moduleContainer.refresh(discarded); } }
private void discardBundlesOnLoad() throws BundleException { Collection<Module> discarded = new ArrayList<Module>(0); for (Module module : moduleContainer.getModules()) { if (module.getId() == Constants.SYSTEM_BUNDLE_ID) continue; ModuleRevision revision = module.getCurrentRevision(); Generation generation = (Generation) revision.getRevisionInfo(); if (needsDiscarding(generation)) { discarded.add(module); moduleContainer.uninstall(module); generation.delete(); } } if (!discarded.isEmpty()) { moduleContainer.refresh(discarded); } }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }
@Override protected void cleanup(ModuleRevision revision) { Generation generation = (Generation) revision.getRevisionInfo(); generation.delete(); if (revision.equals(getCurrentRevision())) { // uninstall case generation.getBundleInfo().delete(); } } }