Lazily initialize ThreadLocalRandom.instance field.
With MethodType caching circular dependency appears:
ThreadLocalRandom.<clinit>
ThreadLocalRandom.<init>
Random.<init>
Random.seedUniquifier
AtomicLong.compareAndSet
... MethodType creation for VarHandles ...
... caching in CHM ...
CHM.putVal
CHM.addCount
CHM.fullAddCount
ThreadLocalRandom.localInit -> throws NPE as seeder is not yet initialized
Bug: 297147201
Test: CtsLibcoreTestCases
Test: CtsLibcoreOjTestCases
Change-Id: Iab13ff87d43f20c5968a93d2a18b8e1977aa8665
1 file changed