/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
/** * Closes all the classpath entry resources for this FragmentClasspath. * */ public void close() { for (int i = 0; i < entries.length; i++) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } }
/** * Checks if the zip file is open * @return true if the zip file is open */ protected boolean checkedOpen() { try { return getZipFile() != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Checks if the zip file is open * @return true if the zip file is open */ protected boolean checkedOpen() { try { return getZipFile() != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Checks if the zip file is open * @return true if the zip file is open */ protected boolean checkedOpen() { try { return getZipFile() != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Checks if the zip file is open * @return true if the zip file is open */ protected boolean checkedOpen() { try { return getZipFile() != null; } catch (IOException e) { if (generation != null) { ModuleRevision r = generation.getRevision(); if (r != null) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, r.getRevisions().getModule(), e); } } // TODO not sure if throwing a runtime exception is better // throw new RuntimeException("Failed to open bundle file.", e); return false; } }
/** * Closes all the classpath entry resources for this classpath manager. * */ public void close() { for (int i = 0; i < entries.length; i++) { if (entries[i] != null) { try { entries[i].close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } } FragmentClasspath[] currentFragments = getFragmentClasspaths(); for (int i = 0; i < currentFragments.length; i++) currentFragments[i].close(); }
/** * Finds all the ClasspathEntry objects for the requested classpath. This method will first call all * the configured class loading hooks {@link ClassLoaderHook#addClassPathEntry(ArrayList, String, ClasspathManager, Generation)} * methods. This allows class loading hooks to add additional ClasspathEntry objects to the result for the * requested classpath. Then the local host classpath entries and attached fragment classpath entries are * searched. * @param result a list of ClasspathEntry objects. This list is used to add new ClasspathEntry objects to. * @param cp the requested classpath. * @param hostloader the host classpath manager for the classpath * @param sourceGeneration the source generation to search for the classpath */ private void findClassPathEntry(ArrayList<ClasspathEntry> result, String cp, ClasspathManager hostloader, Generation sourceGeneration) { List<ClassLoaderHook> loaderHooks = hookRegistry.getClassLoaderHooks(); boolean hookAdded = false; for (ClassLoaderHook hook : loaderHooks) { hookAdded |= hook.addClassPathEntry(result, cp, hostloader, sourceGeneration); } if (!addClassPathEntry(result, cp, hostloader, sourceGeneration) && !hookAdded) { BundleException be = new BundleException(NLS.bind(Msg.BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION, cp, sourceGeneration.getRevision().toString()), BundleException.MANIFEST_ERROR); sourceGeneration.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.INFO, sourceGeneration.getRevision().getRevisions().getModule(), be); } }
/** * Finds all the ClasspathEntry objects for the requested classpath. This method will first call all * the configured class loading hooks {@link ClassLoaderHook#addClassPathEntry(ArrayList, String, ClasspathManager, Generation)} * methods. This allows class loading hooks to add additional ClasspathEntry objects to the result for the * requested classpath. Then the local host classpath entries and attached fragment classpath entries are * searched. * @param result a list of ClasspathEntry objects. This list is used to add new ClasspathEntry objects to. * @param cp the requested classpath. * @param hostloader the host classpath manager for the classpath * @param sourceGeneration the source generation to search for the classpath */ private void findClassPathEntry(ArrayList<ClasspathEntry> result, String cp, ClasspathManager hostloader, Generation sourceGeneration) { List<ClassLoaderHook> loaderHooks = hookRegistry.getClassLoaderHooks(); boolean hookAdded = false; for (ClassLoaderHook hook : loaderHooks) { hookAdded |= hook.addClassPathEntry(result, cp, hostloader, sourceGeneration); } if (!addClassPathEntry(result, cp, hostloader, sourceGeneration) && !hookAdded) { BundleException be = new BundleException(NLS.bind(Msg.BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION, cp, sourceGeneration.getRevision().toString()), BundleException.MANIFEST_ERROR); sourceGeneration.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.INFO, sourceGeneration.getRevision().getRevisions().getModule(), be); } }
/** * Finds all the ClasspathEntry objects for the requested classpath. This method will first call all * the configured class loading hooks {@link ClassLoaderHook#addClassPathEntry(ArrayList, String, ClasspathManager, Generation)} * methods. This allows class loading hooks to add additional ClasspathEntry objects to the result for the * requested classpath. Then the local host classpath entries and attached fragment classpath entries are * searched. * @param result a list of ClasspathEntry objects. This list is used to add new ClasspathEntry objects to. * @param cp the requested classpath. * @param hostloader the host classpath manager for the classpath * @param sourceGeneration the source generation to search for the classpath */ private void findClassPathEntry(ArrayList<ClasspathEntry> result, String cp, ClasspathManager hostloader, Generation sourceGeneration) { List<ClassLoaderHook> loaderHooks = hookRegistry.getClassLoaderHooks(); boolean hookAdded = false; for (ClassLoaderHook hook : loaderHooks) { hookAdded |= hook.addClassPathEntry(result, cp, hostloader, sourceGeneration); } if (!addClassPathEntry(result, cp, hostloader, sourceGeneration) && !hookAdded) { BundleException be = new BundleException(NLS.bind(Msg.BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION, cp, sourceGeneration.getRevision().toString()), BundleException.MANIFEST_ERROR); sourceGeneration.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.INFO, sourceGeneration.getRevision().getRevisions().getModule(), be); } }
/** * Finds all the ClasspathEntry objects for the requested classpath. This method will first call all * the configured class loading hooks {@link ClassLoaderHook#addClassPathEntry(ArrayList, String, ClasspathManager, Generation)} * methods. This allows class loading hooks to add additional ClasspathEntry objects to the result for the * requested classpath. Then the local host classpath entries and attached fragment classpath entries are * searched. * @param result a list of ClasspathEntry objects. This list is used to add new ClasspathEntry objects to. * @param cp the requested classpath. * @param hostloader the host classpath manager for the classpath * @param sourceGeneration the source generation to search for the classpath */ private void findClassPathEntry(ArrayList<ClasspathEntry> result, String cp, ClasspathManager hostloader, Generation sourceGeneration) { List<ClassLoaderHook> loaderHooks = hookRegistry.getClassLoaderHooks(); boolean hookAdded = false; for (ClassLoaderHook hook : loaderHooks) { hookAdded |= hook.addClassPathEntry(result, cp, hostloader, sourceGeneration); } if (!addClassPathEntry(result, cp, hostloader, sourceGeneration) && !hookAdded) { BundleException be = new BundleException(NLS.bind(Msg.BUNDLE_CLASSPATH_ENTRY_NOT_FOUND_EXCEPTION, cp, sourceGeneration.getRevision().toString()), BundleException.MANIFEST_ERROR); sourceGeneration.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.INFO, sourceGeneration.getRevision().getRevisions().getModule(), be); } }
/** * Closes all the classpath entry resources for this classpath manager. * */ public void close() { for (int i = 0; i < entries.length; i++) { if (entries[i] != null) { try { entries[i].close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } } FragmentClasspath[] currentFragments = getFragmentClasspaths(); for (int i = 0; i < currentFragments.length; i++) currentFragments[i].close(); }
/** * Closes all the classpath entry resources for this classpath manager. * */ public void close() { for (int i = 0; i < entries.length; i++) { if (entries[i] != null) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } } FragmentClasspath[] currentFragments = getFragmentClasspaths(); for (int i = 0; i < currentFragments.length; i++) currentFragments[i].close(); }
/** * Closes all the classpath entry resources for this classpath manager. * */ public void close() { for (int i = 0; i < entries.length; i++) { if (entries[i] != null) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } } FragmentClasspath[] currentFragments = getFragmentClasspaths(); for (int i = 0; i < currentFragments.length; i++) currentFragments[i].close(); }
/** * Closes all the classpath entry resources for this classpath manager. * */ public void close() { for (int i = 0; i < entries.length; i++) { if (entries[i] != null) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } } FragmentClasspath[] currentFragments = getFragmentClasspaths(); for (int i = 0; i < currentFragments.length; i++) currentFragments[i].close(); }
/** * Closes all the classpath entry resources for this classpath manager. * */ public void close() { for (int i = 0; i < entries.length; i++) { if (entries[i] != null) { try { entries[i].getBundleFile().close(); } catch (IOException e) { generation.getBundleInfo().getStorage().getAdaptor().publishContainerEvent(ContainerEvent.ERROR, generation.getRevision().getRevisions().getModule(), e); } } } FragmentClasspath[] currentFragments = getFragmentClasspaths(); for (int i = 0; i < currentFragments.length; i++) currentFragments[i].close(); }