Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-4427

Inneficient JcrNode.hashCode and equals

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Sling Eclipse IDE 1.0.4
    • Sling Eclipse IDE 2.0.0
    • IDE
    • None

    Description

      On certain paths, JcrNode equals and hashcode perform copies of the their domElement, manipulate them and use them for equals/hashCode computations, e.g.

      			Element domElementCopy = domElement.copy();
      			domElementCopy.clearChildren();
      			Element otherDomElementCopy = other.domElement.copy();
      			otherDomElementCopy.clearChildren();
      			return domElementCopy.toString().equals(otherDomElementCopy.toString());

      This has the potential to be quite expensive and should be corrected

      Attachments

        Activity

          People

            Unassigned Unassigned
            rombert Robert Munteanu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: