martin-g commented on code in PR #3216:
URL: https://github.com/apache/avro/pull/3216#discussion_r1806070231
##########
lang/java/avro/src/test/java/org/apache/avro/TestAvro4078.java:
##########
@@ -0,0 +1,21 @@
+package org.apache.avro;
+
+import org.apache.avro.specific.SpecificData;
+import org.junit.Test;
+
+/**
+ * Unit test for demonstrating specific data potential issue.
+ */
+public class TestAvro4078 {
+
+ public static final Schema FULLNAME_SCHEMA = (new
Schema.Parser()).parse("{\n" + " \"type\": \"record\",\n"
+ + " \"namespace\": \"org.apache.avro\",\n" + " \"name\":
\"FullName\",\n" + " \"fields\": [\n"
+ + " { \"name\": \"first\", \"type\": \"string\" },\n"
+ + " { \"name\": \"last\", \"type\": \"string\" }\n" + " ]\n" +
"}");
+
+ @Test
+ public void testClassLoad() {
+ System.err.println(FULLNAME_SCHEMA);
+ System.err.println(SpecificData.get().getClass(FULLNAME_SCHEMA));
Review Comment:
Done!
This shows the problem in the test case too!
The static initialization of FullName `READER$` and `WRITER$` fields lead to
a hang!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]