@@ -58,7 +58,7 @@ protected PropertyBasedCreator(DeserializationContext ctxt,
58
58
{
59
59
_valueInstantiator = valueInstantiator ;
60
60
if (caseInsensitive ) {
61
- _propertyLookup = new CaseInsensitiveMap ( );
61
+ _propertyLookup = CaseInsensitiveMap . construct ( ctxt . getConfig (). getLocale () );
62
62
} else {
63
63
_propertyLookup = new HashMap <String , SettableBeanProperty >();
64
64
}
@@ -226,14 +226,36 @@ static class CaseInsensitiveMap extends HashMap<String, SettableBeanProperty>
226
226
{
227
227
private static final long serialVersionUID = 1L ;
228
228
229
+ /**
230
+ * Lower-casing can have Locale-specific minor variations.
231
+ *
232
+ * @since 2.11
233
+ */
234
+ protected final Locale _locale ;
235
+
236
+ @ Deprecated // since 2.11
237
+ public CaseInsensitiveMap () {
238
+ this (Locale .getDefault ());
239
+ }
240
+
241
+ // @since 2.11
242
+ public CaseInsensitiveMap (Locale l ) {
243
+ _locale = l ;
244
+ }
245
+
246
+ // @since 2.11
247
+ public static CaseInsensitiveMap construct (Locale l ) {
248
+ return new CaseInsensitiveMap (l );
249
+ }
250
+
229
251
@ Override
230
252
public SettableBeanProperty get (Object key0 ) {
231
- return super .get (((String ) key0 ).toLowerCase ());
253
+ return super .get (((String ) key0 ).toLowerCase (_locale ));
232
254
}
233
255
234
256
@ Override
235
257
public SettableBeanProperty put (String key , SettableBeanProperty value ) {
236
- key = key .toLowerCase ();
258
+ key = key .toLowerCase (_locale );
237
259
return super .put (key , value );
238
260
}
239
261
}
0 commit comments