Skip to content

Commit

Permalink
8263895: Test nsk/jvmti/GetThreadGroupChildren/getthrdgrpchld001/gett…
Browse files Browse the repository at this point in the history
…hrdgrpchld001.cpp uses incorrect indices

Reviewed-by: amenkov, kevinw
  • Loading branch information
lmesnik committed Mar 22, 2021
1 parent f84b52b commit f62b100
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2021, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -351,16 +351,16 @@ static jthreadGroup findThreadGroupByName(jvmtiEnv* jvmti, JNIEnv* jni, const ch
for (j = 0; j < groupsCount; j++) {
jvmtiThreadGroupInfo info;

if (groups[i] != NULL) {
if (groups[j] != NULL) {

if (!NSK_JVMTI_VERIFY(
jvmti->GetThreadGroupInfo(groups[i], &info))) {
jvmti->GetThreadGroupInfo(groups[j], &info))) {
nsk_jvmti_setFailStatus();
continue;
}

if (info.name != 0 && strcmp(info.name, name) == 0) {
foundGroup = groups[i];
foundGroup = groups[j];
break;
}
}
Expand Down

0 comments on commit f62b100

Please sign in to comment.