summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDirk Fauth2013-11-28 02:39:09 (EST)
committer Dirk Fauth2013-11-28 02:39:09 (EST)
commit6a246a07d7060f4f85c2c2a1db3736dc0f4adeec (patch)
treeeac69740b6b7818aa47707252173d84e97278a9c
parent8ce11393a2753efc8b56161293189cc1b545f778 (diff)
downloadeclipse.platform.runtime-6a246a07d7060f4f85c2c2a1db3736dc0f4adeec.zip
eclipse.platform.runtime-6a246a07d7060f4f85c2c2a1db3736dc0f4adeec.tar.gz
eclipse.platform.runtime-6a246a07d7060f4f85c2c2a1db3736dc0f4adeec.tar.bz2
Bug 422033 - fix for case sensitive handling of file resources in linuxI20131203-0800refs/changes/37/19037/1
environments Change-Id: Ica5bc7d2d228824abd8111873faca15c8005e55d Signed-off-by: Dirk Fauth <dirk.fauth@googlemail.com>
-rw-r--r--bundles/org.eclipse.e4.core.services/src/org/eclipse/e4/core/internal/services/MessageFactoryServiceImpl.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/bundles/org.eclipse.e4.core.services/src/org/eclipse/e4/core/internal/services/MessageFactoryServiceImpl.java b/bundles/org.eclipse.e4.core.services/src/org/eclipse/e4/core/internal/services/MessageFactoryServiceImpl.java
index 870ecee..6175a49 100644
--- a/bundles/org.eclipse.e4.core.services/src/org/eclipse/e4/core/internal/services/MessageFactoryServiceImpl.java
+++ b/bundles/org.eclipse.e4.core.services/src/org/eclipse/e4/core/internal/services/MessageFactoryServiceImpl.java
@@ -24,7 +24,6 @@ import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import java.util.Map.Entry;
-import java.util.MissingResourceException;
import java.util.ResourceBundle;
import javax.annotation.PostConstruct;
import org.eclipse.e4.core.services.nls.IMessageFactoryService;
@@ -167,13 +166,15 @@ public class MessageFactoryServiceImpl implements IMessageFactoryService {
// check for the resource bundle relative to the messages class
String baseName = messages.getName().replace('.', '/');
- try {
- resourceBundle = ResourceBundleHelper.getEquinoxResourceBundle(baseName, locale,
- messages.getClassLoader());
- } catch (MissingResourceException e) {
- // do nothing as this just means there is no resource bundle named
- // like the messages class in the same package
- // therefore we will go on and search for the OSGi resource bundle
+ resourceBundle = ResourceBundleHelper.getEquinoxResourceBundle(baseName, locale,
+ messages.getClassLoader());
+
+ if (resourceBundle == null) {
+ // check for the resource bundle relative to the messages class by searching
+ // the properties file lower case
+ // this is a fix for Linux environments
+ resourceBundle = ResourceBundleHelper.getEquinoxResourceBundle(
+ baseName.toLowerCase(), locale, messages.getClassLoader());
}
}