diff options
| author | 2011-10-07 15:07:29 -0700 | |
|---|---|---|
| committer | 2011-10-07 15:07:29 -0700 | |
| commit | c2858561314513cc7bce2da7e13664aefef5a2ac (patch) | |
| tree | e9fc3b127b2a0c7466041f8c4e74b8d5c6257149 | |
| parent | 6825326abfef92d4e1bf6afddef1a319aa18d08c (diff) | |
| parent | 78090d119d5e23ff35ecddac1f4a98e4c050bb07 (diff) | |
Merge "Don't say UTF-8 in an error message when we mean Modified UTF-8." into dalvik-dev
| -rw-r--r-- | src/check_jni.cc | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/check_jni.cc b/src/check_jni.cc index 4989f23142..cb33d93175 100644 --- a/src/check_jni.cc +++ b/src/check_jni.cc @@ -368,7 +368,7 @@ public: * m - jmethodID * p - void* * r - jint (for release mode arguments) - * u - const char* (modified UTF-8) + * u - const char* (Modified UTF-8) * z - jsize (for lengths; use i if negative values are okay) * v - JavaVM* * E - JNIEnv* @@ -486,7 +486,7 @@ public: } else { StringAppendF(&msg, "invalid release mode %d", releaseMode); } - } else if (ch == 'u') { // const char* (modified UTF-8) + } else if (ch == 'u') { // const char* (Modified UTF-8) const char* utf = va_arg(ap, const char*); if (utf == NULL) { msg += "NULL"; @@ -732,7 +732,7 @@ private: } /* - * Verify that "bytes" points to valid "modified UTF-8" data. + * Verify that "bytes" points to valid Modified UTF-8 data. */ void CheckUtfString(const char* bytes, bool nullable) { if (bytes == NULL) { @@ -747,8 +747,9 @@ private: const char* errorKind = NULL; uint8_t utf8 = CheckUtfBytes(bytes, &errorKind); if (errorKind != NULL) { - LOG(ERROR) << "JNI ERROR: input is not valid UTF-8: illegal " << errorKind << " byte " << StringPrintf("%#x", utf8); - LOG(ERROR) << " string: '" << bytes << "'"; + LOG(ERROR) << "JNI ERROR: input is not valid Modified UTF-8: " + << "illegal " << errorKind << " byte " << StringPrintf("%#x", utf8) << "\n" + << " string: '" << bytes << "'"; JniAbort(); return; } @@ -845,7 +846,7 @@ private: /* * Bit pattern 10xx or 1111, which are illegal start bytes. * Note: 1111 is valid for normal UTF-8, but not the - * modified UTF-8 used here. + * Modified UTF-8 used here. */ *errorKind = "start"; return utf8; |