Skip to content

Commit 5518e4b

Browse files
committed
Change seed to use identity hash of "owner" stream factory
1 parent 48c4783 commit 5518e4b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/com/fasterxml/jackson/core/sym/CharsToNameCanonicalizer.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,8 @@ public static CharsToNameCanonicalizer createRoot(TokenStreamFactory owner, int
339339
// 14-Feb-2017, tatu: not sure it actually helps, at all, since it won't
340340
// change mixing or any of the steps. Should likely just remove in future.
341341
if (seed == 0) {
342-
long now = System.currentTimeMillis();
343-
// ensure it's not 0; and might as well require to be odd so:
344-
seed = (((int) now) + ((int) (now >>> 32))) | 1;
342+
// 23-Aug-2023, tatu: Changed to use identity hash code instead of current time
343+
seed = System.identityHashCode(owner);
345344
}
346345

347346
StreamReadConstraints src;

0 commit comments

Comments
 (0)