OSDN Git Service

Improve diagnostics when non-String passed as a jstring.
authorElliott Hughes <enh@google.com>
Thu, 31 Mar 2011 18:06:36 +0000 (11:06 -0700)
committerElliott Hughes <enh@google.com>
Thu, 31 Mar 2011 18:06:36 +0000 (11:06 -0700)
commitba587f9b33109c8cbcb4cf93c21036a8063ea580
tree3c8cc8338c95936c274362e3fe1f47b649a6edf7
parenta1cfe9e4487ca2d17090bd9899620099aa358b80
Improve diagnostics when non-String passed as a jstring.

For my particular bug, the cause was obvious by inspection of the calling
code, but this might be useful in harder cases.

Before:
    W(17868) JNI WARNING: jstring 0x3600001 points to non-string object (Check_GetStringUTFChars)  (dalvikvm)

Change-Id: I883a99936b8c2cd79c5a691f7c335245ff50b34f
After:
    W(19680) JNI WARNING: jstring 0x3600001 points to object of type Llibcore/io/Posix; (Check_GetStringUTFChars)  (dalvikvm)
vm/CheckJni.c