mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:30:28 +00:00
Replace isAssignableFrom() with isInstance() where feasible
Closes gh-36899 Signed-off-by: Yanming Zhou <zhouyanming@gmail.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user