File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
bson/src/main/org/bson/codecs/pojo Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 16
16
17
17
package org .bson .codecs .pojo ;
18
18
19
+ import java .util .ArrayList ;
19
20
import java .util .Collections ;
21
+ import java .util .HashMap ;
20
22
import java .util .List ;
21
23
import java .util .Map ;
22
24
@@ -45,13 +47,14 @@ public final class ClassModel<T> {
45
47
this .name = clazz .getSimpleName ();
46
48
this .type = clazz ;
47
49
this .hasTypeParameters = clazz .getTypeParameters ().length > 0 ;
48
- this .propertyNameToTypeParameterMap = Collections .unmodifiableMap (propertyNameToTypeParameterMap );
50
+ this .propertyNameToTypeParameterMap = Collections .unmodifiableMap (
51
+ new HashMap <String , TypeParameterMap >(propertyNameToTypeParameterMap ));
49
52
this .instanceCreatorFactory = instanceCreatorFactory ;
50
53
this .discriminatorEnabled = discriminatorEnabled ;
51
54
this .discriminatorKey = discriminatorKey ;
52
55
this .discriminator = discriminator ;
53
56
this .idPropertyModelHolder = idPropertyModelHolder ;
54
- this .propertyModels = Collections .unmodifiableList (propertyModels );
57
+ this .propertyModels = Collections .unmodifiableList (new ArrayList < PropertyModel <?>>( propertyModels ) );
55
58
}
56
59
57
60
/**
You can’t perform that action at this time.
0 commit comments