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; } }