< prev index next >
src/java.base/share/native/libjava/System.c
Print this page
rev 48922 : [mq]: 8198385
@@ -123,11 +123,10 @@
#error "ERROR: No override of JAVA_SPECIFICATION_VENDOR is allowed"
#else
#define JAVA_SPECIFICATION_VENDOR "Oracle Corporation"
#endif
-static int fmtdefault; // boolean value
jobject fillI18nProps(JNIEnv *env, jobject props, char *baseKey,
char *platformDispVal, char *platformFmtVal,
jmethodID putID, jmethodID getPropID) {
jstring jVMBaseVal = NULL;
@@ -139,21 +138,14 @@
char buf[64];
jstring jVMVal = NULL;
const char *baseVal = "";
/* user.xxx base property */
- if (fmtdefault) {
- if (platformFmtVal) {
- PUTPROP(props, baseKey, platformFmtVal);
- baseVal = platformFmtVal;
- }
- } else {
if (platformDispVal) {
PUTPROP(props, baseKey, platformDispVal);
baseVal = platformDispVal;
}
- }
/* user.xxx.display property */
jio_snprintf(buf, sizeof(buf), "%s.display", baseKey);
GETPROP(props, buf, jVMVal);
if (jVMVal == NULL) {
@@ -400,20 +392,10 @@
REMOVEPROP(props, "user.variant");
REMOVEPROP(props, "file.encoding");
ret = JVM_InitProperties(env, props);
- /* Check the compatibility flag */
- GETPROP(props, "sun.locale.formatasdefault", jVMVal);
- if (jVMVal) {
- const char * val = (*env)->GetStringUTFChars(env, jVMVal, 0);
- CHECK_NULL_RETURN(val, NULL);
- fmtdefault = !strcmp(val, "true");
- (*env)->ReleaseStringUTFChars(env, jVMVal, val);
- (*env)->DeleteLocalRef(env, jVMVal);
- }
-
/* reconstruct i18n related properties */
fillI18nProps(env, props, "user.language", sprops->display_language,
sprops->format_language, putID, getPropID);
fillI18nProps(env, props, "user.script",
sprops->display_script, sprops->format_script, putID, getPropID);
@@ -428,15 +410,11 @@
* Since sun_jnu_encoding is now hard-coded to UTF-8 on Mac, we don't
* want to use it to overwrite file.encoding
*/
PUTPROP(props, "file.encoding", sprops->encoding);
#else
- if (fmtdefault) {
- PUTPROP(props, "file.encoding", sprops->encoding);
- } else {
PUTPROP(props, "file.encoding", sprops->sun_jnu_encoding);
- }
#endif
} else {
(*env)->DeleteLocalRef(env, jVMVal);
}
< prev index next >