Use instanceof instead of Class#isInstance where feasible

Closes gh-25446
This commit is contained in:
XenoAmess
2020-07-21 23:00:43 +08:00
committed by Sam Brannen
parent 9fe1feea9a
commit c547809e89
10 changed files with 10 additions and 10 deletions

View File

@@ -69,7 +69,7 @@ public class HandlerResultMatchers {
assertNotNull("No handler", handler);
if (handler != null) {
Class<?> actual = handler.getClass();
if (HandlerMethod.class.isInstance(handler)) {
if (handler instanceof HandlerMethod) {
actual = ((HandlerMethod) handler).getBeanType();
}
assertEquals("Handler type", type, ClassUtils.getUserClass(actual));