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 2020/07/26 06:11:16 UTC

[shardingsphere] branch master updated: fix checkstyle of PR#6190 (#6443)

This is an automated email from the ASF dual-hosted git repository.

zhangliang 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 e5b33b1  fix checkstyle of PR#6190 (#6443)
e5b33b1 is described below

commit e5b33b1730c5579e28134d770a33eb9db95265c9
Author: zhaojun <zh...@126.com>
AuthorDate: Sun Jul 26 14:11:07 2020 +0800

    fix checkstyle of PR#6190 (#6443)
---
 .../transaction-2pc-xa-narayana-raw-jdbc-example/pom.xml      |  2 +-
 .../transaction/xa/narayana/raw/jdbc}/ExampleMain.java        | 10 +++++++---
 .../transaction/xa/narayana/raw/jdbc}/OrderServiceImpl.java   | 11 +++++++----
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/pom.xml b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/pom.xml
index b566db1..3911c11 100644
--- a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/pom.xml
+++ b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/pom.xml
@@ -63,4 +63,4 @@
       <artifactId>jboss-logging</artifactId>
     </dependency>
   </dependencies>
-</project>
\ No newline at end of file
+</project>
diff --git a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/ExampleMain.java b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/narayana/raw/jdbc/ExampleMain.java
similarity index 88%
rename from examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/ExampleMain.java
rename to examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/narayana/raw/jdbc/ExampleMain.java
index 6e0f794..51a1afb 100644
--- a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/ExampleMain.java
+++ b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/narayana/raw/jdbc/ExampleMain.java
@@ -15,12 +15,16 @@
  * limitations under the License.
  */
 
-import java.io.File;
-import javax.sql.DataSource;
+package org.apache.shardingsphere.example.transaction.xa.narayana.raw.jdbc;
+
 import org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory;
 import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
 import org.apache.shardingsphere.example.core.api.service.ExampleService;
 
+import javax.sql.DataSource;
+import java.io.File;
+
+//FIXME main class could not terminal after execute.
 public class ExampleMain {
     
     public static void main(final String[] args) throws Exception {
@@ -33,7 +37,7 @@ public class ExampleMain {
         return new File(ExampleMain.class.getResource(fileName).getFile());
     }
     
-    private static ExampleService getExampleService(DataSource dataSource) {
+    private static ExampleService getExampleService(final DataSource dataSource) {
         return new OrderServiceImpl(dataSource);
     }
 }
diff --git a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/OrderServiceImpl.java b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/narayana/raw/jdbc/OrderServiceImpl.java
similarity index 98%
rename from examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/OrderServiceImpl.java
rename to examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/narayana/raw/jdbc/OrderServiceImpl.java
index 0f8396e..63a98de 100644
--- a/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/OrderServiceImpl.java
+++ b/examples/shardingsphere-jdbc-example/transaction-example/transaction-2pc-xa-narayana-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/transaction/xa/narayana/raw/jdbc/OrderServiceImpl.java
@@ -15,15 +15,18 @@
  * limitations under the License.
  */
 
+package org.apache.shardingsphere.example.transaction.xa.narayana.raw.jdbc;
+
+import org.apache.shardingsphere.example.core.api.service.ExampleService;
+import org.apache.shardingsphere.transaction.core.TransactionType;
+import org.apache.shardingsphere.transaction.core.TransactionTypeHolder;
+
+import javax.sql.DataSource;
 import java.sql.Connection;
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
 import java.sql.SQLException;
 import java.sql.Statement;
-import javax.sql.DataSource;
-import org.apache.shardingsphere.example.core.api.service.ExampleService;
-import org.apache.shardingsphere.transaction.core.TransactionType;
-import org.apache.shardingsphere.transaction.core.TransactionTypeHolder;
 
 class OrderServiceImpl implements ExampleService {