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 1616
1717package org .bson .codecs .pojo ;
1818
19+ import java .util .Collections ;
1920import java .util .List ;
2021import java .util .Map ;
2122
@@ -44,13 +45,13 @@ public final class ClassModel<T> {
4445 this .name = clazz .getSimpleName ();
4546 this .type = clazz ;
4647 this .hasTypeParameters = clazz .getTypeParameters ().length > 0 ;
47- this .propertyNameToTypeParameterMap = propertyNameToTypeParameterMap ;
48+ this .propertyNameToTypeParameterMap = Collections . unmodifiableMap ( propertyNameToTypeParameterMap ) ;
4849 this .instanceCreatorFactory = instanceCreatorFactory ;
4950 this .discriminatorEnabled = discriminatorEnabled ;
5051 this .discriminatorKey = discriminatorKey ;
5152 this .discriminator = discriminator ;
5253 this .idPropertyModelHolder = idPropertyModelHolder ;
53- this .propertyModels = propertyModels ;
54+ this .propertyModels = Collections . unmodifiableList ( propertyModels ) ;
5455 }
5556
5657 /**
You can’t perform that action at this time.
0 commit comments