23
23
package java .util ;
24
24
25
25
import java .io .*;
26
- import java .security .AccessController ;
26
+ // import java.security.AccessController;
27
27
import java .text .MessageFormat ;
28
- import sun .security .action .GetPropertyAction ;
29
- import sun .text .resources .LocaleData ;
28
+ // import sun.security.action.GetPropertyAction;
29
+ // import sun.text.resources.LocaleData;
30
30
31
31
/**
32
32
*
@@ -325,11 +325,11 @@ public static Locale getDefault() {
325
325
*/
326
326
{
327
327
String language , region , country , variant ;
328
- language = (String ) AccessController .doPrivileged (
329
- new GetPropertyAction ("user.language" , "en" ));
328
+ language = null ; /* (String) AccessController.doPrivileged(
329
+ new GetPropertyAction("user.language", "en")); */
330
330
// for compatibility, check for old user.region property
331
- region = (String ) AccessController .doPrivileged (
332
- new GetPropertyAction ("user.region" ));
331
+ region = null ; /* (String) AccessController.doPrivileged(
332
+ new GetPropertyAction("user.region")); */
333
333
if (region != null ) {
334
334
// region can be of form country, country_variant, or _variant
335
335
int i = region .indexOf ('_' );
@@ -341,10 +341,10 @@ public static Locale getDefault() {
341
341
variant = "" ;
342
342
}
343
343
} else {
344
- country = (String ) AccessController .doPrivileged (
345
- new GetPropertyAction ("user.country" , "" ));
346
- variant = (String ) AccessController .doPrivileged (
347
- new GetPropertyAction ("user.variant" , "" ));
344
+ country = null ; /* (String) AccessController.doPrivileged(
345
+ new GetPropertyAction("user.country", "")); */
346
+ variant = null ; /* (String) AccessController.doPrivileged(
347
+ new GetPropertyAction("user.variant", "")); */
348
348
}
349
349
defaultLocale = new Locale (language , country , variant );
350
350
}
@@ -421,7 +421,7 @@ public static synchronized void setDefault(Locale newLocale) {
421
421
];
422
422
*/
423
423
public static Locale [] getAvailableLocales () {
424
- return LocaleData .getAvailableLocales ("LocaleString" );
424
+ return null ; // LocaleData.getAvailableLocales("LocaleString");
425
425
}
426
426
427
427
/**
@@ -623,7 +623,7 @@ public String getDisplayLanguage(Locale inLocale) {
623
623
624
624
while (!done ) {
625
625
try {
626
- ResourceBundle bundle = LocaleData .getLocaleElements (workingLocale );
626
+ ResourceBundle bundle = null ; // LocaleData.getLocaleElements(workingLocale);
627
627
result = findStringMatch ((String [][])bundle .getObject ("Languages" ),
628
628
langCode , langCode );
629
629
if (result .length () != 0 )
@@ -709,7 +709,7 @@ public String getDisplayCountry(Locale inLocale) {
709
709
710
710
while (!done ) {
711
711
try {
712
- ResourceBundle bundle = LocaleData .getLocaleElements (workingLocale );
712
+ ResourceBundle bundle = null ; // LocaleData.getLocaleElements(workingLocale);
713
713
result = findStringMatch ((String [][])bundle .getObject ("Countries" ),
714
714
ctryCode , ctryCode );
715
715
if (result .length () != 0 )
@@ -767,7 +767,7 @@ public String getDisplayVariant(Locale inLocale) {
767
767
if (variant .length () == 0 )
768
768
return "" ;
769
769
770
- ResourceBundle bundle = LocaleData .getLocaleElements (inLocale );
770
+ ResourceBundle bundle = null ; // LocaleData.getLocaleElements(inLocale);
771
771
772
772
String names [] = getDisplayVariantArray (bundle );
773
773
@@ -827,7 +827,7 @@ public final String getDisplayName() {
827
827
* }
828
828
*/
829
829
public String getDisplayName (Locale inLocale ) {
830
- ResourceBundle bundle = LocaleData .getLocaleElements (inLocale );
830
+ ResourceBundle bundle = null ; // LocaleData.getLocaleElements(inLocale);
831
831
832
832
String languageName = getDisplayLanguage (inLocale );
833
833
String countryName = getDisplayCountry (inLocale );
@@ -1198,26 +1198,30 @@ private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundE
1198
1198
* avoid circularity problems between Locale and String.
1199
1199
* The most straightforward algorithm is used. Look at optimizations later.
1200
1200
*/
1201
+ /*
1201
1202
private String toLowerCase(String str) {
1202
1203
char[] buf = str.toCharArray();
1203
1204
for (int i = 0; i < buf.length; i++) {
1204
1205
buf[i] = Character.toLowerCase( buf[i] );
1205
1206
}
1206
1207
return new String( buf );
1207
1208
}
1209
+ */
1208
1210
1209
1211
/*
1210
1212
* Locale needs its own, locale insensitive version of toUpperCase to
1211
1213
* avoid circularity problems between Locale and String.
1212
1214
* The most straightforward algorithm is used. Look at optimizations later.
1213
1215
*/
1216
+ /*
1214
1217
private String toUpperCase(String str) {
1215
1218
char[] buf = str.toCharArray();
1216
1219
for (int i = 0; i < buf.length; i++) {
1217
1220
buf[i] = Character.toUpperCase( buf[i] );
1218
1221
}
1219
1222
return new String( buf );
1220
1223
}
1224
+ */
1221
1225
1222
1226
/**
1223
1227
* @j2sIgnore
0 commit comments