test/tools/javac/defaultMethods/fd/FDTest.java

changeset 1415
01c9d4161882
parent 1393
d7d932236fee
equal deleted inserted replaced
1414:843d3b191773 1415:01c9d4161882
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 }

mercurial