Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1279

SimpleSecurityViolation needs equals/hashcode

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.8.1
    • Core
    • None

    Description

      SimpleSecurityViolation can be used to add violations to the Set of violations when writing a custom voter.

      Creation of the instance can be done by org.apache.deltaspike.security.api.authorization.AbstractDecisionVoter#newSecurityViolation

      But since the class SimpleSecurityViolation has no equals/hashcode, adding 2 or more violations with the same reason results in multiple entries within the Set.

      A simple equals/hashcode based on the reason String property solves this.

      Attachments

        Activity

          People

            rdebusscher Rudy De Busscher
            rdebusscher Rudy De Busscher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: