Uploaded image for project: 'Apache Roller'
  1. Apache Roller
  2. ROL-1870

Duplicate bookmarks not showing

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.0.1
    • 5.1.0
    • None

    Description

      Hello,

      Noticed that bookmarks with the same name in the same folder do not show on the ui. The method from WeblogBookmarkFolder

      public Set getBookmarks()

      { return this.bookmarks; }

      uses a set, but the pojo WeblogBookmark uses this equals/hashcode, ie name and folder. Needs a uniqueness. Only option is to use the id.

      public boolean equals(Object other)

      { if (other == this) return true; if (other instanceof WeblogBookmark != true) return false; WeblogBookmark o = (WeblogBookmark)other; return new EqualsBuilder() .append(getName(), o.getName()) .append(getFolder(), o.getFolder()) .isEquals(); }

      public int hashCode()

      { return new HashCodeBuilder() .append(getName()) .append(getFolder()) .toHashCode(); }

      Attachments

        1. duplicate-bookmark.patch
          2 kB
          Shelan Perera

        Activity

          People

            roller_unassigned Roller Unassigned
            greg.huber@ricoh.co.uk Greg Huber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: