InternetDomainName.topPrivateDomain() throws exception for Amazonaws-Domain #7151
Closed
1 task done
Labels
type=defect
Bug, not working as expected
Description
We just noticed that the method InternetDomainName.topPrivateDomain() throws an IllegalStateException for the host s3-eu-west-1.amazonaws.com. Strange: replacing the "s3" by something else works as expected.
Example
Expected Behavior
s3-eu-west-1.amazonaws.com hasPublicSuffix
topPrivateDomain: amazonaws.com
Actual Behavior
s3-eu-west-1.amazonaws.com hasPublicSuffix
Exception in thread "main" java.lang.IllegalStateException: Not under a public suffix: s3-eu-west-1.amazonaws.com
at com.google.common.base.Preconditions.checkState(Preconditions.java:604)
at com.google.common.net.InternetDomainName.topPrivateDomain(InternetDomainName.java:466)
at de.swr.online.GuavaTest.main(GuavaTest.java:13)
Packages
No response
Platforms
Java 8, Java 11, Java 17
Checklist
The text was updated successfully, but these errors were encountered: