I was reading Spring's code base and stumbled upon this:

public class HandlerExecutionChain {

    private static final Log logger = LogFactory.getLog(HandlerExecutionChain.class);

    private final Object handler;

    @Nullable
    private HandlerInterceptor[] interceptors;

    @Nullable
    private List<HandlerInterceptor> interceptorList;
...

I haven't looked into this thoroughly, but looks like one of interceptors and interceptorList is redundant. Interestingly it has been like this from the first commit that I could find in the history: af47a8b79b0fa07ff2c038197a07c09b745802ac (HandlerExecutionChain.java).

Comment From: sbrannen

This is indeed some very old code in the framework, dating back to 2003.

@jhoeller, do you think this is worth revisiting, or shall we simply leave it as-is?

Comment From: jhoeller

This is an optimization for the HandlerInterceptor[] getInterceptors() accessor which returns a pre-built array, while modifications operate on the List. From a modern-day perspective with generics etc, we'd rather make that accessor return a List directly. And that's where I do see a point here: For our internal processing, we could operate on the List directly, leaving the present HandlerInterceptor[] getInterceptors() just for (old) external integration code - in which case we could freshly build the array there every time and get rid of the array field (and probably deprecate the array accessor). I'll try this for 5.3 M2