Fixed bug 354465: Should only set default locale if there are indeed NL
extensions
diff --git a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
index f4e21ce..f78bdfc 100644
--- a/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
+++ b/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/Workbench.java
@@ -14,6 +14,7 @@
package org.eclipse.ui.internal;
import com.ibm.icu.util.ULocale;
+import com.ibm.icu.util.ULocale.Category;
import java.io.BufferedInputStream;
import java.io.FileInputStream;
import java.io.IOException;
@@ -518,7 +519,12 @@
final int[] returnCode = new int[1];
Realm.runWithDefault(SWTObservables.getRealm(display), new Runnable() {
public void run() {
- ULocale.setDefault(new ULocale(Platform.getNL() + Platform.getNLExtensions()));
+ final String nlExtensions = Platform.getNLExtensions();
+ if (nlExtensions.length() > 0) {
+ ULocale.setDefault(Category.FORMAT,
+ new ULocale(ULocale.getDefault(Category.FORMAT).getBaseName()
+ + nlExtensions));
+ }
System.setProperty(E4Workbench.XMI_URI_ARG,
"org.eclipse.ui.workbench/LegacyIDE.e4xmi"); //$NON-NLS-1$