Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while parsing common domain names using InternetDomainName.java #1930

Closed
marios-caspida opened this issue Dec 23, 2014 · 2 comments
Closed

Comments

@marios-caspida
Copy link

This is an easy to reproduce bug. Running the following code throws an exception.

String ff = "us-east-1.amazonaws.com";
InternetDomainName domain = InternetDomainName.from(ff);
System.out.println(domain.topPrivateDomain());

Exception in thread "main" java.lang.IllegalStateException: Not under a public suffix: us-east-1.amazonaws.com
at com.google.common.base.Preconditions.checkState(Preconditions.java:197)
at com.google.common.net.InternetDomainName.topPrivateDomain(InternetDomainName.java:424)
at *****.main(MyTestJavaClass.java:8> 9)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

@marios-caspida marios-caspida changed the title Error while parsing common domains names using InternetDomainName.java Error while parsing common domain names using InternetDomainName.java Dec 23, 2014
@cpovirk
Copy link
Member

cpovirk commented Dec 23, 2014

Duplicate of #1890.

@cpovirk cpovirk closed this as completed Dec 23, 2014
@marios-caspida
Copy link
Author

You are so right. Sorry for not noticing that ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants