[jOOQ/jOOQ#8905] GeneratorWriter should check the file size prior to

opening existing files to compare contents
This commit is contained in:
Lukas Eder 2019-07-04 17:15:09 +02:00
parent ab676159fa
commit bcdadee556

View File

@ -269,7 +269,7 @@ public abstract class GeneratorWriter<W extends GeneratorWriter<W>> {
try { try {
// [#3756] Regenerate files only if there is a difference // [#3756] Regenerate files only if there is a difference
String oldContent = null; String oldContent = null;
if (file.exists()) { if (file.exists() && file.length() == newContent.getBytes("UTF-8").length) {
RandomAccessFile old = null; RandomAccessFile old = null;
try { try {