< prev index next >

src/share/native/java/lang/System.c

Print this page




  91 #define REMOVEPROP(props, key)                                    \
  92     if (1) {                                                      \
  93         jstring jkey;                                             \
  94         jobject r;                                                \
  95         jkey = JNU_NewStringPlatform(env, key);                   \
  96         if (jkey == NULL) return NULL;                            \
  97         r = (*env)->CallObjectMethod(env, props, removeID, jkey); \
  98         if ((*env)->ExceptionOccurred(env)) return NULL;          \
  99         (*env)->DeleteLocalRef(env, jkey);                        \
 100         (*env)->DeleteLocalRef(env, r);                           \
 101     } else ((void) 0)
 102 #define GETPROP(props, key, jret)                                     \
 103     if (1) {                                                          \
 104         jstring jkey = JNU_NewStringPlatform(env, key);               \
 105         if (jkey == NULL) return NULL;                                \
 106         jret = (*env)->CallObjectMethod(env, props, getPropID, jkey); \
 107         if ((*env)->ExceptionOccurred(env)) return NULL;              \
 108         (*env)->DeleteLocalRef(env, jkey);                            \
 109     } else ((void) 0)
 110 
 111 #ifndef VENDOR /* Third party may overwrite this. */

 112 #define VENDOR "Oracle Corporation"


 113 #define VENDOR_URL "http://java.oracle.com/"


 114 #define VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/"
 115 #endif
 116 
 117 #define JAVA_MAX_SUPPORTED_VERSION 52
 118 #define JAVA_MAX_SUPPORTED_MINOR_VERSION 0
 119 
 120 #ifdef JAVA_SPECIFICATION_VENDOR /* Third party may NOT overwrite this. */
 121   #error "ERROR: No override of JAVA_SPECIFICATION_VENDOR is allowed"
 122 #else
 123   #define JAVA_SPECIFICATION_VENDOR "Oracle Corporation"
 124 #endif
 125 
 126 static int fmtdefault; // boolean value
 127 jobject fillI18nProps(JNIEnv *env, jobject props, char *baseKey,
 128                       char *platformDispVal, char *platformFmtVal,
 129                       jmethodID putID, jmethodID getPropID) {
 130     jstring jVMBaseVal = NULL;
 131 
 132     GETPROP(props, baseKey, jVMBaseVal);
 133     if (jVMBaseVal) {




  91 #define REMOVEPROP(props, key)                                    \
  92     if (1) {                                                      \
  93         jstring jkey;                                             \
  94         jobject r;                                                \
  95         jkey = JNU_NewStringPlatform(env, key);                   \
  96         if (jkey == NULL) return NULL;                            \
  97         r = (*env)->CallObjectMethod(env, props, removeID, jkey); \
  98         if ((*env)->ExceptionOccurred(env)) return NULL;          \
  99         (*env)->DeleteLocalRef(env, jkey);                        \
 100         (*env)->DeleteLocalRef(env, r);                           \
 101     } else ((void) 0)
 102 #define GETPROP(props, key, jret)                                     \
 103     if (1) {                                                          \
 104         jstring jkey = JNU_NewStringPlatform(env, key);               \
 105         if (jkey == NULL) return NULL;                                \
 106         jret = (*env)->CallObjectMethod(env, props, getPropID, jkey); \
 107         if ((*env)->ExceptionOccurred(env)) return NULL;              \
 108         (*env)->DeleteLocalRef(env, jkey);                            \
 109     } else ((void) 0)
 110 
 111 /* Third party may overwrite these values. */
 112 #ifndef VENDOR
 113 #define VENDOR "Oracle Corporation"
 114 #endif
 115 #ifndef VENDOR_URL
 116 #define VENDOR_URL "http://java.oracle.com/"
 117 #endif
 118 #ifndef VENDOR_URL_BUG
 119 #define VENDOR_URL_BUG "http://bugreport.sun.com/bugreport/"
 120 #endif
 121 
 122 #define JAVA_MAX_SUPPORTED_VERSION 52
 123 #define JAVA_MAX_SUPPORTED_MINOR_VERSION 0
 124 
 125 #ifdef JAVA_SPECIFICATION_VENDOR /* Third party may NOT overwrite this. */
 126   #error "ERROR: No override of JAVA_SPECIFICATION_VENDOR is allowed"
 127 #else
 128   #define JAVA_SPECIFICATION_VENDOR "Oracle Corporation"
 129 #endif
 130 
 131 static int fmtdefault; // boolean value
 132 jobject fillI18nProps(JNIEnv *env, jobject props, char *baseKey,
 133                       char *platformDispVal, char *platformFmtVal,
 134                       jmethodID putID, jmethodID getPropID) {
 135     jstring jVMBaseVal = NULL;
 136 
 137     GETPROP(props, baseKey, jVMBaseVal);
 138     if (jVMBaseVal) {


< prev index next >