225 } |
227 } |
226 } |
228 } |
227 |
229 |
228 void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception { |
230 void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception { |
229 JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker, |
231 JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker, |
230 Arrays.asList("-XDallowMethodReferences"), null, Arrays.asList(source)); |
232 null, null, Arrays.asList(source)); |
231 try { |
233 try { |
232 ct.parse(); |
234 ct.parse(); |
233 } catch (Throwable ex) { |
235 } catch (Throwable ex) { |
234 throw new AssertionError("Error thrown when parsing the following source:\n" + source.getCharContent(true)); |
236 throw new AssertionError("Error thrown when parsing the following source:\n" + source.getCharContent(true)); |
235 } |
237 } |