This is an automated email from the ASF dual-hosted git repository.
zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new 14f3c80b50c Fix sonar issue of ResourceDataSource (#25804)
14f3c80b50c is described below
commit 14f3c80b50cd22b1b9d50f4ed8160e32a3258fad
Author: Liang Zhang <[email protected]>
AuthorDate: Sat May 20 13:08:03 2023 +0800
Fix sonar issue of ResourceDataSource (#25804)
---
.../org/apache/shardingsphere/transaction/core/ResourceDataSource.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/core/ResourceDataSource.java
b/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/core/ResourceDataSource.java
index 68de600b28b..c89832cf169 100644
---
a/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/core/ResourceDataSource.java
+++
b/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/core/ResourceDataSource.java
@@ -40,7 +40,7 @@ public final class ResourceDataSource {
public ResourceDataSource(final String originalName, final DataSource
dataSource) {
String[] databaseAndDataSourceName = originalName.split("\\.");
- Preconditions.checkState(2 == databaseAndDataSourceName.length,
String.format("Database and data source name must be provided,`%s`.",
originalName));
+ Preconditions.checkState(2 == databaseAndDataSourceName.length,
"Database and data source name must be provided together by `%s`.",
originalName);
this.originalName = originalName;
this.dataSource = dataSource;
uniqueResourceName = ResourceIdGenerator.getInstance().nextId() +
databaseAndDataSourceName[1];