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

URLStreamHandler.equals(URL,URL) throws NullPointerException with null

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      sparc
    • OS:
      solaris_2.6

      Description



      Name: dfC67450 Date: 09/16/99



      java.net.URLStreamHandler.equals(URL u1, URL u2) throws NullPointerException
      when either u1, or u2 or both are null. This behaviour is inconsistent
      with general contract for equals(Object) method (equals(null) returns false).
      Javadoc should clarify the default equals calculation for the case
      of one or both parameters are null.

      If I'm right hostsEqual(URL,URL) and sameFile(URL,URL) methods shuold
      behave in the same manner in case of null parameters.


      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            ywangsunw Yingxian Wang (Inactive)
            Reporter:
            fdasunw Fda Fda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: