This is an automated email from the ASF dual-hosted git repository.
zhaojinchao 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 34746e528f0 Refactor FrontDatabaseProtocolTypeFactory. (#33588)
34746e528f0 is described below
commit 34746e528f0893bbe85f37c7a5bf03b2763a1847
Author: Cong Hu <[email protected]>
AuthorDate: Fri Nov 8 11:03:38 2024 +0800
Refactor FrontDatabaseProtocolTypeFactory. (#33588)
---
.../proxy/frontend/protocol/FrontDatabaseProtocolTypeFactory.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactory.java
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactory.java
index caa72f9fa9b..ae64a3eae2f 100644
---
a/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactory.java
+++
b/proxy/frontend/core/src/main/java/org/apache/shardingsphere/proxy/frontend/protocol/FrontDatabaseProtocolTypeFactory.java
@@ -59,6 +59,6 @@ public final class FrontDatabaseProtocolTypeFactory {
private static Optional<DatabaseType> findConfiguredDatabaseType() {
DatabaseType configuredDatabaseType = ProxyContext.getInstance()
.getContextManager().getMetaDataContexts().getMetaData().getProps().getValue(ConfigurationPropertyKey.PROXY_FRONTEND_DATABASE_PROTOCOL_TYPE);
- return null == configuredDatabaseType ? Optional.empty() :
Optional.of(configuredDatabaseType.getTrunkDatabaseType().orElse(configuredDatabaseType));
+ return Optional.ofNullable(configuredDatabaseType);
}
}