The problem is that, when different subclasses of Symbol are loaded in different threads, each then loads Symbol itself, which then loads those subclasses while binding constants, and things deadlock.
I've attached a better fix that removes all public constructors for Symbol subclasses and replaces them with factory methods on Symbol. So none of the subclasses are loaded until after Symbol itself is loaded and all of its constants are bound.
I tried to test this using the code linked in the description of this issue. Without the patch things deadlock. With the patch they fail with:
JSON record should::be readable when a nullable field has been added to the schema(com.axa.ags.avro.AvroJsonEncodingTest): Expected field name not found: foo
Is that expected?
I tried to build a simple, standalone Java test case for this but was unable to get things to deadlock.
If this new patch looks reasonable then I'll probably re-add the public constructors and deprecate them for back-compatibility. I removed them just to be certain that they were no longer called anywhere.