File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
bson/src/main/org/bson/codecs/pojo Expand file tree Collapse file tree 1 file changed +3
-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 .Collections ;
19
20
import java .util .List ;
20
21
import java .util .Map ;
21
22
@@ -44,13 +45,13 @@ public final class ClassModel<T> {
44
45
this .name = clazz .getSimpleName ();
45
46
this .type = clazz ;
46
47
this .hasTypeParameters = clazz .getTypeParameters ().length > 0 ;
47
- this .propertyNameToTypeParameterMap = propertyNameToTypeParameterMap ;
48
+ this .propertyNameToTypeParameterMap = Collections . unmodifiableMap ( propertyNameToTypeParameterMap ) ;
48
49
this .instanceCreatorFactory = instanceCreatorFactory ;
49
50
this .discriminatorEnabled = discriminatorEnabled ;
50
51
this .discriminatorKey = discriminatorKey ;
51
52
this .discriminator = discriminator ;
52
53
this .idPropertyModelHolder = idPropertyModelHolder ;
53
- this .propertyModels = propertyModels ;
54
+ this .propertyModels = Collections . unmodifiableList ( propertyModels ) ;
54
55
}
55
56
56
57
/**
You can’t perform that action at this time.
0 commit comments