anhldbk commented on a change in pull request #874:
URL: https://github.com/apache/avro/pull/874#discussion_r422579033
##########
File path:
lang/java/avro/src/test/java/org/apache/avro/reflect/TestReflectData.java
##########
@@ -130,4 +130,34 @@ private void validateSchema(Meta meta) {
assertEquals("Invalid field " + field.name(), field.defaultVal(),
testCases.get(field.name()));
}
}
+
+ public class Definition {
+ public Map<String, String> tokens;
+ }
+
+ @Test
+ public void testInnerClasses() {
+ testStaticInnerClasses();
+ testNonStaticInnerClasses();
+ }
+
+ public void testNonStaticInnerClasses() {
+ boolean successful = false;
+ try {
+ ReflectData.get().getSchema(Definition.class);
+ } catch (AvroTypeException ex) {
+ if (ex.getMessage().contains("must be a static inner class")) {
+ successful = true;
+ }
+ }
+ assertTrue(successful);
+ }
+
+ public void testStaticInnerClasses() {
Review comment:
@Fokko code is fixed :D
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]