yangxu998 / guava-libraries

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

InetAddresses.TeredoInfo constructor uses %d in Preconditions.checkArgument format string #621

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I noticed this while browsing through some of the code in release 9: the 
TeredoInfo constructor (InetAddresses.java line 581 or so) has:

Preconditions.checkArgument((port >= 0) && (port <= 0xffff),
    "port '%d' is out of range (0 <= port <= 0xffff)", port);
Preconditions.checkArgument((flags >= 0) && (flags <= 0xffff),
    "flags '%d' is out of range (0 <= flags <= 0xffff)", flags);

The format strings for checkArgument only accept %s (I just double-checked, and 
that is still true as of release 9). That said, it wouldn't cause any nasty 
problems--just an odd-looking exception string.

I double-checked the latest trunk published to google code, and the problem 
remains.

Original issue reported on code.google.com by timw.at....@gmail.com on 15 May 2011 at 9:13

GoogleCodeExporter commented 9 years ago
Thanks.

Original comment by cpov...@google.com on 22 Jun 2011 at 8:24

GoogleCodeExporter commented 9 years ago

Original comment by cpov...@google.com on 22 Jun 2011 at 10:35

GoogleCodeExporter commented 9 years ago
Fixed internally, should be mirrored externally soon, and will be in release 10.

Original comment by cpov...@google.com on 23 Jun 2011 at 4:09

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