Test (JUnit3IdeaTestRunner runner, String[] suiteClassNames) { if (suiteClassNames.length == 0) { return null; } ArrayList<Test> result = new ArrayList<>(); for (String suiteClassName : suiteClassNames) { Test test; if (suiteClassName.charAt(0) == '@') { // all tests in the package specified String[] classNames; String suiteName; try { BufferedReader reader = new BufferedReader(new InputStreamReader(new FileInputStream(suiteClassName.substring(1)), StandardCharsets.UTF_8)); ArrayList<String> vector; try { suiteName = reader.readLine(); reader.readLine(); //category reader.readLine();//filters vector = new ArrayList<>(); String line; while ((line = reader.readLine()) != null) { vector.add(line); } } finally { reader.close(); } // toArray cannot be used here because the class must be compilable with 1.1 //noinspection SSBasedInspection classNames = vector.toArray(new String[0]); } catch (Exception e) { runner.runFailed(MessageFormat.format(ourBundle.getString("junit.runner.error"), e.toString())); return null; } test = new TestAllInPackage2(runner, suiteName, classNames); } else { test = createClassOrMethodSuite(runner, suiteClassName); if (test == null) return null; } result.add(test); } if (result.size() == 1) { return result.get(0); } else { TestSuite suite = new TestSuite(); for (final Test test : result) { suite.addTest(test); } return suite; } }