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

java.util.jar.Attributes:equals() javadoc is not accurate

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 13
    • Component/s: core-libs
    • Subcomponent:
    • Resolved In Build:
      b07
    • Verification:
      Not verified

      Description

      The javadoc for Attributes.equals says the following:

      -------------------

      /**
           * Compares the specified Attributes object with this Map for equality.
           * Returns true if the given object is also an instance of Attributes
           * and the two Attributes objects represent the same mappings.
           *
           * @param o the Object to be compared
           * @return true if the specified Object is equal to this Map
           */
      -------------------

      The implementation does not validate the the object passed to equals is an instance of Attributes so it could just be a Map.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lancea Lance Andersen
                Reporter:
                lancea Lance Andersen
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: