mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix code
This commit is contained in:
parent
b9c7b5f4bf
commit
7b10238225
@ -120,11 +120,13 @@ public class CharSequenceUtil extends StrValidator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 调用对象的toString方法,{@code null}会返回空字符串 ""
|
* 调用对象的toString方法,{@code null}会返回空字符串 ""<br>
|
||||||
|
* 如果仅仅是对{@link CharSequence}处理,请使用{@link #emptyIfNull(CharSequence)}
|
||||||
*
|
*
|
||||||
* @param obj 对象
|
* @param obj 对象
|
||||||
* @return {@link String }
|
* @return {@link String }
|
||||||
* @author Junwei Xu
|
* @author Junwei Xu
|
||||||
|
* @see #emptyIfNull(CharSequence)
|
||||||
*/
|
*/
|
||||||
public static String toStringOrEmpty(final Object obj) {
|
public static String toStringOrEmpty(final Object obj) {
|
||||||
// obj为空时, 返回 null 或 "null" 都不适用部分场景, 此处返回 "" 空字符串
|
// obj为空时, 返回 null 或 "null" 都不适用部分场景, 此处返回 "" 空字符串
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
<druid.version>1.2.21</druid.version>
|
<druid.version>1.2.21</druid.version>
|
||||||
<!-- 固定4.x -->
|
<!-- 固定4.x -->
|
||||||
<hikariCP.version>4.0.3</hikariCP.version>
|
<hikariCP.version>4.0.3</hikariCP.version>
|
||||||
<sqlite.version>3.45.1.0</sqlite.version>
|
<sqlite.version>3.46.0.0</sqlite.version>
|
||||||
<!-- 此处固定2.5.x,支持到JDK8 -->
|
<!-- 此处固定2.5.x,支持到JDK8 -->
|
||||||
<hsqldb.version>2.5.2</hsqldb.version>
|
<hsqldb.version>2.5.2</hsqldb.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2024. looly(loolly@aliyun.com)
|
||||||
|
* Hutool is licensed under Mulan PSL v2.
|
||||||
|
* You can use this software according to the terms and conditions of the Mulan PSL v2.
|
||||||
|
* You may obtain a copy of Mulan PSL v2 at:
|
||||||
|
* https://license.coscl.org.cn/MulanPSL2
|
||||||
|
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
|
||||||
|
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
|
||||||
|
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
|
||||||
|
* See the Mulan PSL v2 for more details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.dromara.hutool.db;
|
||||||
|
|
||||||
|
import org.dromara.hutool.db.config.DbConfig;
|
||||||
|
import org.junit.jupiter.api.Disabled;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
|
||||||
|
public class Issue3654Test {
|
||||||
|
@Test
|
||||||
|
@Disabled
|
||||||
|
void insertSqliteTest() {
|
||||||
|
final Db db = Db.of(DbConfig.of().setUrl("jdbc:sqlite:d:/test/test.db"));
|
||||||
|
db.insert(Entity.of("user").set("age", "testStr2"));
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user