langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java
changeset 27319 030080f03e4f
parent 22690 86dd707d616a
child 30730 d3ce7619db2c
equal deleted inserted replaced
27318:4660a5da7d90 27319:030080f03e4f
   183     }
   183     }
   184 
   184 
   185     public static void main(String... args) throws Exception {
   185     public static void main(String... args) throws Exception {
   186         //create default shared JavaCompiler - reused across multiple compilations
   186         //create default shared JavaCompiler - reused across multiple compilations
   187         JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
   187         JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
   188         StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null);
   188         try (StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null)) {
   189 
   189 
   190         for (CastInfo cInfo : allCastInfo()) {
   190             for (CastInfo cInfo : allCastInfo()) {
   191             for (ExpressionKind ek : ExpressionKind.values()) {
   191                 for (ExpressionKind ek : ExpressionKind.values()) {
   192                 new IntersectionTargetTypeTest(cInfo, ek).run(comp, fm);
   192                     new IntersectionTargetTypeTest(cInfo, ek).run(comp, fm);
   193             }
   193                 }
   194         }
   194             }
   195         System.out.println("Total check executed: " + checkCount);
   195             System.out.println("Total check executed: " + checkCount);
       
   196         }
   196     }
   197     }
   197 
   198 
   198     static List<CastInfo> allCastInfo() {
   199     static List<CastInfo> allCastInfo() {
   199         ListBuffer<CastInfo> buf = new ListBuffer<>();
   200         ListBuffer<CastInfo> buf = new ListBuffer<>();
   200         for (CastKind kind : CastKind.values()) {
   201         for (CastKind kind : CastKind.values()) {