From 093f6347591decb3f5adb0e83a020d90ad81bd5c Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Thu, 21 Nov 2024 11:09:05 -0600 Subject: [PATCH] Fix isAssignableFrom() usage --- .../jboss/arquillian/testcontainers/TestContainersObserver.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java b/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java index 4bf992a..456ff65 100644 --- a/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java +++ b/src/main/java/org/jboss/arquillian/testcontainers/TestContainersObserver.java @@ -46,7 +46,7 @@ public void createContainer(@Observes(precedence = 500) BeforeClass beforeClass) final var overrideClass = System.getProperty("org.arquillian.testcontainers.docker.required.exception"); if (overrideClass != null && !overrideClass.isBlank()) { Class override = Class.forName(overrideClass); - if (override.isAssignableFrom(Throwable.class)) { + if (Throwable.class.isAssignableFrom(override)) { throwable = (Class) override; } }