guava icon indicating copy to clipboard operation
guava copied to clipboard

InternetDomainName toString() method unexpected behavior

Open ffr4nz opened this issue 11 years ago • 5 comments

.toString() method returns "InternetDomainName{name=domainORtldORwhatever}" Should not simply return the domainORtldORwhatever?

Example code:

InternetDomainName owner = InternetDomainName.from("www.elmundo.es").topPrivateDomain(); System.out.println(owner.toString());

Print:

InternetDomainName{name=elmundo.es}

What I expect is:

elmundo.es

Is it an error? is it an expected behavior?

I'm using:

com.google.guava guava 18.0

Thanks!

ffr4nz avatar Jan 29 '15 14:01 ffr4nz

toString() has worked as you describe since 15.0. Do you have an older version of Guava on your classpath alongside 18.0?

cpovirk avatar Mar 05 '15 23:03 cpovirk

(sorry, "worked as you describe" meaning "returns the name")

cpovirk avatar Mar 05 '15 23:03 cpovirk

Yeah, deleted my comment when I realized Storm 0.9.2 was overriding with Guava 13. Pardon me.

devoncrouse avatar Mar 06 '15 00:03 devoncrouse

I have the same problem , storm is overriding guava with a older version. Is there any solution to this problem?

chethan avatar Feb 16 '17 22:02 chethan

@chethan Is this Apache Storm, or another Storm? :)

jbduncan avatar Feb 16 '17 22:02 jbduncan