ThreeTen / threeten

This project was the home of code used to develop a modern date and time library for JDK8. Development has moved to OpenJDK and a separate backport project, threetenbp.
http://threeten.github.io/
191 stars 37 forks source link

Consider exposing getAvailableZoneIds() on ZoneId #277

Closed jodastephen closed 11 years ago

jodastephen commented 11 years ago

getAvailableZoneIds() is currently on ZoneRulesProvider rather than ZoneId. We should consider whether a convenience method with the same name should be added to ZoneId to aid discovery of the functionality.

xuemingshen commented 11 years ago

Agreed we should have one in ZoneId. Developer should not touch the provider stuff, if possible.

jodastephen commented 11 years ago

See patch https://gist.github.com/jodastephen/5110670

RogerRiggs commented 11 years ago

Looks fine though I'm not sure what 'returns a consistent set of ids' means. What aspect of the set is consistent?

jodastephen commented 11 years ago

I was thinking of the multi-threaded aspect. You won't see any kind of inconsistent or incomplete view of the IDs.

RogerRiggs commented 11 years ago

I expect the general statement about the class being thread safe covers it. Besides there is no relationship between any of the entries in the set that could be possibly be detectable (by looking at the set).

jodastephen commented 11 years ago

Fixed in http://hg.openjdk.java.net/threeten/threeten/jdk/rev/71b654aec2d0 with "consistent" removed.