This commit is contained in:
Looly 2020-01-10 18:01:32 +08:00
parent 7ef693efbf
commit f54852d64c
3 changed files with 8 additions and 2 deletions

View File

@ -13,6 +13,7 @@
* 【core 】 修正NumberChineseFormatter和NumberWordFormatter类名拼写错误
* 【all 】 修正equals避免可能存在的空指针问题pr#692@Github
* 【core 】 提供一个自带默认值的Mappr#87@Gitee
* 【core 】 修改Dict在非大小写敏感状态下get也不区分大小写
### Bug修复
* 【core 】 修复NumberUtil.mul中null的结果错误问题issue#I17Y4J@Gitee

View File

@ -117,7 +117,7 @@ public class Dict extends LinkedHashMap<String, Object> implements BasicTypeGett
* @param m Map
*/
public Dict(Map<String, Object> m) {
super((null == m) ? new HashMap<String, Object>() : m);
super((null == m) ? new HashMap<>() : m);
}
// --------------------------------------------------------------- Constructor end
@ -453,6 +453,11 @@ public class Dict extends LinkedHashMap<String, Object> implements BasicTypeGett
}
// -------------------------------------------------------------------- Get end
@Override
public Object get(Object key) {
return super.get(customKey((String)key));
}
@Override
public Object put(String key, Object value) {
return super.put(customKey(key), value);

View File

@ -44,6 +44,6 @@ public class EntityListHandler implements RsHandler<List<Entity>>{
@Override
public List<Entity> handle(ResultSet rs) throws SQLException {
return HandleHelper.handleRs(rs, new ArrayList<Entity>(), this.caseInsensitive);
return HandleHelper.handleRs(rs, new ArrayList<>(), this.caseInsensitive);
}
}