fix for reopened bug 62745.
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/EclipseBundleListener.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/EclipseBundleListener.java
index 23b8a3a..de99ca0 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/EclipseBundleListener.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/registry/EclipseBundleListener.java
@@ -13,9 +13,9 @@
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
import org.eclipse.core.internal.runtime.*;
-import org.eclipse.core.internal.runtime.InternalPlatform;
-import org.eclipse.core.internal.runtime.Policy;
import org.eclipse.core.runtime.*;
import org.osgi.framework.*;
import org.xml.sax.InputSource;
@@ -29,7 +29,7 @@
* points, we need to ensure that they are in the registry before the
* bundle start is called. By listening sync we are able to ensure that
* happens.
- */
+ */
public class EclipseBundleListener implements SynchronousBundleListener {
private static final String PLUGIN_MANIFEST = "plugin.xml"; //$NON-NLS-1$
private static final String FRAGMENT_MANIFEST = "fragment.xml"; //$NON-NLS-1$
@@ -128,7 +128,13 @@
try {
String message = Policy.bind("parse.problems", bundle.getLocation()); //$NON-NLS-1$
MultiStatus problems = new MultiStatus(Platform.PI_RUNTIME, ExtensionsParser.PARSE_PROBLEM, message, null); //$NON-NLS-1$
- Namespace bundleModel = new ExtensionsParser(problems).parseManifest(new InputSource(is), manifestType, manifestName, ResourceTranslator.getResourceBundle(bundle));
+ ResourceBundle b = null;
+ try {
+ b = ResourceTranslator.getResourceBundle(bundle);
+ } catch (MissingResourceException e) {
+ //Ignore the exception
+ }
+ Namespace bundleModel = new ExtensionsParser(problems).parseManifest(new InputSource(is), manifestType, manifestName, b);
bundleModel.setUniqueIdentifier(bundle.getSymbolicName());
bundleModel.setBundle(bundle);
if (isFragment) {
diff --git a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/ResourceTranslator.java b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
index a4c6834..9aa0e52 100644
--- a/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
+++ b/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime/ResourceTranslator.java
@@ -63,16 +63,9 @@
localizationServiceReference = null;
}
- public static ResourceBundle getResourceBundle(Bundle bundle) {
- if (hasRuntime21(bundle)) {
- try {
- // TODO the resource need not be named "plugin". In the case of fragments it is "fragment"
- return ResourceBundle.getBundle("plugin", Locale.getDefault(), createTempClassloader(bundle)); //$NON-NLS-1$
- } catch (MissingResourceException e) {
- // the resource need not exist. return null if it is not found
- return null;
- }
- }
+ public static ResourceBundle getResourceBundle(Bundle bundle) throws MissingResourceException {
+ if (hasRuntime21(bundle))
+ return ResourceBundle.getBundle("plugin", Locale.getDefault(), createTempClassloader(bundle)); //$NON-NLS-1$
return localizationService.getLocalization(bundle, null);
}
@@ -117,7 +110,7 @@
ManifestElement[] classpathElements;
try {
classpathElements = ManifestElement.parseHeader(Constants.BUNDLE_CLASSPATH, (String) b.getHeaders("").get(Constants.BUNDLE_CLASSPATH)); //$NON-NLS-1$
- if(classpathElements == null)
+ if (classpathElements == null)
return;
for (int i = 0; i < classpathElements.length; i++) {
URL classpathEntry = b.getEntry(classpathElements[i].getValue());