at first revert solution

This commit is contained in:
FOCONIS\szemenyei committed 2022-01-11 09:48:47 +01:00
1 parent 8d85000970
commit b01b44af10
1 file changed
+2 -2
@@ -1,7 +1,6 @@
package io.ebeaninternal.dbmigration;
import java.io.*;
import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;
import java.util.zip.CRC32;
@@ -14,8 +13,9 @@ class MChecksum {
* Returns the checksum of the file. Agnostic of encoding and new line character.
*/
static int calculate(File file) {
try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(new FileInputStream(file), Charset.forName("UTF-8")))) {
try {
final CRC32 crc32 = new CRC32();
BufferedReader bufferedReader = new BufferedReader(new FileReader(file));
String line;
while ((line = bufferedReader.readLine()) != null) {
final byte[] lineBytes = line.getBytes(StandardCharsets.UTF_8);