You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2021/09/21 15:31:01 UTC

[GitHub] [avro] RyanSkraba commented on a change in pull request #885: AVRO-2840 maven custom logical types

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: issues-unsubscribe@avro.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org