nastra commented on code in PR #16611:
URL: https://github.com/apache/iceberg/pull/16611#discussion_r3381171248
##########
core/src/test/java/org/apache/iceberg/formats/TestFormatModelRegistry.java:
##########
@@ -86,6 +88,77 @@ void testFailingReRegistrations() {
.hasMessageContaining("Cannot register class");
}
+ @Test
+ void registerDoesNotFailWhenClassThrowsNoClassDefFoundOnInvoke() {
Review Comment:
reproducing the original issue in a unit test without mocking out a bunch of
things is a bit difficult because we'd have to simulate that parquet/orc isn't
on the classpath. Also I didn't want to provide a fix without having a test
that at least shows how the issue can happen in practice. So I figured we might
want to just have a try/catch block that essentially does what's being handled
in the affected classes.
I'm open to other ideas though. Using a package-private
`classesToRegister()` might work for `FormatModelRegistry` but not for
`InternalData`.
--
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]