mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
fix code
This commit is contained in:
parent
3df525409b
commit
15d4f786b2
@ -3,13 +3,15 @@
|
|||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
# 5.8.1.M1 (2022-05-09)
|
# 5.8.1.M1 (2022-05-10)
|
||||||
|
|
||||||
### 🐣新特性
|
### 🐣新特性
|
||||||
* 【core 】 BooleanUtil增加toBooleanObject方法(issue#I56AG3@Gitee)
|
* 【core 】 BooleanUtil增加toBooleanObject方法(issue#I56AG3@Gitee)
|
||||||
|
* 【core 】 CharSequenceUtil增加startWithAnyIgnoreCase方法(issue#2312@Github)
|
||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【core 】 MapUtil.map对null友好,且修复了测试用例中分组问题(pr#614@Gitee)
|
* 【core 】 MapUtil.map对null友好,且修复了测试用例中分组问题(pr#614@Gitee)
|
||||||
* 【core 】 修复BeanUtil.beanToMap中properties为null的空指针问题(issue#2303@Github)
|
* 【core 】 修复BeanUtil.beanToMap中properties为null的空指针问题(issue#2303@Github)
|
||||||
|
* 【db 】 DialectName中修正为POSTGRESQL(issue#2308@Github)
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -780,6 +780,28 @@ public class CharSequenceUtil {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 给定字符串是否以任何一个字符串结尾(忽略大小写)<br>
|
||||||
|
* 给定字符串和数组为空都返回false
|
||||||
|
*
|
||||||
|
* @param str 给定字符串
|
||||||
|
* @param suffixes 需要检测的结尾字符串
|
||||||
|
* @return 给定字符串是否以任何一个字符串结尾
|
||||||
|
* @since 5.8.1
|
||||||
|
*/
|
||||||
|
public static boolean startWithAnyIgnoreCase(final CharSequence str, final CharSequence... suffixes) {
|
||||||
|
if (isEmpty(str) || ArrayUtil.isEmpty(suffixes)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (final CharSequence suffix : suffixes) {
|
||||||
|
if (startWith(str, suffix, true)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------ endWith
|
// ------------------------------------------------------------------------ endWith
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2707,7 +2729,7 @@ public class CharSequenceUtil {
|
|||||||
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
|
* 如果想输出 {} 使用 \\转义 { 即可,如果想输出 {} 之前的 \ 使用双转义符 \\\\ 即可<br>
|
||||||
* 例:<br>
|
* 例:<br>
|
||||||
* 通常使用:format("this is {} for {}", "a", "b") =》 this is a for b<br>
|
* 通常使用:format("this is {} for {}", "a", "b") =》 this is a for b<br>
|
||||||
* 转义{}: format("this is \\{} for {}", "a", "b") =》 this is \{} for a<br>
|
* 转义{}: format("this is \\{} for {}", "a", "b") =》 this is {} for a<br>
|
||||||
* 转义\: format("this is \\\\{} for {}", "a", "b") =》 this is \a for b<br>
|
* 转义\: format("this is \\\\{} for {}", "a", "b") =》 this is \a for b<br>
|
||||||
*
|
*
|
||||||
* @param template 文本模板,被替换的部分用 {} 表示,如果模板为null,返回"null"
|
* @param template 文本模板,被替换的部分用 {} 表示,如果模板为null,返回"null"
|
||||||
|
@ -9,7 +9,7 @@ import cn.hutool.core.util.StrUtil;
|
|||||||
* @author Looly
|
* @author Looly
|
||||||
*/
|
*/
|
||||||
public enum DialectName {
|
public enum DialectName {
|
||||||
ANSI, MYSQL, ORACLE, POSTGREESQL, SQLITE3, H2, SQLSERVER, SQLSERVER2012, PHOENIX;
|
ANSI, MYSQL, ORACLE, POSTGRESQL, SQLITE3, H2, SQLSERVER, SQLSERVER2012, PHOENIX;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否为指定数据库方言,检查时不分区大小写
|
* 是否为指定数据库方言,检查时不分区大小写
|
||||||
|
@ -28,7 +28,7 @@ public class PostgresqlDialect extends AnsiSqlDialect{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String dialectName() {
|
public String dialectName() {
|
||||||
return DialectName.POSTGREESQL.name();
|
return DialectName.POSTGRESQL.name();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user