JDK-6345387 : java.net.URI: no difference between 'null' and empty authority
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2005-11-03
  • Updated: 2017-05-16
  • Resolved: 2006-05-19
Related Reports
Relates :  
Description
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)

Comments
EVALUATION See comment.
04-11-2005