Skip to content

Commit 46db4db

Browse files
ted-xiecopybara-github
authored andcommitted
Use proper data type for crc32 hash in idl jars
PiperOrigin-RevId: 722775940 Change-Id: I975dcece503f63388a4c8fb33c2b172b68f5b624
1 parent f7b6b9b commit 46db4db

File tree

1 file changed

+1
-1
lines changed
  • src/tools/java/com/google/devtools/build/android/idlclass

1 file changed

+1
-1
lines changed

src/tools/java/com/google/devtools/build/android/idlclass/IdlClass.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ private static void writeOutputJar(Path outputJar, Path tempDir) throws IOExcept
190190
entry.setTime(DEFAULT_TIMESTAMP.toEpochMilli());
191191
entry.setSize(Files.size(path));
192192
entry.setCompressedSize(Files.size(path));
193-
entry.setCrc(Hashing.crc32().hashBytes(Files.readAllBytes(path)).asInt());
193+
entry.setCrc(Hashing.crc32().hashBytes(Files.readAllBytes(path)).padToLong());
194194
zip.putNextEntry(entry);
195195
zip.write(Files.readAllBytes(path));
196196
zip.closeEntry();

0 commit comments

Comments
 (0)