Inefficient and inconsistent setAllowedOrigins collection types in AbstractSockJsService/OriginHandshakeInterceptor [SPR-13761] #18334
Labels
status: backported
An issue that has been backported to maintenance branches
type: bug
A general bug
Milestone
Juergen Hoeller opened SPR-13761 and commented
AbstractSockJsService
andOriginHandshakeInterceptor
both hadsetAllowedOrigins
/getAllowedOrigins
accessors added in the middle of the 4.1.x line, but unfortunately in an inefficient and inconsistent way: Since all access goes viacontains
calls, the optimal data structure is aSet
.OriginHandshakeInterceptor
fortunately already allows for adapting this since it declaresCollection
; however, for no good reason,AbstractSockJsService
declaresList
instead. Aligning this towards consistentCollection
declaration and efficient use of internalLinkedHashSets
is necessary, and let's rather do this right now - also in 4.1.9 - before those methods get used on a more widespread basis. For declarative configuration and Java source compilation, this change is compatible anyway; it is just not binary-compatible for precompiled jars.Affects: 4.1.8, 4.2.3
Issue Links:
Referenced from: commits 3d1ae9c, 83c9ec4
Backported to: 4.1.9
The text was updated successfully, but these errors were encountered: