Print this page


Split Close
Expand all
Collapse all
          --- old/test/java/net/URI/Test.java
          +++ new/test/java/net/URI/Test.java
↓ open down ↓ 15 lines elided ↑ open up ↑
  16   16   * 2 along with this work; if not, write to the Free Software Foundation,
  17   17   * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18   18   *
  19   19   * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20   20   * or visit www.oracle.com if you need additional information or have any
  21   21   * questions.
  22   22   */
  23   23  
  24   24  /* @test
  25   25   * @summary Unit test for java.net.URI
  26      - * @bug 4464135 4505046 4503239 4438319 4991359 4866303
       26 + * @bug 4464135 4505046 4503239 4438319 4991359 4866303 7023363
  27   27   * @author Mark Reinhold
  28   28   */
  29   29  
  30   30  import java.io.ByteArrayInputStream;
  31   31  import java.io.ByteArrayOutputStream;
  32   32  import java.io.IOException;
  33   33  import java.io.ObjectInputStream;
  34   34  import java.io.ObjectOutputStream;
  35   35  import java.io.PrintStream;
  36   36  import java.net.URI;
↓ open down ↓ 1006 lines elided ↑ open up ↑
1043 1043          test("http://[1:2]").x().z();
1044 1044          test("http://[1:2:3:4:5:6:7:8:9]").x().z();
1045 1045          test("http://[1:2:3:4:5:6:7:8%]").x().z();
1046 1046          test("http://[1:2:3:4:5:6:7:8%!/]").x().z();
1047 1047          test("http://[::1.2.3.300]").x().z();
1048 1048          test("http://1.2.3").psa().x().z();
1049 1049          test("http://1.2.3.300").psa().x().z();
1050 1050          test("http://1.2.3.4.5").psa().x().z();
1051 1051          test("http://[1.2.3.4:5]").x().z();
1052 1052          test("http://1:2:3:4:5:6:7:8").psa().x().z();
     1053 +        test("http://[1.2.3.4]/").x().z();
     1054 +        test("http://[1.2.3.4/").x().z();
     1055 +        test("http://[foo]/").x().z();
     1056 +        test("http://[foo/").x().z();
     1057 +        test("s", "[foo]", "/", null, null).x().z();
     1058 +        test("s", "[foo", "/", null, null).x().z();
     1059 +        test("s", "[::foo", "/", null, null).x().z();
1053 1060  
1054 1061          // Test hostnames that might initially look like IPv4 addresses
1055 1062  
1056 1063          test("s://1.2.3.com").psa().s("s").h("1.2.3.com").p("").z();
1057 1064          test("s://1.2.3.4me.com").psa().s("s").h("1.2.3.4me.com").p("").z();
1058 1065  
1059 1066          test("s://7up.com").psa().s("s").h("7up.com").p("").z();
1060 1067          test("s://7up.com/p").psa().s("s").h("7up.com").p("/p").z();
1061 1068          test("s://7up").psa().s("s").h("7up").p("").z();
1062 1069          test("s://7up/p").psa().s("s").h("7up").p("/p").z();
↓ open down ↓ 555 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX