jdk/test/sun/reflect/CallerSensitive/MissingCallerSensitive.java
changeset 28426 7439e01a464b
parent 17204 d0540971275f
child 30820 0d4717a011d3
equal deleted inserted replaced
28425:241dd1e2d9cb 28426:7439e01a464b
    32  */
    32  */
    33 
    33 
    34 import java.nio.file.Path;
    34 import java.nio.file.Path;
    35 import java.nio.file.Paths;
    35 import java.nio.file.Paths;
    36 import java.util.*;
    36 import java.util.*;
       
    37 import java.util.stream.Stream;
       
    38 
    37 public class MissingCallerSensitive {
    39 public class MissingCallerSensitive {
    38     public static void main(String[] args) throws Exception {
    40     public static void main(String[] args) throws Exception {
    39         String testclasses = System.getProperty("test.classes", ".");
    41         String testclasses = System.getProperty("test.classes", ".");
    40         List<Path> classes = new ArrayList<>();
    42 
    41         classes.add(Paths.get(testclasses, "MissingCallerSensitive.class"));
    43         Stream<Path> classes = Stream.of(Paths.get(testclasses, "MissingCallerSensitive.class"));
    42 
    44 
    43         CallerSensitiveFinder csfinder = new CallerSensitiveFinder();
    45         CallerSensitiveFinder csfinder = new CallerSensitiveFinder();
    44         List<String> errors = csfinder.run(classes);
    46         List<String> errors = csfinder.run(classes);
    45         if (errors.size() != 1) {
    47         if (errors.size() != 1) {
    46             throw new RuntimeException("Unexpected number of methods found: " + errors.size());
    48             throw new RuntimeException("Unexpected number of methods found: " + errors.size());