test/sun/reflect/CallerSensitive/MissingCallerSensitive.java

Print this page

        

*** 32,46 **** */ import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; public class MissingCallerSensitive { public static void main(String[] args) throws Exception { String testclasses = System.getProperty("test.classes", "."); ! List<Path> classes = new ArrayList<>(); ! classes.add(Paths.get(testclasses, "MissingCallerSensitive.class")); CallerSensitiveFinder csfinder = new CallerSensitiveFinder(); List<String> errors = csfinder.run(classes); if (errors.size() != 1) { throw new RuntimeException("Unexpected number of methods found: " + errors.size()); --- 32,48 ---- */ import java.nio.file.Path; import java.nio.file.Paths; import java.util.*; + import java.util.stream.Stream; + public class MissingCallerSensitive { public static void main(String[] args) throws Exception { String testclasses = System.getProperty("test.classes", "."); ! ! Stream<Path> classes = Stream.of(Paths.get(testclasses, "MissingCallerSensitive.class")); CallerSensitiveFinder csfinder = new CallerSensitiveFinder(); List<String> errors = csfinder.run(classes); if (errors.size() != 1) { throw new RuntimeException("Unexpected number of methods found: " + errors.size());