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

URI(String uri) constructor - for relative path

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not an Issue
    • P3
    • None
    • 1.4.0
    • core-libs
    • sparc
    • solaris_8

    Description

      according to spec java.net.URI
      The path component of a hierarchical URI is itself said to be absolute
      if it begins with a
      slash character ('/'); otherwise it is relative.
      The path of a hierarchical URI that is either absolute or specifies an
      authority is always absolute.

      Then these URI Valid /Invalid??? to give it to URI(String str) constructor
      ftp:/###@###.###:8080/./home/../hl130885/test
      ftp:/hash@blr+sunray.india.sun.com:8080/test/../home/hl130885/test

      If it is not valid then should throw exception. which it is not.

      If valid then
      for ftp:/###@###.###:8080/./home/../hl130885/test
      it is parsing like this which i feel it is not correct.

      Scheme =ftp
      SchemeSpecificPart=/###@###.###:8080/./home/../hl130885/test
      Fragment =null
      Authority =null
      Path =/###@###.###:8080/./home/../hl130885/test
      Port =-1
      Host =null
      Query =null
      UserInfo =null

      for ftp:/hash@blr+sunray.india.sun.com:8080/test/../home/hl130885/test
      it is parsing like this which i feel it is not correct.
      Scheme =ftp
      SchemeSpecificPart=/hash@blr+sunray.india.sun.com:8080/test/../home/hl130885/test
      Fragment =null
      Authority =null
      Path =/hash@blr+sunray.india.sun.com:8080/test/../home/hl130885/test
      Port =-1
      Host =null
      Query =null
      UserInfo =null

      Attachments

        Activity

          People

            alanb Alan Bateman
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: