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

REGRESSION:create a socket with a Japanese hostname throws IllegalArgumentExcept

    XMLWordPrintable

Details

    • b32
    • x86
    • windows_xp

    Description


      ###@###.### 2003-11-20

      J2SE Version (please include all output from java -version flag):

       java version "1.5.0-beta"
       Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b28)
       Java HotSpot(TM) Client VM (build 1.5.0-beta-b28, mixed mode)

      Does this problem occur on J2SE 1.4 or 1.4.1 or 1.4.2? Yes / No (pick one)

       No

      Operating System Configuration Information (be specific):

       Windows XP


      Bug Description:

       Creating a socket with a Japanese host name throws not
       UnknownHostException but IllegalArgumentException.


      Steps to Reproduce (be specific):

      The following is the sample program to reproduce the problem. Just compile and run it:

      import java.io.IOException;
      import java.net.Socket;
      import java.net.UnknownHostException;

      class SocketTest {
          public static void main(String[] args) {
              try {
                  Socket s = new Socket("\u67f4\u7530\u82b3\u6a39", 8000);
              } catch (UnknownHostException e) {
                  e.printStackTrace();
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
      }



      Attachments

        Issue Links

          Activity

            People

              ywangsunw Yingxian Wang (Inactive)
              tyao Ting-Yun Ingrid Yao (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: