Spring Security
  1. Spring Security
  2. SEC-1702

AntPathRequestMatcher overrides equals but not hashCode

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 3.1.0.RC1
    • Fix Version/s: 3.1.0.RC2
    • Component/s: Core
    • Labels:
      None

      Description

      Here's a proposed implementation:

      public int hashCode() {
         int code = 31 ^ pattern.hashCode();
         if (httpMethod != null) {
            code ^= httpMethod.hashCode();
         }
         return code;
      }
      

        Activity

        Hide
        Luke Taylor added a comment -

        Thanks, Burt. I've added the method.

        Show
        Luke Taylor added a comment - Thanks, Burt. I've added the method.

          People

          • Assignee:
            Luke Taylor
            Reporter:
            Burt Beckwith
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: