RyanSkraba commented on a change in pull request #885:
URL: https://github.com/apache/avro/pull/885#discussion_r433315009



##########
File path: 
lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java
##########
@@ -299,6 +304,24 @@ public void addCustomConversion(Class<?> conversionClass) {
     return result;
   }
 
+  @SuppressWarnings("unchecked")
+  public Set<String> getUsedCustomLogicalTypeFactories(Schema schema) {
+    final Map<String, LogicalTypes.LogicalTypeFactory> registeredTypesMap;
+    try {
+      final java.lang.reflect.Field registeredTypesField = 
LogicalTypes.class.getDeclaredField("REGISTERED_TYPES");

Review comment:
       I'd prefer to avoid this private access via reflection!  Should we just 
expose the registered types?




-- 
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]


Reply via email to