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

Non-clear requirements for PermissionCollection.implies method implementation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 7
    • security-libs
    • None

      Specification of abstract method PermissionCollection.implies(Permission permission)
      looks too brief.

      -----------------------------------
      public abstract boolean implies(Permission permission)

          Checks to see if the specified permission is implied by the collection of Permission objects held in this PermissionCollection.

          Parameters:
              permission - the Permission object to compare.
          Returns:
              true if "permission" is implied by the permissions in the collection, false if not.
      -----------------------------------

      It is not clear what means "implied by the permissions in the collection".

      Is it conjunction of impiles() invoked for each member of collection ? Or disjucntion ?
      Or something else ?
      Is it correct such extreme case when BasicPermission.newPermissionCollection().implies() always return true or false ? In other word is subclass of PermissionCollection free to define what means "implied by the permissions in the collection" or there are some restrictions on interpretation of this phrase.

            weijun Weijun Wang
            sreznick Sergey Reznick (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: