jast90 commented on issue #14259:
URL: 
https://github.com/apache/shardingsphere/issues/14259#issuecomment-1000089722


   maybe as follow:
   ```java
       public static DatabaseType getDatabaseType(final Collection<DataSource> 
dataSources) {
           DatabaseType result = null;
           for (DataSource each : dataSources) {
               DatabaseType databaseType = getDatabaseType(each);
               Preconditions.checkState(null == databaseType || result !=null 
&& result != databaseType, "Database type inconsistent with '%s' and '%s'", 
result, databaseType);
               result = databaseType;
           }
           return null == result ? 
DatabaseTypeRegistry.getDefaultDatabaseType() : result;
       }
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to