Duplicated interceptors in HandlerExecutionChain after intermediate getInterceptors() call [SPR-12566] #17167
Labels
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Juraj Bak opened SPR-12566 and commented
Method HandlerExecutionChain.initInterceptorList() duplicates interceptor records if attribute interceptorList contains previously added items resulting into duplicated interceptor calls.
Simple fix is to add this.interceptorList.clear() or initialize new Instance of list before line 104.
this.interceptorList.addAll(Arrays.asList(this.interceptors));
See attached source and test.
Btw. Is there a reason for convertion between collection and array? Class AbstractHandlerMapping works with collections, also a HandlerExecutionChain do so internally. But interface uses arrays and forces everybody to convert collections to arrays and back.
Affects: 3.2.12, 4.1.3
Attachments:
Referenced from: commits e353af6, 37713ae, 6b3023c
Backported to: 4.0.9, 3.2.13
The text was updated successfully, but these errors were encountered: