You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@harmony.apache.org by Sean Qiu <se...@gmail.com> on 2009/08/24 10:48:00 UTC
Re: svn commit: r807111 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
I suddenly realized that we had entered code freezing stage.
Shall I revert it back ?
Best Regards
Sean, Xiao Xia Qiu
2009/8/24 <qi...@apache.org>:
> Author: qiuxx
> Date: Mon Aug 24 08:13:13 2009
> New Revision: 807111
>
> URL: http://svn.apache.org/viewvc?rev=807111&view=rev
> Log:
> Apply for HARMONY-6031, There are 2 unused member in java.util.Locale
>
> Modified:
> harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
>
> Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java?rev=807111&r1=807110&r2=807111&view=diff
> ==============================================================================
> --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java (original)
> +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java Mon Aug 24 08:13:13 2009
> @@ -17,15 +17,12 @@
>
> package java.util;
>
> -import java.io.File;
> import java.io.IOException;
> import java.io.ObjectInputStream;
> import java.io.ObjectOutputStream;
> import java.io.ObjectStreamField;
> import java.io.Serializable;
> import java.security.AccessController;
> -import java.util.zip.ZipEntry;
> -import java.util.zip.ZipFile;
>
> import org.apache.harmony.luni.util.PriviAction;
>
> @@ -44,8 +41,6 @@
>
> private static final long serialVersionUID = 9149081749638150636L;
>
> - private static volatile Locale[] availableLocales;
> -
> // Initialize a default which is used during static
> // initialization of the default for the platform.
> private static Locale defaultLocale = new Locale();
> @@ -290,91 +285,6 @@
> return false;
> }
>
> - static Locale[] find(String prefix) {
> - int last = prefix.lastIndexOf('/');
> - final String thePackage = prefix.substring(0, last + 1);
> - int length = prefix.length();
> - final String classPrefix = prefix.substring(last + 1, length);
> - Set<String> result = new HashSet<String>();
> - StringTokenizer paths = new StringTokenizer(System.getProperty(
> - "org.apache.harmony.boot.class.path", ""), System.getProperty( //$NON-NLS-1$ //$NON-NLS-2$
> - "path.separator", ";")); //$NON-NLS-1$//$NON-NLS-2$
> - while (paths.hasMoreTokens()) {
> - String nextToken = paths.nextToken();
> - File directory = new File(nextToken);
> - if (directory.exists()) {
> - if (directory.isDirectory()) {
> - String path;
> - try {
> - path = directory.getCanonicalPath();
> - } catch (IOException e) {
> - continue;
> - }
> - File newDir;
> - if (path.charAt(path.length() - 1) == File.separatorChar) {
> - newDir = new File(path + thePackage);
> - } else {
> - newDir = new File(path + File.separatorChar
> - + thePackage);
> - }
> - if (newDir.isDirectory()) {
> - String[] list = newDir.list();
> - for (int i = 0; i < list.length; i++) {
> - String name = list[i];
> - if (name.startsWith(classPrefix)
> - && name.endsWith(".class")) { //$NON-NLS-1$
> - result
> - .add(name.substring(0,
> - name.length() - 6));
> - }
> - }
> - }
> -
> - } else {
> - // Handle ZIP/JAR files.
> - try {
> - ZipFile zip = new ZipFile(directory);
> - Enumeration<? extends ZipEntry> entries = zip.entries();
> - while (entries.hasMoreElements()) {
> - ZipEntry e = entries.nextElement();
> - String name = e.getName();
> - if (name.startsWith(prefix)
> - && name.endsWith(".class")) {//$NON-NLS-1$
> - result.add(name.substring(last + 1, name
> - .length() - 6));
> - }
> - }
> - zip.close();
> - } catch (IOException e) {
> - // Empty
> - }
> - }
> - }
> - }
> - Locale[] locales = new Locale[result.size()];
> - int i = 0;
> - for (String name : result) {
> - int index = name.indexOf('_');
> - int nextIndex = name.indexOf('_', index + 1);
> - if (nextIndex == -1) {
> - locales[i++] = new Locale(name.substring(index + 1, name
> - .length()), ""); //$NON-NLS-1$
> - } else {
> - String language = name.substring(index + 1, nextIndex);
> - String variant;
> - if ((index = name.indexOf('_', nextIndex + 1)) == -1) {
> - variant = ""; //$NON-NLS-1$
> - index = name.length();
> - } else {
> - variant = name.substring(index + 1, name.length());
> - }
> - String country = name.substring(nextIndex + 1, index);
> - locales[i++] = new Locale(language, country, variant);
> - }
> - }
> - return locales;
> - }
> -
> /**
> * Gets the list of installed {@code Locale}. At least a {@code Locale} that is equal to
> * {@code Locale.US} must be contained in this array.
>
>
>
Re: svn commit: r807111 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
Posted by Sean Qiu <se...@gmail.com>.
It is just removing never-used code of Locale.
Could someone take a look at it?
http://issues.apache.org/jira/browse/HARMONY-6301
Best Regards
Sean, Xiao Xia Qiu
2009/8/24 Sean Qiu <se...@gmail.com>:
> I suddenly realized that we had entered code freezing stage.
> Shall I revert it back ?
>
>
> Best Regards
> Sean, Xiao Xia Qiu
>
>
>
>
> 2009/8/24 <qi...@apache.org>:
>> Author: qiuxx
>> Date: Mon Aug 24 08:13:13 2009
>> New Revision: 807111
>>
>> URL: http://svn.apache.org/viewvc?rev=807111&view=rev
>> Log:
>> Apply for HARMONY-6031, There are 2 unused member in java.util.Locale
>>
>> Modified:
>> harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
>>
>> Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
>> URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java?rev=807111&r1=807110&r2=807111&view=diff
>> ==============================================================================
>> --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java (original)
>> +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java Mon Aug 24 08:13:13 2009
>> @@ -17,15 +17,12 @@
>>
>> package java.util;
>>
>> -import java.io.File;
>> import java.io.IOException;
>> import java.io.ObjectInputStream;
>> import java.io.ObjectOutputStream;
>> import java.io.ObjectStreamField;
>> import java.io.Serializable;
>> import java.security.AccessController;
>> -import java.util.zip.ZipEntry;
>> -import java.util.zip.ZipFile;
>>
>> import org.apache.harmony.luni.util.PriviAction;
>>
>> @@ -44,8 +41,6 @@
>>
>> private static final long serialVersionUID = 9149081749638150636L;
>>
>> - private static volatile Locale[] availableLocales;
>> -
>> // Initialize a default which is used during static
>> // initialization of the default for the platform.
>> private static Locale defaultLocale = new Locale();
>> @@ -290,91 +285,6 @@
>> return false;
>> }
>>
>> - static Locale[] find(String prefix) {
>> - int last = prefix.lastIndexOf('/');
>> - final String thePackage = prefix.substring(0, last + 1);
>> - int length = prefix.length();
>> - final String classPrefix = prefix.substring(last + 1, length);
>> - Set<String> result = new HashSet<String>();
>> - StringTokenizer paths = new StringTokenizer(System.getProperty(
>> - "org.apache.harmony.boot.class.path", ""), System.getProperty( //$NON-NLS-1$ //$NON-NLS-2$
>> - "path.separator", ";")); //$NON-NLS-1$//$NON-NLS-2$
>> - while (paths.hasMoreTokens()) {
>> - String nextToken = paths.nextToken();
>> - File directory = new File(nextToken);
>> - if (directory.exists()) {
>> - if (directory.isDirectory()) {
>> - String path;
>> - try {
>> - path = directory.getCanonicalPath();
>> - } catch (IOException e) {
>> - continue;
>> - }
>> - File newDir;
>> - if (path.charAt(path.length() - 1) == File.separatorChar) {
>> - newDir = new File(path + thePackage);
>> - } else {
>> - newDir = new File(path + File.separatorChar
>> - + thePackage);
>> - }
>> - if (newDir.isDirectory()) {
>> - String[] list = newDir.list();
>> - for (int i = 0; i < list.length; i++) {
>> - String name = list[i];
>> - if (name.startsWith(classPrefix)
>> - && name.endsWith(".class")) { //$NON-NLS-1$
>> - result
>> - .add(name.substring(0,
>> - name.length() - 6));
>> - }
>> - }
>> - }
>> -
>> - } else {
>> - // Handle ZIP/JAR files.
>> - try {
>> - ZipFile zip = new ZipFile(directory);
>> - Enumeration<? extends ZipEntry> entries = zip.entries();
>> - while (entries.hasMoreElements()) {
>> - ZipEntry e = entries.nextElement();
>> - String name = e.getName();
>> - if (name.startsWith(prefix)
>> - && name.endsWith(".class")) {//$NON-NLS-1$
>> - result.add(name.substring(last + 1, name
>> - .length() - 6));
>> - }
>> - }
>> - zip.close();
>> - } catch (IOException e) {
>> - // Empty
>> - }
>> - }
>> - }
>> - }
>> - Locale[] locales = new Locale[result.size()];
>> - int i = 0;
>> - for (String name : result) {
>> - int index = name.indexOf('_');
>> - int nextIndex = name.indexOf('_', index + 1);
>> - if (nextIndex == -1) {
>> - locales[i++] = new Locale(name.substring(index + 1, name
>> - .length()), ""); //$NON-NLS-1$
>> - } else {
>> - String language = name.substring(index + 1, nextIndex);
>> - String variant;
>> - if ((index = name.indexOf('_', nextIndex + 1)) == -1) {
>> - variant = ""; //$NON-NLS-1$
>> - index = name.length();
>> - } else {
>> - variant = name.substring(index + 1, name.length());
>> - }
>> - String country = name.substring(nextIndex + 1, index);
>> - locales[i++] = new Locale(language, country, variant);
>> - }
>> - }
>> - return locales;
>> - }
>> -
>> /**
>> * Gets the list of installed {@code Locale}. At least a {@code Locale} that is equal to
>> * {@code Locale.US} must be contained in this array.
>>
>>
>>
>
Re: svn commit: r807111 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
Posted by Sean Qiu <se...@gmail.com>.
Sure, thanks.
Best Regards
Sean, Xiao Xia Qiu
2009/8/24 Mark Hindess <ma...@googlemail.com>:
>
> In message <94...@mail.gmail.com>,
> Sean Qiu writes:
>>
>> I suddenly realized that we had entered code freezing stage. Shall I
>> revert it back ?
>
> It is a non-functional change but regardless it should still have had
> prior approval since we are in code freeze. I retrospectively approve
> it, but please let's not do this again.
>
> -Mark.
>
>
>
Re: svn commit: r807111 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
Posted by Mark Hindess <ma...@googlemail.com>.
In message <94...@mail.gmail.com>,
Sean Qiu writes:
>
> I suddenly realized that we had entered code freezing stage. Shall I
> revert it back ?
It is a non-functional change but regardless it should still have had
prior approval since we are in code freeze. I retrospectively approve
it, but please let's not do this again.
-Mark.
Re: svn commit: r807111 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/Locale.java
Posted by Mark Hindess <ma...@googlemail.com>.
In message <94...@mail.gmail.com>,
Sean Qiu writes:
>
> I suddenly realized that we had entered code freezing stage.
> Shall I revert it back ?
I am just looking at the commit/jira. FYI: it is HARMONY-6301 not 6031.
-Mark.
> 2009/8/24 <qi...@apache.org>:
> > Author: qiuxx
> > Date: Mon Aug 24 08:13:13 2009
> > New Revision: 807111
> >
> > URL: http://svn.apache.org/viewvc?rev=3D807111&view=3Drev
> > Log:
> > Apply for HARMONY-6031, There are 2 unused member in java.util.Locale
> >
> > Modified:
> > =A0 =A0harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/ut=
> il/Locale.java
> >
> > Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java=
> /util/Locale.java
> > URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules=
> /luni/src/main/java/java/util/Locale.java?rev=3D807111&r1=3D807110&r2=3D807=
> 111&view=3Ddiff
> > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
> =3D=3D=3D=3D
> > --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/=
> Locale.java (original)
> > +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/=
> Locale.java Mon Aug 24 08:13:13 2009
> > @@ -17,15 +17,12 @@
> >
> > =A0package java.util;
> >
> > -import java.io.File;
> > =A0import java.io.IOException;
> > =A0import java.io.ObjectInputStream;
> > =A0import java.io.ObjectOutputStream;
> > =A0import java.io.ObjectStreamField;
> > =A0import java.io.Serializable;
> > =A0import java.security.AccessController;
> > -import java.util.zip.ZipEntry;
> > -import java.util.zip.ZipFile;
> >
> > =A0import org.apache.harmony.luni.util.PriviAction;
> >
> > @@ -44,8 +41,6 @@
> >
> > =A0 =A0 private static final long serialVersionUID =3D 914908174963815063=
> 6L;
> >
> > - =A0 =A0private static volatile Locale[] availableLocales;
> > -
> > =A0 =A0 // Initialize a default which is used during static
> > =A0 =A0 // initialization of the default for the platform.
> > =A0 =A0 private static Locale defaultLocale =3D new Locale();
> > @@ -290,91 +285,6 @@
> > =A0 =A0 =A0 =A0 return false;
> > =A0 =A0 }
> >
> > - =A0 =A0static Locale[] find(String prefix) {
> > - =A0 =A0 =A0 =A0int last =3D prefix.lastIndexOf('/');
> > - =A0 =A0 =A0 =A0final String thePackage =3D prefix.substring(0, last + 1=
> );
> > - =A0 =A0 =A0 =A0int length =3D prefix.length();
> > - =A0 =A0 =A0 =A0final String classPrefix =3D prefix.substring(last + 1, =
> length);
> > - =A0 =A0 =A0 =A0Set<String> result =3D new HashSet<String>();
> > - =A0 =A0 =A0 =A0StringTokenizer paths =3D new StringTokenizer(System.get=
> Property(
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"org.apache.harmony.boot.class.path", ""=
> ), System.getProperty( //$NON-NLS-1$ //$NON-NLS-2$
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0"path.separator", ";")); //$NON-NLS-1$//=
> $NON-NLS-2$
> > - =A0 =A0 =A0 =A0while (paths.hasMoreTokens()) {
> > - =A0 =A0 =A0 =A0 =A0 =A0String nextToken =3D paths.nextToken();
> > - =A0 =A0 =A0 =A0 =A0 =A0File directory =3D new File(nextToken);
> > - =A0 =A0 =A0 =A0 =A0 =A0if (directory.exists()) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (directory.isDirectory()) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String path;
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0try {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0path =3D directory.getCa=
> nonicalPath();
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} catch (IOException e) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0continue;
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0File newDir;
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (path.charAt(path.length() - =
> 1) =3D=3D File.separatorChar) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0newDir =3D new File(path=
> + thePackage);
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0newDir =3D new File(path=
> + File.separatorChar
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0+ thePac=
> kage);
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (newDir.isDirectory()) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String[] list =3D newDir=
> .list();
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0for (int i =3D 0; i < li=
> st.length; i++) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String name =3D =
> list[i];
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (name.startsW=
> ith(classPrefix)
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
> && name.endsWith(".class")) { //$NON-NLS-1$
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0result
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
> =A0 =A0.add(name.substring(0,
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
> =A0 =A0 =A0 =A0 =A0 =A0name.length() - 6));
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > -
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// Handle ZIP/JAR files.
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0try {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ZipFile zip =3D new ZipF=
> ile(directory);
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Enumeration<? extends Zi=
> pEntry> entries =3D zip.entries();
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0while (entries.hasMoreEl=
> ements()) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0ZipEntry e =3D e=
> ntries.nextElement();
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String name =3D =
> e.getName();
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if (name.startsW=
> ith(prefix)
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
> && name.endsWith(".class")) {//$NON-NLS-1$
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0result.a=
> dd(name.substring(last + 1, name
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=
> =A0 =A0.length() - 6));
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0zip.close();
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} catch (IOException e) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0// Empty
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0Locale[] locales =3D new Locale[result.size()];
> > - =A0 =A0 =A0 =A0int i =3D 0;
> > - =A0 =A0 =A0 =A0for (String name : result) {
> > - =A0 =A0 =A0 =A0 =A0 =A0int index =3D name.indexOf('_');
> > - =A0 =A0 =A0 =A0 =A0 =A0int nextIndex =3D name.indexOf('_', index + 1);
> > - =A0 =A0 =A0 =A0 =A0 =A0if (nextIndex =3D=3D -1) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0locales[i++] =3D new Locale(name.substri=
> ng(index + 1, name
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0.length()), ""); //$NON-=
> NLS-1$
> > - =A0 =A0 =A0 =A0 =A0 =A0} else {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String language =3D name.substring(index=
> + 1, nextIndex);
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String variant;
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0if ((index =3D name.indexOf('_', nextInd=
> ex + 1)) =3D=3D -1) {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0variant =3D ""; //$NON-NLS-1$
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0index =3D name.length();
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0} else {
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0variant =3D name.substring(index=
> + 1, name.length());
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0String country =3D name.substring(nextIn=
> dex + 1, index);
> > - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0locales[i++] =3D new Locale(language, co=
> untry, variant);
> > - =A0 =A0 =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0}
> > - =A0 =A0 =A0 =A0return locales;
> > - =A0 =A0}
> > -
> > =A0 =A0 =A0 =A0/**
> > =A0 =A0 =A0* Gets the list of installed {@code Locale}. At least a {@code=
> Locale} that is equal to
> > =A0 =A0 =A0* {@code Locale.US} must be contained in this array.
> >
> >
> >
>