Details
-
Sub-task
-
Resolution: Delivered
-
P4
-
21
Description
In prior releases, `JNI_GetCreatedJavaVMs`:
```
jint JNI_GetCreatedJavaVMs(JavaVM **vmBuf, jsize bufLen, jsize *nVMs);
```
could return a `JavaVM`, via the `vmBuf` array, that was still in the process of being initialized and may not be ready for use. This has now changed so that it will only return fully initialized VMs. It is important that the programmer checks that the returned number of VMs, in `nVMs`, is greater than zero, before trying to use any `vmBuf` entries.
```
jint JNI_GetCreatedJavaVMs(JavaVM **vmBuf, jsize bufLen, jsize *nVMs);
```
could return a `JavaVM`, via the `vmBuf` array, that was still in the process of being initialized and may not be ready for use. This has now changed so that it will only return fully initialized VMs. It is important that the programmer checks that the returned number of VMs, in `nVMs`, is greater than zero, before trying to use any `vmBuf` entries.