+{"files":[{"patch":"@@ -2,1 +2,1 @@\n- * Copyright (c) 2018, Oracle and\/or its affiliates. All rights reserved.\n+ * Copyright (c) 2018, 2021, Oracle and\/or its affiliates. All rights reserved.\n@@ -60,1 +60,1 @@\n- if (!initWatchers(MyList.class, MyList.class.getDeclaredField(\"items\"))) {\n+ if (!initWatchers(MyList.class, MyList.class.getDeclaredField(\"items\"), Thread.currentThread())) {\n@@ -134,1 +134,1 @@\n- private static native boolean initWatchers(Class cls, Field field);\n+ private static native boolean initWatchers(Class cls, Field field, Thread testThread);\n","filename":"test\/hotspot\/jtreg\/serviceability\/jvmti\/FieldAccessWatch\/FieldAccessWatch.java","additions":3,"deletions":3,"binary":false,"changes":6,"status":"modified"},{"patch":"@@ -40,0 +40,1 @@\n+static jthread testThread = NULL;\n@@ -49,0 +50,1 @@\n+ jthread thread,\n@@ -67,0 +69,4 @@\n+ if (!(*jni_env)->IsSameObject(jni_env, thread, testThread)) {\n+ return; \/\/ skip events from unexpected threads\n+ }\n+\n@@ -182,1 +188,1 @@\n- handleNotification(jni_env, method, field, field_klass, 0, location);\n+ handleNotification(jni_env, thread, method, field, field_klass, 0, location);\n@@ -198,1 +204,1 @@\n- handleNotification(jni_env, method, field, field_klass, 1, location);\n+ handleNotification(jni_env, thread, method, field, field_klass, 1, location);\n@@ -254,1 +260,1 @@\n-Java_FieldAccessWatch_initWatchers(JNIEnv *env, jclass thisClass, jclass cls, jobject field)\n+Java_FieldAccessWatch_initWatchers(JNIEnv *env, jclass thisClass, jclass cls, jobject field, jthread thread)\n@@ -278,0 +284,2 @@\n+ testThread = (jthread)(*env)->NewGlobalRef(env, thread);\n+\n","filename":"test\/hotspot\/jtreg\/serviceability\/jvmti\/FieldAccessWatch\/libFieldAccessWatch.c","additions":11,"deletions":3,"binary":false,"changes":14,"status":"modified"}]}
0 commit comments