for (CompilationUnit cUnit : extractMessagesFrom) {
messages.addAll(cUnit.getMessageExtractedTree().getMessages());
}
MessageBundle messageBundle = Util.bundleMessages(alertSink, messages);
PropertiesBundleWriter pbw = new PropertiesBundleWriter(messageBundle);
try {
Writer writer = propertiesFile.openWriter(Charsets.US_ASCII);
try {
pbw.write(writer);
} finally {
writer.close();
}
} catch (UnmappableCharacterException uce) {
// These are caused by coding errors, not user error.