if (jvalue) { value = env->GetStringUTFChars(jvalue, &iscopy); if (!value) { JavaDOMGlobals::ThrowException(env, "CharacterData.appendData: GetStringUTFChars failed"); return; }
const char* value = env->GetStringUTFChars(jvalue, &iscopy); if (!value) { JavaDOMGlobals::ThrowException(env, "CharacterData.appendData: GetStringUTFChars failed"); return;
JNIEXPORT void JNICALL Java_org_mozilla_dom_CharacterDataImpl_appendData  (JNIEnv *env, jobject jthis, jstring jvalue){  nsIDOMCharacterData* data = (nsIDOMCharacterData*)     env->GetLongField(jthis, JavaDOMGlobals::nodePtrFID);  if (!data) {    JavaDOMGlobals::ThrowException(env,       "CharacterData.appendData: NULL pointer");    return;  }    const char* value = NULL;  jboolean iscopy = JNI_FALSE;  if (jvalue) {      value = env->GetStringUTFChars(jvalue, &iscopy);      if (!value) {	  JavaDOMGlobals::ThrowException(env,  	    "CharacterData.appendData: GetStringUTFChars failed");	  return;      }  }  nsresult rv = data->AppendData(value);  if (iscopy == JNI_TRUE)    env->ReleaseStringUTFChars(jvalue, value);  if (NS_FAILED(rv)) {    JavaDOMGlobals::ExceptionType exceptionType = JavaDOMGlobals::EXCEPTION_RUNTIME;    if (rv == NS_ERROR_DOM_NO_MODIFICATION_ALLOWED_ERR) {      exceptionType = JavaDOMGlobals::EXCEPTION_DOM;    }    JavaDOMGlobals::ThrowException(env,        "CharacterData.appendData: failed", rv, exceptionType);    return;  }}