Use Java 7 version of Files.readAllLines instead of Java 8 version
This commit is contained in:
parent
cd03e61f4b
commit
1b9877bb65
|
@ -136,7 +136,7 @@ public class HttpDownloadHelper {
|
||||||
try {
|
try {
|
||||||
if (download(checksumURL, checksumFile, progress, timeout)) {
|
if (download(checksumURL, checksumFile, progress, timeout)) {
|
||||||
byte[] fileBytes = Files.readAllBytes(originalFile);
|
byte[] fileBytes = Files.readAllBytes(originalFile);
|
||||||
List<String> checksumLines = Files.readAllLines(checksumFile);
|
List<String> checksumLines = Files.readAllLines(checksumFile, Charsets.UTF_8);
|
||||||
if (checksumLines.size() != 1) {
|
if (checksumLines.size() != 1) {
|
||||||
throw new ElasticsearchCorruptionException("invalid format for checksum file (" +
|
throw new ElasticsearchCorruptionException("invalid format for checksum file (" +
|
||||||
hashFunc.name() + "), expected 1 line, got: " + checksumLines.size());
|
hashFunc.name() + "), expected 1 line, got: " + checksumLines.size());
|
||||||
|
|
Loading…
Reference in New Issue