Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4331102

docs: not clear when AccessibleRelationSet.add() is legal

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.3.0
    • client-libs
    • None
    • merlin
    • x86
    • windows_nt
    • Not verified

       jethro@eng 17Apr2000

      The documentation for AccessibleRelationSet.add() says that the relation
      is added "if it is not already there," which is very ambiguous. For instance,
      if a MEMBER_OF relation is added and a previous MEMBER_OF relation is
      already in the set, will the new relation be added?. Also, what if two
      distinct relations are equals (have the same key and values).

      The current implementation appears to check for identity only - if two
      relations are exactly equal, but not the same object, they can both
      be in the relation set.

      After talking with Lynn Monsanto, it seems that each RelationSet should
      allow only one instance of each KEY, and new relations added with the same
      key should either replace the old one or return false. Not clear which
      from the documentation.

      I think that the implementation should automatically merge the targets
      of relations with the same key, and that the documentation should be
      updated to reflect this behavior.

      the same key

            lmonsantsunw Lynn Monsanto (Inactive)
            jdunnsunw Jeffrey Dunn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: