diff -r 094b5d3c7159 -r 43fb1c9e594c jdk/test/com/sun/tools/attach/BasicTests.java --- a/jdk/test/com/sun/tools/attach/BasicTests.java Thu May 08 08:22:25 2014 +0900 +++ b/jdk/test/com/sun/tools/attach/BasicTests.java Fri Apr 25 17:19:49 2014 +0200 @@ -38,7 +38,7 @@ * @bug 6173612 6273707 6277253 6335921 6348630 6342019 6381757 * @summary Basic unit tests for the VM attach mechanism. * @library /lib/testlibrary - * @run build Agent BadAgent RedefineAgent Application Shutdown RedefineDummy + * @run build Agent BadAgent RedefineAgent Application Shutdown RedefineDummy RunnerUtil * @run main BasicTests * * This test will perform a number of basic attach tests. @@ -238,19 +238,17 @@ // Test 6 - list method should list the target VM System.out.println(" - Test: VirtualMachine.list"); List l = VirtualMachine.list(); - if (!l.isEmpty()) { - boolean found = false; - for (VirtualMachineDescriptor vmd: l) { - if (vmd.id().equals(pid)) { - found = true; - break; - } + boolean found = false; + for (VirtualMachineDescriptor vmd: l) { + if (vmd.id().equals(pid)) { + found = true; + break; } - if (found) { - System.out.println(" - " + pid + " found."); - } else { - throw new RuntimeException(pid + " not found in VM list"); - } + } + if (found) { + System.out.println(" - " + pid + " found."); + } else { + throw new RuntimeException(pid + " not found in VM list"); } // test 7 - basic hashCode/equals tests