Current version of PartialUriTemplate infers that parameter map must be of type <String, Object>. If another type of map, like Map<String, String> is supplied, a different method expand(Object... parameters) quietly takes over, and the result gets totally wrong.
According to the source code (and general developer's practices) there's no reason why parameter map can not be generic like Map<String, ?> Updated method will work with other maps like Map<String, String> and Map<String, Integer> in the same way original Map<String, Object> have worked.
P.S. Struggling with Map<String, String> in my code took me a full day. Fixing PartialUriTemplate took just 5 minutes :)
Current version of PartialUriTemplate infers that parameter map must be of type <String, Object>. If another type of map, like Map<String, String> is supplied, a different method expand(Object... parameters) quietly takes over, and the result gets totally wrong.
According to the source code (and general developer's practices) there's no reason why parameter map can not be generic like Map<String, ?> Updated method will work with other maps like Map<String, String> and Map<String, Integer> in the same way original Map<String, Object> have worked.
P.S. Struggling with Map<String, String> in my code took me a full day. Fixing PartialUriTemplate took just 5 minutes :)