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

REGRESSION:create a socket with a Japanese hostname throws IllegalArgumentExcept

XMLWordPrintable

    • b46
    • x86
    • windows_xp


      ###@###.### 2004-03-22

      J2SE Version (please include all output from java -version flag):
        java version "1.5.0-beta2"
        Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b42)
        Java HotSpot(TM) Client VM (build 1.5.0-beta2-b42, mixed mode, sharing)

      Does this problem occur on J2SE 1.3.x or 1.4.x? Yes / No (pick one)
        No

      Operating System Configuration Information (be specific):
        Windows XP

      Hardware Configuration Information (be specific):
        Pentium 4, 1.5GHz, 512MB memory

      Bug Description:

        <Bug-Id:4957669 has not been correctly fixed yet>

        Creating a socket with a Japanese name throws not UnknowHostException
        but IllegalArgumentException.

        Sorry for reporting late. I noticed this but I didn't find time to
        investigate which japanese name caused the problem.

      Steps to Reproduce (be specific):

      Just try to compile the following code 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("\u6749\u672c \u671d\u9999", 8000);
              } catch (UnknownHostException e) {
                  e.printStackTrace();
              } catch (IOException e) {
                  e.printStackTrace();
              }
          }
      }





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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: