kennknowles commented on a change in pull request #16271:
URL: https://github.com/apache/beam/pull/16271#discussion_r785075074
##########
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)
Review comment:
Makes sense. At some point we should improve upstream apache/avro or
possibly just add a stub file here. For now, can you narrow the scope of the
`@SuppressWarnings` annotation to this method? Or, ideally, to a single
assignment statement like so:
```java
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]