I have this old code implemented for Spring 2.4
public class Interceptor extends HandlerInterceptorAdapter {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
Object handler) throws Exception {
........
return super.preHandle(request, response, handler);
}
}
I migrated the code to Spring 2.6:
public class Interceptor implements HandlerInterceptor {
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response,
Object handler) throws Exception {
......................
return HandlerInterceptor.super.preHandle(request, response, handler);
}
}
I got Cannot resolve method 'preHandle' in 'Object' so I change the code to HandlerInterceptor.super.preHandle(request, response, handler);
Is it correct to edit the code this way: HandlerInterceptor.super.preHandle(request, response, handler); or this should be edited another way?