codingkiddo commented on code in PR #13086:
URL: https://github.com/apache/cloudstack/pull/13086#discussion_r3161427656
##########
plugins/hypervisors/kvm/src/test/java/org/apache/cloudstack/utils/qemu/QemuImgTest.java:
##########
@@ -57,7 +57,7 @@ public static void setUp() {
Connect conn = new Connect("qemu:///system", false);
conn.getVersion();
libVirtAvailable = true;
- } catch (LibvirtException ignored) {}
+ } catch (LibvirtException | LinkageError ignored) {}
Review Comment:
Thanks for the review. Agreed, `LinkageError` is broader than needed here
and could hide genuine binary compatibility problems such as
`NoSuchMethodError` or `IncompatibleClassChangeError`.
I have narrowed the catch block to only handle the native-loading related
failures that should be treated as “libvirt not available” in this setup check:
```java
LibvirtException | UnsatisfiedLinkError | ExceptionInInitializerError
```
This is a good reviewer suggestion. Accept it.
--
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]