mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
use only meaningful bytes to calculate stub hash
GitOrigin-RevId: 008bb90612d555bcacbe9d5f164dd26be29f23c0
This commit is contained in:
committed by
intellij-monorepo-bot
parent
af8c11be8a
commit
cf31735622
@@ -120,7 +120,7 @@ public class SerializedStubTree {
|
||||
}
|
||||
}
|
||||
|
||||
myIndexedStubs = new IndexedStubs(calculateHash(myBytes), (Map)map);
|
||||
myIndexedStubs = new IndexedStubs(calculateHash(myBytes, myLength), (Map)map);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@@ -180,9 +180,9 @@ public class SerializedStubTree {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
private static byte[] calculateHash(@NotNull byte[] content) {
|
||||
private static byte[] calculateHash(@NotNull byte[] content, int length) {
|
||||
MessageDigest digest = HASHER.getValue();
|
||||
digest.update(content);
|
||||
digest.update(content, 0, length);
|
||||
return digest.digest();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user