Deserialize timeZoneName while considering known aliases. - #1200
Conversation
MikeNeilson
left a comment
There was a problem hiding this comment.
Conceptually this looks reasonable. Wish there was a better way to handle the aliases... would just doing a .json file be cleaner than trying to map to the java properties syntax?
| * values are their corresponding standard timezone IDs | ||
| */ | ||
| public static @NotNull Map<String, String> buildTimeZoneAliases() { | ||
| Map<String, String> aliases = buildResourceAliases(); |
There was a problem hiding this comment.
would it be better to just load the defaults into the map, and then let the resource file override any existing entries? versus the all or nothing approach?
There was a problem hiding this comment.
You could be right. My worry was that there would be no good way to replace a default if the default was wrong or no longer wanted.
There was a problem hiding this comment.
It weirded me out to need jackson to read the resource when the class was going to be needed by jackson objectmappers. Idk, maybe it would just work.
There was a problem hiding this comment.
... fair point. though the most generic instance of ObjectMapper would work.
But there's also nothing wrong with the current setup, just also seemed... awkward.
No description provided.