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.java.com/bugreport/" 115 #endif 116 117 #define JAVA_MAX_SUPPORTED_VERSION 54 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) { 134 // user specified the base property. there's nothing to do here. 135 (*env)->DeleteLocalRef(env, jVMBaseVal); 136 } else { 137 char buf[64]; 138 jstring jVMVal = 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.java.com/bugreport/" 115 #endif 116 117 #define JAVA_MAX_SUPPORTED_VERSION VERSION_CLASSFILE_MAJOR 118 #define JAVA_MAX_SUPPORTED_MINOR_VERSION VERSION_CLASSFILE_MINOR 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) { 134 // user specified the base property. there's nothing to do here. 135 (*env)->DeleteLocalRef(env, jVMBaseVal); 136 } else { 137 char buf[64]; 138 jstring jVMVal = NULL; |