You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/08/08 04:46:11 UTC

[GitHub] [shardingsphere] zjcnb commented on a change in pull request #11699: Schema name add default value

zjcnb commented on a change in pull request #11699:
URL: https://github.com/apache/shardingsphere/pull/11699#discussion_r684714156



##########
File path: shardingsphere-jdbc/shardingsphere-jdbc-core/src/main/java/org/apache/shardingsphere/driver/api/ShardingSphereDataSourceFactory.java
##########
@@ -76,7 +76,7 @@ public static DataSource createDataSource(final Map<String, DataSource> dataSour
      * @throws SQLException SQL exception
      */
     public static DataSource createDataSource(final String schemaName, final DataSource dataSource, final Collection<RuleConfiguration> configs, final Properties props) throws SQLException {
-        return createDataSource(schemaName, Collections.singletonMap(schemaName, dataSource), configs, props);
+        return createDataSource(schemaName, Collections.singletonMap(Strings.isNullOrEmpty(schemaName) ? DefaultSchema.LOGIC_NAME : schemaName, dataSource), configs, props);

Review comment:
       it 's only check schemaName, but not check datasourceMap key




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org