diff options
author | coleenp <none@none> | 2013-07-03 13:45:39 -0400 |
---|---|---|
committer | coleenp <none@none> | 2013-07-03 13:45:39 -0400 |
commit | 00b730daccba17aae01857469af5a7788dd177b6 (patch) | |
tree | 48b1b04f927f2247651b53a3d9a459ee20da2862 /src/share/vm | |
parent | 5d0c0025394aa0e9fb67e7461ada410f8ee32460 (diff) |
8019833: Wrong JNI error code for preexisting JVM
Summary: Return the appropriate JNI error message (instead of the generic one) when the JVM is already started
Reviewed-by: coleenp, hseigel
Contributed-by: sylvestre@debian.org
Diffstat (limited to 'src/share/vm')
-rw-r--r-- | src/share/vm/prims/jni.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/share/vm/prims/jni.cpp b/src/share/vm/prims/jni.cpp index f37ea34c4..42930ff74 100644 --- a/src/share/vm/prims/jni.cpp +++ b/src/share/vm/prims/jni.cpp @@ -5097,7 +5097,7 @@ _JNI_IMPORT_OR_EXPORT_ jint JNICALL JNI_CreateJavaVM(JavaVM **vm, void **penv, v // function used to determine this will always return false. Atomic::xchg // does not have this problem. if (Atomic::xchg(1, &vm_created) == 1) { - return JNI_ERR; // already created, or create attempt in progress + return JNI_EEXIST; // already created, or create attempt in progress } if (Atomic::xchg(0, &safe_to_recreate_vm) == 0) { return JNI_ERR; // someone tried and failed and retry not allowed. |