Replace isAssignableFrom() with isInstance() where feasible

Closes gh-36899

Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
Yanming Zhou
2026-06-15 15:16:18 +02:00
committed by GitHub
parent 0c60266986
commit cdc3c52640
31 changed files with 37 additions and 47 deletions
@@ -61,7 +61,7 @@ public abstract class ModelAndViewAssert {
fail("Model attribute with name '" + modelName + "' is null");
}
assertTrue("Model attribute is not of expected type '" + expectedType.getName() + "' but rather of type '" +
obj.getClass().getName() + "'", expectedType.isAssignableFrom(obj.getClass()));
obj.getClass().getName() + "'", expectedType.isInstance(obj));
return (T) obj;
}