anoopj commented on code in PR #16611:
URL: https://github.com/apache/iceberg/pull/16611#discussion_r3325191085


##########
common/src/main/java/org/apache/iceberg/common/DynClasses.java:
##########
@@ -66,7 +66,7 @@ public Builder impl(String className) {
 
       try {
         this.foundClass = Class.forName(className, true, loader);
-      } catch (ClassNotFoundException e) {
+      } catch (ClassNotFoundException | NoClassDefFoundError | 
ExceptionInInitializerError e) {
         // not the right implementation

Review Comment:
   ```suggestion
           // cannot load this implementation
   ```



##########
core/src/main/java/org/apache/iceberg/formats/FormatModelRegistry.java:
##########


Review Comment:
   ExceptionInInitializerError.getMessage() would return null. One way to fix 
it is to check if `e.getCause()` is not null and if so use its message. 



##########
common/src/main/java/org/apache/iceberg/common/DynConstructors.java:
##########
@@ -144,7 +144,7 @@ public Builder impl(String className, Class<?>... types) {
       try {
         Class<?> targetClass = classForName(className);
         impl(targetClass, types);
-      } catch (NoClassDefFoundError | ClassNotFoundException e) {
+      } catch (NoClassDefFoundError | ClassNotFoundException | 
ExceptionInInitializerError e) {
         // cannot load this implementation

Review Comment:
   comment is stale (same fix as above). Same applies for below



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to