if (obj != null && obj instanceof CharSequenceJavaFileObject) {
name = ((CharSequenceJavaFileObject)obj).getClassName();
}
errorBuffer.add(name, new DiagnosticErrorToken(diagnostic));
// log also to log file
logger.log(Level.WARNING, "Unable to compile dynamic entity {0}: {1}", new Object[] { name, diagnostic.getMessage(Locale.ENGLISH) });
}
}