Log what test classes were regenerated

This commit is contained in:
Andrey Breslav
2013-09-23 14:14:39 -07:00
parent ade544a8b7
commit 09da73da1b
2 changed files with 10 additions and 2 deletions
@@ -26,6 +26,11 @@ import java.io.IOException;
public class GeneratorsFileUtil {
@SuppressWarnings("UseOfSystemOutOrSystemErr")
public static void writeFileIfContentChanged(File file, String newText) throws IOException {
writeFileIfContentChanged(file, newText, true);
}
@SuppressWarnings("UseOfSystemOutOrSystemErr")
public static void writeFileIfContentChanged(File file, String newText, boolean logNotChanged) throws IOException {
File parentFile = file.getParentFile();
if (!parentFile.exists()) {
if (parentFile.mkdirs()) {
@@ -37,7 +42,9 @@ public class GeneratorsFileUtil {
}
if (checkFileIgnoringLineSeparators(file, newText)) {
System.out.println("Not changed: " + file.getAbsolutePath());
if (logNotChanged) {
System.out.println("Not changed: " + file.getAbsolutePath());
}
return;
}