Balzanka / guava-libraries

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

Provide a mechanism to augment the TldPatterns lists dynamically #1123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There are valid domains that can't really be manipulated with 
InternetDomainName because their TLD isn't in the hard-coded TldPatterns.java 
class, but it's not reasonable to have to rebuild the Guava library every time 
a new TLD is encountered. There should be methods along the lines of 
addExactTld(), addUnderTld(), addExcludedTld() which would allow the user to 
augment (or perhaps completely override) the library's TLD set with values 
specific to the user's application.
For instance, using Guava 11.0.2 the valid domain "miele.pm" fails
Of course we could fork the Guava code to add this additional flexibility but 
we'd prefer not to.

Thanks in advance.

Original issue reported on code.google.com by sheldonr...@gmail.com on 28 Aug 2012 at 7:38

GoogleCodeExporter commented 9 years ago
I wonder if Google Chrome uses Guava to parse domain names. When I type 
"miele.pm" in the Chrome address bar (on an empty cache), and hit enter, it 
does a Google search for "miele.pm". But when I do the same for "miele.fr", 
Chrome detects that it's a domain name, and directly sends me to "miele.fr".

Original comment by nev...@gmail.com on 29 Aug 2012 at 1:21

GoogleCodeExporter commented 9 years ago
It does not use Guava, but might use the same Public Suffix List we do.

Original comment by kevinb@google.com on 29 Aug 2012 at 3:03

GoogleCodeExporter commented 9 years ago
I don't think static state would be an okay thing here -- or anywhere in Guava 
-- but maybe there's room here for a builder or something for a pattern set?

Original comment by wasserman.louis on 29 Aug 2012 at 3:54

GoogleCodeExporter commented 9 years ago
Would issue 475 solve your needs?

Original comment by kevinb@google.com on 23 Oct 2012 at 4:50

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:13

GoogleCodeExporter commented 9 years ago

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

GoogleCodeExporter commented 9 years ago

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