Details
Description
The sample code in the spec for javax.tools.JavaCompiler interface contains some sample code. This code contains some typos and is not compiled.
Files[] files1 = ... ; // input for first compilation task
Files[] files2 = ... ; // input for second compilation task
Files[] -> File[] ?
System.out.format("Error on line %d in %d%n",
diagnostic.getLineNumber()
diagnostic.getSource().toUri());
There are no comma (,) in second line and method toUri() is not known.
public void flush() {
logger.entering(StandardJavaFileManager.class.getName(), "flush");
super.flush();
logger.exiting(StandardJavaFileManager.class.getName(), "flush");
}
super.flush(); => Unhandled IOException, perhaps invalid flush() method signature, add throws block
Files[] files1 = ... ; // input for first compilation task
Files[] files2 = ... ; // input for second compilation task
Files[] -> File[] ?
System.out.format("Error on line %d in %d%n",
diagnostic.getLineNumber()
diagnostic.getSource().toUri());
There are no comma (,) in second line and method toUri() is not known.
public void flush() {
logger.entering(StandardJavaFileManager.class.getName(), "flush");
super.flush();
logger.exiting(StandardJavaFileManager.class.getName(), "flush");
}
super.flush(); => Unhandled IOException, perhaps invalid flush() method signature, add throws block