From 9f5f478acfbe1e84b7aa740028a283d8114ce826 Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Wed, 6 Jun 2012 18:42:52 +0400 Subject: [PATCH] cleanup --- .../src/com/theoryinpractice/testng/ui/TestNGResults.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/testng/src/com/theoryinpractice/testng/ui/TestNGResults.java b/plugins/testng/src/com/theoryinpractice/testng/ui/TestNGResults.java index 925b9dabe92f..23f3889d6bd1 100644 --- a/plugins/testng/src/com/theoryinpractice/testng/ui/TestNGResults.java +++ b/plugins/testng/src/com/theoryinpractice/testng/ui/TestNGResults.java @@ -107,8 +107,8 @@ public class TestNGResults extends TestResultsPanel implements TestFrameworkRunn final String method = ((TestResultMessage)result).getMethod(); if (method != null) { final PsiMethod[] psiMethods = psiClass.findMethodsByName(method, false); - for (PsiMethod psiMethod : psiMethods) { - psiMethod.navigate(true); + if (psiMethods.length > 0) { + psiMethods[0].navigate(true); return; } }