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 2020/09/10 02:35:31 UTC

[GitHub] [shardingsphere] tristaZero commented on a change in pull request #7367: Support oracle connect descriptor url

tristaZero commented on a change in pull request #7367:
URL: https://github.com/apache/shardingsphere/pull/7367#discussion_r486026155



##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;
+    private String schema;
     
-    private final Pattern pattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    private final Pattern thinUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@(//)?([\\w\\-\\.]+):?([0-9]*)[:/]([\\w\\-]+)", Pattern.CASE_INSENSITIVE);
+    
+    private final Pattern connectDescriptorUrlPattern = Pattern.compile("jdbc:oracle:(thin|oci|kprb):@[(\\w\\s=)]+HOST\\s*=\\s*(\\d+(\\."

Review comment:
       Could we merge two of the patterns?

##########
File path: shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/database/metadata/dialect/OracleDataSourceMetaData.java
##########
@@ -33,24 +33,39 @@
     
     private static final int DEFAULT_PORT = 1521;
     
-    private final String hostName;
+    private String hostName;
     
-    private final int port;
+    private int port;
     
-    private final String catalog;
+    private String catalog;
     
-    private final String schema;

Review comment:
       Why did you remove the `final`?




----------------------------------------------------------------
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.

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