CheckpointManager: Use a standard charset.

This commit is contained in:
Andreas Schildbach 2019-11-20 18:47:54 +01:00
parent 5948be6b91
commit 35cec435cc

View file

@ -121,7 +121,7 @@ public class CheckpointManager {
digestInputStream.on(false);
byte[] header = new byte[BINARY_MAGIC.length()];
dis.readFully(header);
if (!Arrays.equals(header, BINARY_MAGIC.getBytes("US-ASCII")))
if (!Arrays.equals(header, BINARY_MAGIC.getBytes(StandardCharsets.US_ASCII)))
throw new IOException("Header bytes did not match expected version");
int numSignatures = checkPositionIndex(dis.readInt(), MAX_SIGNATURES, "Num signatures out of range");
for (int i = 0; i < numSignatures; i++) {