jdk/classfile/CorpusTest.java rarely fails in 1 of 6754 parametrised parallel 
junit tests

The root cause seems to be thread-unsafe lazy initialisation of 
`TypeKind.newarraycodeToTypeTag` in `TypeKind::fromNewArrayCode`. Provided 
patch replaces that lazy-initialized helper array with switch expression.

Please review.

Thanks,
Adam

-------------

Commit messages:
 - 8303910: jdk/classfile/CorpusTest.java failed 1 of 6754 tests

Changes: https://git.openjdk.org/jdk/pull/13004/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=13004&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8303910
  Stats: 13 lines in 1 file changed: 4 ins; 2 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/13004.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/13004/head:pull/13004

PR: https://git.openjdk.org/jdk/pull/13004

Reply via email to