Re: [PR] XBEAN-453 - honor Option.CASE_INSENSITIVE_PRO PERTIES for ctors [geronimo-xbean]
rzo1 (via GitHub) <[email protected]>
| Newsgroups | gmane.comp.java.geronimo.devel |
|---|---|
| Message-ID | <PR_kwDOAAOrUs669nAv-5deed6d2-46db-4315-b165-69328dac9208@gitbox.apache.org> |
rzo1 commented on code in PR #47:
URL: https://github.com/apache/geronimo-xbean/pull/47#discussion_r2659077098
##########
xbean-reflect/src/main/java/org/apache/xbean/recipe/ObjectRecipe.java:
##########
@@ -270,7 +273,11 @@ protected Object internalCreate(Type expectedType, boolean lazyRefAllowed) throw
//
// clone the properties so they can be used again
- Map<Property,Object> propertyValues = new LinkedHashMap<Property,Object>(properties);
+ Map<Property,Object> propertyValues = options.contains(Option.CASE_INSENSITIVE_PROPERTIES)
+ ? new TreeMap<>(Comparator.comparing(property -> property.name, String.CASE_INSENSITIVE_ORDER))
Review Comment:
Since we have `Property` as a key here, we cannot go for `new TreeMap<>(String.CASE_INSENSITIVE_ORDER)`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe-nmThH5wfGryY1pf4d8vP8EB+6BGkLq7r@public.gmane.org
For queries about this service, please contact Infrastructure at:
users-pF6z+fRhj9EyzMRdD/[email protected]