File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
doma-core/src/main/java/org/seasar/doma/jdbc/entity Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 22
33import static java .util .stream .Collectors .toMap ;
44
5+ import java .util .LinkedHashMap ;
56import java .util .List ;
67import java .util .Map ;
78import java .util .function .Function ;
@@ -35,7 +36,14 @@ public EmbeddedPropertyType(
3536 this .embeddablePropertyTypes = embeddablePropertyType ;
3637 this .embeddablePropertyTypeMap =
3738 this .embeddablePropertyTypes .stream ()
38- .collect (toMap (EntityPropertyType ::getName , Function .identity ()));
39+ .collect (
40+ toMap (
41+ EntityPropertyType ::getName ,
42+ Function .identity (),
43+ (u , v ) -> {
44+ throw new IllegalStateException (String .format ("Duplicate key %s" , u ));
45+ },
46+ LinkedHashMap ::new ));
3947 this .field = new PropertyField <>(name , entityClass );
4048 }
4149
You can’t perform that action at this time.
0 commit comments