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

java.net.URI: no difference between 'null' and empty authority

XMLWordPrintable

    • generic
    • generic

      The attached test demonstrates that two (I think) different URIs are 'equal'.

      The RFC 3986 states (5.2.1.):

      "... A component is undefined if its associated delimiter does not appear in the URI reference; ..."

      In our case 'authority' delimiter is present, consequently authority isn't defined, it is empty.

      It seems that query & fragment have the same problem.
      I think 'backward compatibility' isn't actual for URI class now.
      If you not fix this problem, I will have to exclude valid tests from JCK or adopt them to RI (I think this is very bad)

            yuwangsunw Yujiang Wang (Inactive)
            itseytin Igor Tseytin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: