Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
The Harmony method java.net.URI(String scheme, String authority, String path, String query, String fragment) throws URISyntaxException for incorrect ipv6 address while RI silently skip it.
Note, the URI unit test for this constructor failed on RI and passed on Harmony.
====================== test.java =======================
import java.net.*;
public class test {
public static void main (String[] args) throws Exception
}
====================================================
Output:
C:\tmp\tmp17>C:\jdk1.5.0_06\bin\java.exe -cp . -showversion test
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
res = ftp:///dir?query#frag
C:\tmp\tmp17>C:\harmony\classlib1.5\deploy\jdk\jre\bin\java.exe -cp . -showversion test
java version 1.5 (subset)
(c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
Exception in thread "main" java.net.URISyntaxException: Malformed ipv6 address: [www.abc.com]
at java.net.URI$Helper.isValidHost(URI.java:467)
at java.net.URI$Helper.parseAuthority(URI.java:431)
at java.net.URI$Helper.parseURI(URI.java:31)
at java.net.URI$Helper.access$100(URI.java:22)
at java.net.URI.<init>(URI.java:199)
at test.main(test.java:5)