mengdiwang / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

InetAddresses.forString throws IllegalArgumentException on valid IPv6 address #516

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. InetAddresses.forString("::7:6:5:4:3:2:1")

What is the expected output? What do you see instead?
I expect a java.net.Inet6Address object.
Instead I get exception: "java.lang.IllegalArgumentException: '::7:6:5:4:3:2:1' 
is not an IP string literal."

What version of the product are you using? On what operating system?
guava-r07 // Compiled from InetAddresses.java (version 1.5 : 49.0, super bit)
Windows XP Professional 32bit

Please provide any additional information below.
Cases: "8:7:6:5:4:3:2:1", "0:7:6:5:4:3:2:1", ":7:6:5:4:3:2:1" "::6:5:4:3:2:1" 
works all right, it happens when only the first group are zeros (suppressed to 
double colons).
http://www.faqs.org/rfcs/rfc1884.html

Original issue reported on code.google.com by krzyszto...@gmail.com on 7 Jan 2011 at 10:35

GoogleCodeExporter commented 9 years ago
Interesting article regarding this case:
http://blog.dominicsayers.com/2010/08/24/what-does-a-double-colon-mean-in-ipv6-a
ddresses/

Original comment by krzyszto...@gmail.com on 7 Jan 2011 at 3:29

GoogleCodeExporter commented 9 years ago
Thanks for this report; our IPv6 expert is looking into it now.

Original comment by kevinb@google.com on 12 Jan 2011 at 8:39

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 12 Jan 2011 at 8:39

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 20 Jan 2011 at 6:56

GoogleCodeExporter commented 9 years ago

Original comment by kevinb@google.com on 22 Jan 2011 at 7:01

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09