Pass a pointer to JNI_GetCreatedJavaVMs() instead of null
Deven You
youdwei at linux.vnet.ibm.com
Mon May 7 09:38:46 UTC 2012
Hi All,
There is a potential problem in
jdk/src/share/native/com/sun/java/util/jar/pack/jni.cpp.
(Maybe it is not suitable for posting this on core-lib, anyone could
tell me which mailing list is prefer?)
L85:
JNI_GetCreatedJavaVMs(&vm, 1, null) in which the 3rd parameter is a
pointer to an integer. See[1], the latest JNI Invocation API spec does
not say anything about allowing a null as the last parameter.
I think it is more reasonable to change null to an integer variable.
Here is my fix[2]
[1]
http://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html#wp633
[2] http://cr.openjdk.java.net/~littlee/ojdk-432/webrev.00/
<http://cr.openjdk.java.net/%7Elittlee/ojdk-432/webrev.00/>
Please review this mail!
Thanks a lot!
--
Best Regards,
Deven
More information about the core-libs-dev
mailing list