log.info("Keys: {}", Arrays.toString(JOUSTCache.classInfo.keySet().toArray()));
Iterator<String> keyIterator = JOUSTCache.classInfo.keySet().iterator();
while (keyIterator.hasNext()) {
String className = keyIterator.next();
TransientClassInfo transientInfo = JOUSTCache.transientClassInfo.get(className);
if (transientInfo.flushed) {
log.fatal("Already flushed: {}", className);
continue;
}
try {
// Get a reference to the file to which this ClassSymbol was written.
JavaFileObject outFile =
fileManager.getJavaFileForOutput(CLASS_OUTPUT,
className,
JavaFileObject.Kind.CLASS,
transientInfo.getSourceFile());
// Due to the operation of the BY_TODO compile policy, this runner gets called many
// times. Not always are all results available.
if (outFile == null) {
log.warn("Cannot flush {} because no outfile available!", className);
continue;
}
final int hash = ChecksumUtils.computeHash(outFile);
JOUSTCache.writeSymbolToDisk(className, hash);
transientInfo.setFlushed(true);
log.trace("Flush: {}", className);
} catch (FileNotFoundException e) {
// Probably just called too soon...
log.error("Can't find file for: {}", className, e);
} catch (IOException e) {