Skip to content

Commit

Permalink
Update ParquetFileReader.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud-Nauwynck authored Nov 26, 2024
1 parent 0c0dd59 commit 10c2df0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,8 @@ private static final ParquetMetadata readFooter(
int fileMetadataLength = readIntLittleEndian(magicAndLengthBytes, 0);

boolean encryptedFooterMode;
// using JDK >= 9: if (Arrays.equals(MAGIC, 0, MAGIC.length, magicAndLengthBytes, FOOTER_LENGTH_SIZE, FOOTER_LENGTH_SIZE + MAGIC.length)) {
// using JDK >= 9: if (Arrays.equals(MAGIC, 0, MAGIC.length,
// magicAndLengthBytes, FOOTER_LENGTH_SIZE, FOOTER_LENGTH_SIZE + MAGIC.length)) {
// using JDK <= 8: need extract sub array then compare
byte[] magic = new byte[MAGIC.length];
System.arraycopy(magicAndLengthBytes, FOOTER_LENGTH_SIZE, magic, 0, MAGIC.length);
Expand Down

0 comments on commit 10c2df0

Please sign in to comment.