JDK-8041622 : InetAddress.getByName incorrectly parses "4294967296"
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.net
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: os_x,solaris
  • CPU: generic
  • Submitted: 2014-04-23
  • Updated: 2014-04-23
  • Resolved: 2014-04-23
Related Reports
Duplicate :  
Description
This is from test "java/net/Inet4Address/textToNumericFormat.java"

It was expected to throw UnknownHostException for "4294967296" in following sentence.
InetAddress ia = InetAddress.getByName(badAddrs[i]);

But it is unexpectedly parsed on Mac and Solaris(both sparc and X86). Tested with the same build on Windows 32 bit, and it passed.

Log:
java.lang.RuntimeException: Bad Address parsed: [4294967296]
	at textToNumericFormat.main(textToNumericFormat.java:85)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:484)
	at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:754)
	at java.lang.Thread.run(Thread.java:745)




Comments
RULE java/net/Inet4Address/textToNumericFormat.java Exception java.lang.RuntimeException: Bad Address parsed: [4294967296]
23-04-2014