Skip to content

Commit

Permalink
修正 Map类型字段,在注解中不指定类型时,报错的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xiemalin authored and xiemalin committed Mar 12, 2019
1 parent 368107b commit 114b180
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ public static List<FieldInfo> processDefaultValue(List<Field> fields, boolean ig
// check if type is enum
if (Enum.class.isAssignableFrom(fieldTypeClass)) {
fieldType = FieldType.ENUM;
} else if (fieldInfo.isMap()) {
fieldType = FieldType.MAP;
} else {
fieldType = FieldType.OBJECT;
}
Expand All @@ -200,6 +202,8 @@ public static List<FieldInfo> processDefaultValue(List<Field> fields, boolean ig
}
}



fieldInfo.setFieldType(fieldType);
} else {
fieldInfo.setFieldType(annFieldType);
Expand Down

0 comments on commit 114b180

Please sign in to comment.