RFR (M) 8223044: Add back exception checking in tests

serguei.spitsyn at oracle.com serguei.spitsyn at oracle.com
Sat Apr 27 01:51:45 UTC 2019


Hi Jc,

It looks good to me.
A couple of comments/questions.

In most files the changes look similar like below:

-Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t002_setNewByteCode(JNIEnv 
*jni_env,
+Java_nsk_jvmti_scenarios_bcinstr_BI01_bi01t002_setNewByteCode(JNIEnv *jni,
                          jobject o, jint ind, jbyteArray byteCode) {
  
+ ExceptionCheckingJniEnvPtr jni_env(jni);


But in this file, renaming is in opposite direction:

-agentProc(jvmtiEnv* jvmti, JNIEnv* jni, void* arg) {
+agentProc(jvmtiEnv* jvmti, JNIEnv* jni_env, void* arg) {
  
+ ExceptionCheckingJniEnvPtr jni(jni_env); In general, I have a little 
concern about use of jni_env  forExceptionCheckingJniEnvPtr.
Could it be less confusing to use something like ec_jni or ec_jni_env?
So that it will be clear that it is not normal(JNIEnv *).

Thanks,
Serguei


On 4/26/19 5:52 PM, Jean Christophe Beyler wrote:
> Hi all,
>
> (Re-sending with subject line complete :-))
>
> Since JDK-8213501 finally merged (sorry it took so long), I am able to 
> continue this work. Here is the work that puts back the messages for 
> any calls that were moved around due to JDK-8212884.
>
> Webrev: http://cr.openjdk.java.net/~jcbeyler/8223044/webrev.00/ 
> <http://cr.openjdk.java.net/%7Ejcbeyler/8223044/webrev.00/>
> Bug: https://bugs.openjdk.java.net/browse/JDK-8223044
>
> All modified tests pass on my local dev machine.
>
> Thanks,
> Jc

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20190426/7e5d6e35/attachment.html>


More information about the serviceability-dev mailing list