jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Dürig (JIRA) <j...@apache.org>
Subject [jira] [Created] (JCR-3848) AdminPrincipal.equals violates general contract hashCode
Date Thu, 29 Jan 2015 13:25:36 GMT
Michael Dürig created JCR-3848:

             Summary: AdminPrincipal.equals violates general contract hashCode
                 Key: JCR-3848
                 URL: https://issues.apache.org/jira/browse/JCR-3848
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
            Reporter: Michael Dürig

According to the general contract equal object must have equal hash codes. However the following
code fails:

AdminPrincipal p1 = new AdminPrincipal("p1");
AdminPrincipal p2 = new AdminPrincipal("p2");

assertTrue(!p1.equals(p2) || p1.hashCode() == p2.hashCode());

Original report: http://markmail.org/message/5eorcvf75gywh66t

This message was sent by Atlassian JIRA

View raw message