--- a/jdk/src/share/back/eventFilter.c Mon Jun 30 14:11:49 2008 -0700
+++ b/jdk/src/share/back/eventFilter.c Tue Jul 01 09:23:00 2008 -0700
@@ -492,14 +492,17 @@
char *sourceName = 0;
jvmtiError error = JVMTI_FUNC_PTR(gdata->jvmti,GetSourceFileName)
(gdata->jvmti, clazz, &sourceName);
- if (error == JVMTI_ERROR_NONE) {
- if (sourceName == 0 || !patternStringMatch(sourceName, desiredNamePattern)) {
- /* We have no match */
- jvmtiDeallocate(sourceName);
- return JNI_FALSE;
- }
+ if (error == JVMTI_ERROR_NONE &&
+ sourceName != 0 &&
+ patternStringMatch(sourceName, desiredNamePattern)) {
+ // got a hit - report the event
+ jvmtiDeallocate(sourceName);
+ break;
}
+ // We have no match, we have no source file name,
+ // or we got a JVM TI error. Don't report the event.
jvmtiDeallocate(sourceName);
+ return JNI_FALSE;
}
break;
}