Thanks for sharing this information Attila!
The folks at Glassfish suggested I use URIs as well.
I created WICKET-3867 to change URLs to URIs.
On 04/07/2011 1:48 AM, Attila Király wrote:
Using java.net.URL in Set-s and Map-s is a no-no. Wicket should use
java.net.URI instead. See [1] for an example.
Attila
[1] "More Joy of Sets" example with URL from Google Tech Talks:
http://www.youtube.com/watch?v=wDN_EYUvUq0#t=9m58s
2011/7/3 Bertrand Guay-Paquet<[email protected]>
When I said "second set", I meant that the same URLs are added, which is
indeed strange considering that they are added to a HashSet!
After more digging, I found that the URLs are not in fact equal as
determined by URL.equals(). The URLs with the same string value differ in
their "host" property which is used by URL.equals(). One "set" of URLs has a
host == null and the other has host == "". The actual host comparison is
done in URLStreamHandler.hostsEqual().
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]