author | egahlin |
Fri, 27 Sep 2019 13:20:04 +0200 | |
branch | JEP-349-branch |
changeset 58373 | 849a45ac808a |
parent 47216 | 71c04702a3d5 |
permissions | -rw-r--r-- |
17954 | 1 |
/* |
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
2 |
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved. |
17954 | 3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
* |
|
5 |
* This code is free software; you can redistribute it and/or modify it |
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
|
7 |
* published by the Free Software Foundation. Oracle designates this |
|
8 |
* particular file as subject to the "Classpath" exception as provided |
|
9 |
* by Oracle in the LICENSE file that accompanied this code. |
|
10 |
* |
|
11 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
|
12 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
13 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
14 |
* version 2 for more details (a copy is included in the LICENSE file that |
|
15 |
* accompanied this code). |
|
16 |
* |
|
17 |
* You should have received a copy of the GNU General Public License version |
|
18 |
* 2 along with this work; if not, write to the Free Software Foundation, |
|
19 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
|
20 |
* |
|
21 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
|
22 |
* or visit www.oracle.com if you need additional information or have any |
|
23 |
* questions. |
|
24 |
*/ |
|
25 |
||
22605
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
26 |
#include <stdlib.h> |
17954 | 27 |
#include <jni.h> |
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
28 |
#include "management_ext.h" |
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
29 |
#include "com_sun_management_internal_DiagnosticCommandImpl.h" |
17954 | 30 |
|
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
31 |
JNIEXPORT void JNICALL Java_com_sun_management_internal_DiagnosticCommandImpl_setNotificationEnabled |
17954 | 32 |
(JNIEnv *env, jobject dummy, jboolean enabled) { |
22624
860bde7fa0eb
8032518: fatal error has been detected by the Java Runtime Environment(access violation)
mgronlun
parents:
22605
diff
changeset
|
33 |
if (jmm_version <= JMM_VERSION_1_2_2) { |
17954 | 34 |
JNU_ThrowByName(env, "java/lang/UnsupportedOperationException", |
35 |
"JMX interface to diagnostic framework notifications is not supported by this VM"); |
|
22624
860bde7fa0eb
8032518: fatal error has been detected by the Java Runtime Environment(access violation)
mgronlun
parents:
22605
diff
changeset
|
36 |
return; |
17954 | 37 |
} |
22624
860bde7fa0eb
8032518: fatal error has been detected by the Java Runtime Environment(access violation)
mgronlun
parents:
22605
diff
changeset
|
38 |
jmm_interface->SetDiagnosticFrameworkNotificationEnabled(env, enabled); |
17954 | 39 |
} |
40 |
||
41 |
JNIEXPORT jobjectArray JNICALL |
|
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
42 |
Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommands |
17954 | 43 |
(JNIEnv *env, jobject dummy) |
44 |
{ |
|
45 |
return jmm_interface->GetDiagnosticCommands(env); |
|
46 |
} |
|
47 |
||
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
48 |
#define EXCEPTION_CHECK_AND_FREE(x) do { \ |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
49 |
if ((*env)->ExceptionCheck(env)) { \ |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
50 |
free(x); \ |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
51 |
return NULL; \ |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
52 |
} \ |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
53 |
} while(0) |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
54 |
|
17954 | 55 |
jobject getDiagnosticCommandArgumentInfoArray(JNIEnv *env, jstring command, |
56 |
int num_arg) { |
|
57 |
int i; |
|
58 |
jobject obj; |
|
59 |
jobjectArray result; |
|
60 |
dcmdArgInfo* dcmd_arg_info_array; |
|
61 |
jclass dcmdArgInfoCls; |
|
62 |
jclass arraysCls; |
|
63 |
jmethodID mid; |
|
64 |
jobject resultList; |
|
65 |
||
66 |
dcmd_arg_info_array = (dcmdArgInfo*) malloc(num_arg * sizeof(dcmdArgInfo)); |
|
22605
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
67 |
/* According to ISO C it is perfectly legal for malloc to return zero if called with a zero argument */ |
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
68 |
if (dcmd_arg_info_array == NULL && num_arg != 0) { |
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
69 |
JNU_ThrowOutOfMemoryError(env, 0); |
17954 | 70 |
return NULL; |
71 |
} |
|
72 |
jmm_interface->GetDiagnosticCommandArgumentsInfo(env, command, |
|
73 |
dcmd_arg_info_array); |
|
74 |
dcmdArgInfoCls = (*env)->FindClass(env, |
|
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
75 |
"com/sun/management/internal/DiagnosticCommandArgumentInfo"); |
27192
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
76 |
if ((*env)->ExceptionCheck(env)) { |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
77 |
free(dcmd_arg_info_array); |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
78 |
return NULL; |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
79 |
} |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
80 |
|
17954 | 81 |
result = (*env)->NewObjectArray(env, num_arg, dcmdArgInfoCls, NULL); |
82 |
if (result == NULL) { |
|
83 |
free(dcmd_arg_info_array); |
|
84 |
return NULL; |
|
85 |
} |
|
86 |
for (i=0; i<num_arg; i++) { |
|
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
87 |
jstring jname, jdesc,jtype,jdefStr; |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
88 |
|
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
89 |
jname = (*env)->NewStringUTF(env,dcmd_arg_info_array[i].name); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
90 |
EXCEPTION_CHECK_AND_FREE(dcmd_arg_info_array); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
91 |
|
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
92 |
jdesc = (*env)->NewStringUTF(env,dcmd_arg_info_array[i].description); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
93 |
EXCEPTION_CHECK_AND_FREE(dcmd_arg_info_array); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
94 |
|
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
95 |
jtype = (*env)->NewStringUTF(env,dcmd_arg_info_array[i].type); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
96 |
EXCEPTION_CHECK_AND_FREE(dcmd_arg_info_array); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
97 |
|
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
98 |
jdefStr = (*env)->NewStringUTF(env, dcmd_arg_info_array[i].default_string); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
99 |
EXCEPTION_CHECK_AND_FREE(dcmd_arg_info_array); |
17954 | 100 |
obj = JNU_NewObjectByName(env, |
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
101 |
"com/sun/management/internal/DiagnosticCommandArgumentInfo", |
17954 | 102 |
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZZZI)V", |
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
103 |
jname, jdesc, jtype, |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
104 |
dcmd_arg_info_array[i].default_string == NULL ? NULL: jdefStr, |
17954 | 105 |
dcmd_arg_info_array[i].mandatory, |
106 |
dcmd_arg_info_array[i].option, |
|
107 |
dcmd_arg_info_array[i].multiple, |
|
108 |
dcmd_arg_info_array[i].position); |
|
109 |
if (obj == NULL) { |
|
110 |
free(dcmd_arg_info_array); |
|
111 |
return NULL; |
|
112 |
} |
|
113 |
(*env)->SetObjectArrayElement(env, result, i, obj); |
|
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
114 |
EXCEPTION_CHECK_AND_FREE(dcmd_arg_info_array); |
17954 | 115 |
} |
116 |
free(dcmd_arg_info_array); |
|
117 |
arraysCls = (*env)->FindClass(env, "java/util/Arrays"); |
|
27192
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
118 |
if ((*env)->ExceptionCheck(env)) { |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
119 |
return NULL; |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
120 |
} |
17954 | 121 |
mid = (*env)->GetStaticMethodID(env, arraysCls, |
122 |
"asList", "([Ljava/lang/Object;)Ljava/util/List;"); |
|
123 |
resultList = (*env)->CallStaticObjectMethod(env, arraysCls, mid, result); |
|
27192
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
124 |
if ((*env)->ExceptionCheck(env)) { |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
125 |
// Make sure we return NULL in case of OOM inside Java |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
126 |
return NULL; |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
127 |
} |
17954 | 128 |
return resultList; |
129 |
} |
|
130 |
||
131 |
/* Throws IllegalArgumentException if at least one of the diagnostic command |
|
132 |
* passed in argument is not supported by the JVM |
|
133 |
*/ |
|
134 |
JNIEXPORT jobjectArray JNICALL |
|
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
135 |
Java_com_sun_management_internal_DiagnosticCommandImpl_getDiagnosticCommandInfo |
17954 | 136 |
(JNIEnv *env, jobject dummy, jobjectArray commands) |
137 |
{ |
|
138 |
int i; |
|
139 |
jclass dcmdInfoCls; |
|
140 |
jobject result; |
|
141 |
jobjectArray args; |
|
142 |
jobject obj; |
|
143 |
jmmOptionalSupport mos; |
|
144 |
jint ret = jmm_interface->GetOptionalSupport(env, &mos); |
|
145 |
jsize num_commands; |
|
146 |
dcmdInfo* dcmd_info_array; |
|
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
147 |
jstring jname, jdesc, jimpact; |
17954 | 148 |
|
149 |
if (commands == NULL) { |
|
150 |
JNU_ThrowNullPointerException(env, "Invalid String Array"); |
|
151 |
return NULL; |
|
152 |
} |
|
153 |
num_commands = (*env)->GetArrayLength(env, commands); |
|
22605
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
154 |
dcmdInfoCls = (*env)->FindClass(env, |
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
155 |
"com/sun/management/internal/DiagnosticCommandInfo"); |
27192
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
156 |
if ((*env)->ExceptionCheck(env)) { |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
157 |
return NULL; |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
158 |
} |
a16236cd61d7
8029465: warnings from b118 for jdk.src.share.native.sun.management: JNI exception pending
dsamersoff
parents:
25859
diff
changeset
|
159 |
|
22605
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
160 |
result = (*env)->NewObjectArray(env, num_commands, dcmdInfoCls, NULL); |
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
161 |
if (result == NULL) { |
22624
860bde7fa0eb
8032518: fatal error has been detected by the Java Runtime Environment(access violation)
mgronlun
parents:
22605
diff
changeset
|
162 |
return NULL; |
22605
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
163 |
} |
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
164 |
if (num_commands == 0) { |
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
165 |
/* Handle the 'zero commands' case specially to avoid calling 'malloc()' */ |
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
166 |
/* with a zero argument because that may legally return a NULL pointer. */ |
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
167 |
return result; |
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
168 |
} |
dba3d6b22818
8031581: PPC64: Addons and fixes for AIX to pass the jdk regression tests
simonis
parents:
18299
diff
changeset
|
169 |
dcmd_info_array = (dcmdInfo*) malloc(num_commands * sizeof(dcmdInfo)); |
17954 | 170 |
if (dcmd_info_array == NULL) { |
171 |
JNU_ThrowOutOfMemoryError(env, NULL); |
|
22624
860bde7fa0eb
8032518: fatal error has been detected by the Java Runtime Environment(access violation)
mgronlun
parents:
22605
diff
changeset
|
172 |
return NULL; |
17954 | 173 |
} |
174 |
jmm_interface->GetDiagnosticCommandInfo(env, commands, dcmd_info_array); |
|
175 |
for (i=0; i<num_commands; i++) { |
|
176 |
args = getDiagnosticCommandArgumentInfoArray(env, |
|
177 |
(*env)->GetObjectArrayElement(env,commands,i), |
|
178 |
dcmd_info_array[i].num_arguments); |
|
179 |
if (args == NULL) { |
|
180 |
free(dcmd_info_array); |
|
22624
860bde7fa0eb
8032518: fatal error has been detected by the Java Runtime Environment(access violation)
mgronlun
parents:
22605
diff
changeset
|
181 |
return NULL; |
17954 | 182 |
} |
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
183 |
|
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
184 |
jname = (*env)->NewStringUTF(env,dcmd_info_array[i].name); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
185 |
EXCEPTION_CHECK_AND_FREE(dcmd_info_array); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
186 |
|
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
187 |
jdesc = (*env)->NewStringUTF(env,dcmd_info_array[i].description); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
188 |
EXCEPTION_CHECK_AND_FREE(dcmd_info_array); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
189 |
|
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
190 |
jimpact = (*env)->NewStringUTF(env,dcmd_info_array[i].impact); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
191 |
EXCEPTION_CHECK_AND_FREE(dcmd_info_array); |
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
192 |
|
17954 | 193 |
obj = JNU_NewObjectByName(env, |
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
194 |
"com/sun/management/internal/DiagnosticCommandInfo", |
17954 | 195 |
"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ZLjava/util/List;)V", |
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
196 |
jname, jdesc, jimpact, |
17954 | 197 |
dcmd_info_array[i].permission_class==NULL?NULL:(*env)->NewStringUTF(env,dcmd_info_array[i].permission_class), |
198 |
dcmd_info_array[i].permission_name==NULL?NULL:(*env)->NewStringUTF(env,dcmd_info_array[i].permission_name), |
|
199 |
dcmd_info_array[i].permission_action==NULL?NULL:(*env)->NewStringUTF(env,dcmd_info_array[i].permission_action), |
|
200 |
dcmd_info_array[i].enabled, |
|
201 |
args); |
|
202 |
if (obj == NULL) { |
|
203 |
free(dcmd_info_array); |
|
22624
860bde7fa0eb
8032518: fatal error has been detected by the Java Runtime Environment(access violation)
mgronlun
parents:
22605
diff
changeset
|
204 |
return NULL; |
17954 | 205 |
} |
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
206 |
|
17954 | 207 |
(*env)->SetObjectArrayElement(env, result, i, obj); |
41197
d98087633032
8161448: 4 JNI exception pending defect groups in DiagnosticCommandImpl.c
vtewari
parents:
30355
diff
changeset
|
208 |
EXCEPTION_CHECK_AND_FREE(dcmd_info_array); |
17954 | 209 |
} |
210 |
free(dcmd_info_array); |
|
211 |
return result; |
|
212 |
} |
|
213 |
||
214 |
/* Throws IllegalArgumentException if the diagnostic command |
|
215 |
* passed in argument is not supported by the JVM |
|
216 |
*/ |
|
217 |
JNIEXPORT jstring JNICALL |
|
30355
e37c7eba132f
8042901: Allow com.sun.management to be in a different module to java.lang.management
sjiang
parents:
27192
diff
changeset
|
218 |
Java_com_sun_management_internal_DiagnosticCommandImpl_executeDiagnosticCommand |
17954 | 219 |
(JNIEnv *env, jobject dummy, jstring command) { |
220 |
return jmm_interface->ExecuteDiagnosticCommand(env, command); |
|
221 |
} |