java.util.Locale
is one of those classes where I wonder whether I'm too stupid or the guy who wrote it. Is Mark Davis around?
As far as I can see, this class isn't supposed to be used. The internal cache in the class is private. The factory package private. equals()
uses ==
to compare strings. This means that I can't compare instances of the class for equality unless I create instances myself, put them into a cache somewhere, violating DRY.
Is this what I should do? Is there a sane explanation for this behavior???