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 1073acc9a94 Make DriverDataSourceCache as static in 
ShardingSphereDriver (#37707)
1073acc9a94 is described below

commit 1073acc9a948b957774e799b5a0d685e775c6700
Author: Raigor <[email protected]>
AuthorDate: Mon Jan 12 01:11:14 2026 +0800

    Make DriverDataSourceCache as static in ShardingSphereDriver (#37707)
---
 .../java/org/apache/shardingsphere/driver/ShardingSphereDriver.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/ShardingSphereDriver.java 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/ShardingSphereDriver.java
index f7fcb55ec8c..e2092718f31 100644
--- 
a/jdbc/src/main/java/org/apache/shardingsphere/driver/ShardingSphereDriver.java
+++ 
b/jdbc/src/main/java/org/apache/shardingsphere/driver/ShardingSphereDriver.java
@@ -41,7 +41,7 @@ public final class ShardingSphereDriver implements Driver {
     
     private static final int MINOR_DRIVER_VERSION = 5;
     
-    private final DriverDataSourceCache dataSourceCache = new 
DriverDataSourceCache();
+    private static final DriverDataSourceCache DATA_SOURCE_CACHE = new 
DriverDataSourceCache();
     
     static {
         try {
@@ -54,7 +54,7 @@ public final class ShardingSphereDriver implements Driver {
     @HighFrequencyInvocation(canBeCached = true)
     @Override
     public Connection connect(final String url, final Properties info) throws 
SQLException {
-        return acceptsURL(url) ? dataSourceCache.get(url, 
DRIVER_URL_PREFIX).getConnection() : null;
+        return acceptsURL(url) ? DATA_SOURCE_CACHE.get(url, 
DRIVER_URL_PREFIX).getConnection() : null;
     }
     
     @Override

Reply via email to