according to API Doc Hierarchical URI will be parsed
[scheme:][//authority][path][?query][#fragment]
it means path can be null or authority can be null
it is allowing authority null but
then for this two case why it is throwing exception where i want path to be null
sr-cblr03-02:/home/hl130885/testbase 56 % java t1 "http:/?test"
Scheme =http
SchemeSpecificPart =/?test
Fragment =null
Authority =null
Path =/
Port =-1
Host =null
Query =test
UserInfo =null
URI is absolute
URI is Hirarical
URI is http:/?test
sr-cblr03-02:/home/hl130885/testbase 57 % ^[
sr-cblr03-02:/home/hl130885/testbase 57 % java t1 "http://?test"
java.net.URISyntaxException: Illegal character in authority at index 7: http://?test
at java.net.URI$Parser.fail(URI.java:2178)
at java.net.URI$Parser.parseAuthority(URI.java:2504)
at java.net.URI$Parser.parseHierarchical(URI.java:2424)
at java.net.URI$Parser.parse(URI.java:2381)
at java.net.URI.<init>(URI.java:419)
at t1.main(t1.java:7)
sr-cblr03-02:/home/hl130885/testbase 58 % java t1 "http://x?test"
java.net.URISyntaxException: Illegal character in authority at index 7: http://x?test
at java.net.URI$Parser.fail(URI.java:2178)
at java.net.URI$Parser.parseAuthority(URI.java:2504)
at java.net.URI$Parser.parseHierarchical(URI.java:2424)
at java.net.URI$Parser.parse(URI.java:2381)
at java.net.URI.<init>(URI.java:419)
at t1.main(t1.java:7)
sr-cblr03-02:/home/hl130885/testbase 59 %
[scheme:][//authority][path][?query][#fragment]
it means path can be null or authority can be null
it is allowing authority null but
then for this two case why it is throwing exception where i want path to be null
sr-cblr03-02:/home/hl130885/testbase 56 % java t1 "http:/?test"
Scheme =http
SchemeSpecificPart =/?test
Fragment =null
Authority =null
Path =/
Port =-1
Host =null
Query =test
UserInfo =null
URI is absolute
URI is Hirarical
URI is http:/?test
sr-cblr03-02:/home/hl130885/testbase 57 % ^[
sr-cblr03-02:/home/hl130885/testbase 57 % java t1 "http://?test"
java.net.URISyntaxException: Illegal character in authority at index 7: http://?test
at java.net.URI$Parser.fail(URI.java:2178)
at java.net.URI$Parser.parseAuthority(URI.java:2504)
at java.net.URI$Parser.parseHierarchical(URI.java:2424)
at java.net.URI$Parser.parse(URI.java:2381)
at java.net.URI.<init>(URI.java:419)
at t1.main(t1.java:7)
sr-cblr03-02:/home/hl130885/testbase 58 % java t1 "http://x?test"
java.net.URISyntaxException: Illegal character in authority at index 7: http://x?test
at java.net.URI$Parser.fail(URI.java:2178)
at java.net.URI$Parser.parseAuthority(URI.java:2504)
at java.net.URI$Parser.parseHierarchical(URI.java:2424)
at java.net.URI$Parser.parse(URI.java:2381)
at java.net.URI.<init>(URI.java:419)
at t1.main(t1.java:7)
sr-cblr03-02:/home/hl130885/testbase 59 %