opwvhk commented on code in PR #1790:
URL: https://github.com/apache/avro/pull/1790#discussion_r1965269865


##########
lang/java/avro/src/main/java/org/apache/avro/file/CodecFactory.java:
##########
@@ -66,7 +66,7 @@ public static CodecFactory xzCodec(int compressionLevel) {
   /** Snappy codec. */
   public static CodecFactory snappyCodec() {
     try {
-      return new SnappyCodec.Option();
+      return SnappyCodec.OPTION;
     } catch (Throwable t) {
       LOG.debug("Snappy was not available", t);
       return null;

Review Comment:
   In the new situation, the `SnappyCodec.OPTION` has already been created, so 
the try-catch block is now misplaced. Worse, Avro will fail to initialise when 
Snappy is not available.



-- 
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-unsubscr...@avro.apache.org

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

Reply via email to