Directory Client API
  1. Directory Client API
  2. DIRAPI-147

LdifEntry equals method does not compare entry attributes when changetype is None

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0-M17
    • Fix Version/s: 1.0.0-M18
    • Environment:
      Windows, Linux

      Description

      The equals() method of LdifEntry does not consider the inner entry's attributes when ChangeType is not specified in the LDIF entry.

      According to the the LDIF spec, when no changetype is specified in an LDIF entry, a changetype "ADD" is to be assumed.

      An easy fix would be, in the equals() method of LdifEntry.java, add case NONE to the switch at:

      // Check each different cases
      switch ( changeType )
      {

      case None: //<-- Add None case fall through
      case Add:
      ......

        Activity

        Hide
        Emmanuel Lecharny added a comment -

        Closing the resolved issues.

        Show
        Emmanuel Lecharny added a comment - Closing the resolved issues.
        Hide
        Emmanuel Lecharny added a comment -
        Show
        Emmanuel Lecharny added a comment - Patch applied : http://svn.apache.org/r1495250
        Hide
        Michael Moorman added a comment -

        Thanks Emmanuel! I think the hashCode method may have a similar issue.

        Much appreciated,

        Mike

        Show
        Michael Moorman added a comment - Thanks Emmanuel! I think the hashCode method may have a similar issue. Much appreciated, Mike
        Hide
        Emmanuel Lecharny added a comment -

        Good catch... I will apply the proposed change before releasing (I was just in the middle of a release, this is a good thing you filled this JIRA before I started the vote !)

        Show
        Emmanuel Lecharny added a comment - Good catch... I will apply the proposed change before releasing (I was just in the middle of a release, this is a good thing you filled this JIRA before I started the vote !)

          People

          • Assignee:
            Emmanuel Lecharny
            Reporter:
            Michael Moorman
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1h
              1h
              Remaining:
              Remaining Estimate - 1h
              1h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development