On 08/01/2014 00:50, Dan Xu wrote:
Hi All,
Thanks for your good review. I have dropped the change in
FileSystemPreferences.java , and created the new webrev which only
changes FileSystemPreferences.c. Please help review it. Thanks!
Webrev: http://cr.openjdk.java.net/~dxu/8028726/webrev.01/
When changing FileSystemPreferences.c, I noticed the code like
"JNU_GetStringPlatformChars(env, java_fname, JNI_FALSE)". Because
JNI_FALSE is passed into this function, I am wondering why our code
still release string by calling JNU_ReleaseStringPlatformChars(env,
java_fname, fname). Thanks!
This is the isCopy parameter to allow the function return whether it has
returned a copy or not. So the JNU_ReleaseStringPlatformChars is needed.
However the JNI_FALSE isn't right, it does happens to work because
JNI_FALSE is defined as 0, same as NULL. Do you mind changing these to
NULL as part of the change so that it's a bit more obvious? (no need to
publish a new webrev if there are no other changes).
Otherwise looks fine to me.
-Alan.