aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Ross2011-11-18 13:25:33 (EST)
committerJohn Ross2011-11-18 13:26:35 (EST)
commiteeb130d28cd0fdaa277aee16b737d515c36ac742 (patch)
tree1315185f333243aadbdcde61d825633ccea05d86
parent1d478e3bff188ccbed8408fa8d12985ea7e02e1a (diff)
downloadrt.equinox.bundles-eeb130d28cd0fdaa277aee16b737d515c36ac742.zip
rt.equinox.bundles-eeb130d28cd0fdaa277aee16b737d515c36ac742.tar.gz
rt.equinox.bundles-eeb130d28cd0fdaa277aee16b737d515c36ac742.tar.bz2
Bug 363374: Bundle.findEntries used instead of BundleWiring.findEntries.
-rw-r--r--bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java10
1 files changed, 3 insertions, 7 deletions
diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java
index 66d518b..757b02e 100644
--- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java
+++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeProviderImpl.java
@@ -10,12 +10,11 @@
*******************************************************************************/
package org.eclipse.equinox.metatype.impl;
-import org.eclipse.equinox.metatype.EquinoxObjectClassDefinition;
-
import java.io.IOException;
import java.net.URL;
import java.util.*;
import javax.xml.parsers.SAXParser;
+import org.eclipse.equinox.metatype.EquinoxObjectClassDefinition;
import org.eclipse.osgi.util.NLS;
import org.osgi.framework.Bundle;
import org.osgi.framework.Constants;
@@ -87,14 +86,11 @@ public class MetaTypeProviderImpl implements MetaTypeProvider {
* @throws IOException If there are errors accessing the metadata.xml file
*/
private boolean readMetaFiles(Bundle bundle, SAXParser saxParser) {
- BundleWiring wiring = bundle.adapt(BundleWiring.class);
- if (wiring == null)
- return false;
- List<URL> entries = wiring.findEntries(MetaTypeService.METATYPE_DOCUMENTS_LOCATION, "*", 0); //$NON-NLS-1$
+ Enumeration<URL> entries = bundle.findEntries(MetaTypeService.METATYPE_DOCUMENTS_LOCATION, "*", false); //$NON-NLS-1$
if (entries == null)
return false;
boolean result = false;
- for (URL entry : entries) {
+ for (URL entry : Collections.list(entries)) {
if (entry.getPath().endsWith("/")) //$NON-NLS-1$
continue;
DataParser parser = new DataParser(bundle, entry, saxParser, logger);