Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-329

NodeReferencesId.equals() is not symetric

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 0.9
    • 1.0
    • None
    • None

    Description

      NodeReferencesId.equals() is not symetric when equality is tested against a NodeId.

      Code example:
      UUID uuid = UUID.randomUUID();
      NodeId id = new NodeId(uuid);
      NodeReferencesId refId = new NodeReferencesId(uuid);
      id.equals(refId); // will return true
      refId.equals(id); // will return false

      NodeReferencesId should be decouled from the ItemId hierarchy. The class NodeReferences already does not extend from NodeState which makes perfectly sense. So, the same should apply to the identifier of NodeReferences.

      The attached patch to NodeReferencesId also requires minor changes to some of the persistence managers.

      Attachments

        1. NodeReferencesId.patch
          3 kB
          Marcel Reutegger

        Activity

          People

            stefan@jira Stefan Guggisberg
            mreutegg Marcel Reutegger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: