mirror of
https://gitee.com/mybatis-flex/mybatis-flex.git
synced 2025-12-07 17:18:24 +08:00
优化工具类
This commit is contained in:
parent
9af1c5b7f8
commit
78e05bd8d9
@ -53,7 +53,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class FlexConfiguration extends Configuration {
|
||||
|
||||
private static Map<String, MappedStatement> dynamicMappedStatementCache = new ConcurrentHashMap<>();
|
||||
private static final Map<String, MappedStatement> dynamicMappedStatementCache = new ConcurrentHashMap<>();
|
||||
|
||||
public FlexConfiguration(Environment environment) {
|
||||
super(environment);
|
||||
|
||||
@ -28,6 +28,7 @@ import java.util.function.Predicate;
|
||||
* @author michael
|
||||
* @date 17/3/21
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class ClassUtil {
|
||||
|
||||
private ClassUtil() {
|
||||
|
||||
@ -28,11 +28,12 @@ public class ConvertUtil {
|
||||
private ConvertUtil() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
public static Object convert(Object value, Class targetClass) {
|
||||
return convert(value, targetClass, false);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public static Object convert(Object value, Class targetClass, boolean ignoreConvertError) {
|
||||
if (value == null && targetClass.isPrimitive()) {
|
||||
return getPrimitiveDefaultValue(targetClass);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user