80 this.diagChecker = new DiagnosticChecker(); |
80 this.diagChecker = new DiagnosticChecker(); |
81 } |
81 } |
82 |
82 |
83 void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception { |
83 void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception { |
84 JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker, |
84 JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker, |
85 Arrays.asList("-XDallowDefaultMethods"), null, Arrays.asList(source)); |
85 null, null, Arrays.asList(source)); |
86 try { |
86 try { |
87 ct.analyze(); |
87 ct.analyze(); |
88 } catch (Throwable ex) { |
88 } catch (Throwable ex) { |
89 throw new AssertionError("Error thrown when analyzing the following source:\n" + source.getCharContent(true)); |
89 throw new AssertionError("Error thrown when analyzing the following source:\n" + source.getCharContent(true)); |
90 } |
90 } |