[ 
https://issues.apache.org/jira/browse/BEAM-8388?focusedWorklogId=709239&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-709239
 ]

ASF GitHub Bot logged work on BEAM-8388:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 14/Jan/22 18:47
            Start Date: 14/Jan/22 18:47
    Worklog Time Spent: 10m 
      Work Description: kennknowles commented on a change in pull request 
#16271:
URL: https://github.com/apache/beam/pull/16271#discussion_r785076419



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/AvroRecordSchema.java
##########
@@ -32,12 +32,14 @@
  * objects, creating a schema that matches that inferred by the AVRO libraries.
  */
 @SuppressWarnings({
+  "nullness", // TODO(https://issues.apache.org/jira/browse/BEAM-10402)
   "rawtypes" // TODO(https://issues.apache.org/jira/browse/BEAM-10556)
 })
 public class AvroRecordSchema extends GetterBasedSchemaProvider {
   @Override
   public <T> Schema schemaFor(TypeDescriptor<T> typeDescriptor) {
-    return 
toBeamSchema(ReflectData.get().getSchema(typeDescriptor.getRawType()));
+    Class<?> avroType = typeDescriptor.getRawType();

Review comment:
       ```suggestion
       Class<?> avroType = typeDescriptor.getRawType();
       @SuppressWarnings("nullness") // new ReflectData(ClassLoader) is not 
annotated to accept null
       ClassLoader classLoader = avroType.getClassLoader
       return toBeamSchema(new ReflectData(classLoader).getSchema(avroType));
   ```




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


Issue Time Tracking
-------------------

            Worklog Id:     (was: 709239)
    Remaining Estimate: 16h 10m  (was: 16h 20m)
            Time Spent: 7h 50m  (was: 7h 40m)

> Update Avro to 1.9.1 from 1.8.2
> -------------------------------
>
>                 Key: BEAM-8388
>                 URL: https://issues.apache.org/jira/browse/BEAM-8388
>             Project: Beam
>          Issue Type: Improvement
>          Components: io-java-avro
>            Reporter: Jordanna Chord
>            Priority: P3
>   Original Estimate: 24h
>          Time Spent: 7h 50m
>  Remaining Estimate: 16h 10m
>
> Update build dependency to 1.9.1



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to