You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2024/11/08 03:03:45 UTC

(shardingsphere) branch master updated: Refactor FrontDatabaseProtocolTypeFactory. (#33588)

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 <ia...@gmail.com>
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);
     }
 }