Announcement Announcement Module
Collapse
No announcement yet.
HttpSessionContextIntegrationFilter-Diff. ways of checking changed context object Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HttpSessionContextIntegrationFilter-Diff. ways of checking changed context object

    I was just looking at the code of HttpSessionContextIntegrationFilter class...wonder why we are using 2 diff. ways of checking if the returned contextObject has changed or not.

    One in line no. 247-248 :

    !contextObject.equals(SecurityContextHolder.getCon text()) ---- this will compare the reference of objects

    and other in 271:
    SecurityContextHolder.getContext().hashCode() != contextWhenChainProceeded ---- this will compare their hascodes.

    Though both of them will give the same results as equals method has not been overridden in SecurityContextImpl class but for code readability if we keep the 2 comparison same that wud be gr8.

    Thanks
    Niket

  • #2
    I think I commented about this in SEC-37: http://opensource2.atlassian.com/pro.../browse/SEC-37

    Comment

    Working...
    X