Use Java 7 version of Files.readAllLines instead of Java 8 version

This commit is contained in:
Lee Hinman 2015-08-14 14:36:17 -06:00
parent cd03e61f4b
commit 1b9877bb65
1 changed files with 1 additions and 1 deletions

View File

@ -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());