Retrieve clean metalink checksums

This commit is contained in:
nvazquez 2018-02-27 19:35:16 -03:00
parent e8e4cd70af
commit 880850b7e7
1 changed files with 5 additions and 1 deletions

View File

@ -344,7 +344,11 @@ public class UriUtils {
InputStream is = getMethod.getResponseBodyAsStream();
Map<String, List<String>> checksums = getMultipleValuesFromXML(is, new String[] {"hash"});
if (checksums.containsKey("hash")) {
return checksums.get("hash");
List<String> listChksum = new ArrayList<>();
for (String chk : checksums.get("hash")) {
listChksum.add(chk.replaceAll("\n", "").replaceAll(" ", "").trim());
}
return listChksum;
}
}
} catch (IOException e) {