###@###.### 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();
}
}
}
- duplicates
-
JDK-4995680 Parsing of Socket Constructor address is buggy in 1.4.2_03 or 1.5beta1 or both.
- Closed
- relates to
-
JDK-4957669 REGRESSION:create a socket with a Japanese hostname throws IllegalArgumentExcept
- Resolved