Skip to content

Commit aba3405

Browse files
committed
reformat codes
1 parent 25d9f5c commit aba3405

49 files changed

Lines changed: 5589 additions & 5647 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
1-
# EditorConfig helps developers define and maintain consistent
2-
# coding styles between different editors and IDEs
3-
# http://editorconfig.org
4-
# 所有文件换行使用 Unix like 风格(LF),bat 文件使用 win 风格(CRLF)
5-
# 缩进 java 4 个空格,其他所有文件 2 个空格
1+
# EditorConfig 用于在 IDE 中检查代码的基本 Code Style
2+
# @see: https://editorconfig.org/
3+
4+
# 配置说明:
5+
# 所有文件换行使用 Unix 风格(LF),*.bat 文件使用 Windows 风格(CRLF)
6+
# java / sh 文件缩进 4 个空格,其他所有文件缩进 2 个空格
67

78
root = true
89

910
[*]
10-
# Unix-style newlines with a newline ending every file
1111
end_of_line = lf
12-
13-
# Change these settings to your own preference
1412
indent_size = 2
15-
indent_style = space
13+
indent_style = tab
1614
max_line_length = 120
17-
18-
# We recommend you to keep these unchanged
1915
charset = utf-8
2016
trim_trailing_whitespace = true
2117
insert_final_newline = true
2218

23-
[*.bat]
19+
[*.{bat, cmd}]
2420
end_of_line = crlf
2521

26-
[*.java]
27-
indent_size = 4
28-
29-
[*.sql]
22+
[*.{java, groovy, kt, sh}]
3023
indent_size = 4
3124

3225
[*.md]

codes/javadb/javadb-h2/pom.xml

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,57 @@
11
<?xml version="1.0"?>
22
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
4-
<modelVersion>4.0.0</modelVersion>
5-
<groupId>io.github.dunwu</groupId>
6-
<artifactId>javadb-h2</artifactId>
7-
<version>1.0.0</version>
8-
<packaging>jar</packaging>
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4+
xmlns="http://maven.apache.org/POM/4.0.0">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>io.github.dunwu</groupId>
7+
<artifactId>javadb-h2</artifactId>
8+
<version>1.0.0</version>
9+
<packaging>jar</packaging>
910

10-
<properties>
11-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12-
<java.version>1.8</java.version>
13-
<maven.compiler.source>${java.version}</maven.compiler.source>
14-
<maven.compiler.target>${java.version}</maven.compiler.target>
11+
<properties>
12+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
<java.version>1.8</java.version>
14+
<maven.compiler.source>${java.version}</maven.compiler.source>
15+
<maven.compiler.target>${java.version}</maven.compiler.target>
1516

16-
<junit.version>4.12</junit.version>
17-
</properties>
17+
<junit.version>4.12</junit.version>
18+
</properties>
1819

19-
<dependencies>
20-
<!-- db begin -->
21-
<dependency>
22-
<groupId>com.h2database</groupId>
23-
<artifactId>h2</artifactId>
24-
</dependency>
25-
<!-- db end -->
20+
<dependencies>
21+
<!-- db begin -->
22+
<dependency>
23+
<groupId>com.h2database</groupId>
24+
<artifactId>h2</artifactId>
25+
</dependency>
26+
<!-- db end -->
2627

27-
<!-- test begin -->
28-
<dependency>
29-
<groupId>junit</groupId>
30-
<artifactId>junit</artifactId>
31-
</dependency>
32-
<!-- test end -->
33-
</dependencies>
28+
<!-- test begin -->
29+
<dependency>
30+
<groupId>junit</groupId>
31+
<artifactId>junit</artifactId>
32+
</dependency>
33+
<!-- test end -->
34+
</dependencies>
3435

35-
<dependencyManagement>
36-
<dependencies>
37-
<!-- database begin -->
38-
<dependency>
39-
<groupId>com.h2database</groupId>
40-
<artifactId>h2</artifactId>
41-
<version>1.4.197</version>
42-
<scope>test</scope>
43-
</dependency>
44-
<!-- database end -->
36+
<dependencyManagement>
37+
<dependencies>
38+
<!-- database begin -->
39+
<dependency>
40+
<groupId>com.h2database</groupId>
41+
<artifactId>h2</artifactId>
42+
<version>1.4.197</version>
43+
<scope>test</scope>
44+
</dependency>
45+
<!-- database end -->
4546

46-
<!-- test begin -->
47-
<dependency>
48-
<groupId>junit</groupId>
49-
<artifactId>junit</artifactId>
50-
<version>${junit.version}</version>
51-
<scope>test</scope>
52-
</dependency>
53-
<!-- test end -->
54-
</dependencies>
55-
</dependencyManagement>
47+
<!-- test begin -->
48+
<dependency>
49+
<groupId>junit</groupId>
50+
<artifactId>junit</artifactId>
51+
<version>${junit.version}</version>
52+
<scope>test</scope>
53+
</dependency>
54+
<!-- test end -->
55+
</dependencies>
56+
</dependencyManagement>
5657
</project>

codes/javadb/javadb-h2/src/test/java/io/github/dunwu/javadb/H2JdbcTest01.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ public static void beforeClass() {
4343
CONNECTION = DriverManager.getConnection(JDBC_URL3, USER, PASSWORD);
4444
// 创建sql声明
4545
STATEMENT = CONNECTION.createStatement();
46-
}
47-
catch (ClassNotFoundException | SQLException e) {
46+
} catch (ClassNotFoundException | SQLException e) {
4847
e.printStackTrace();
4948
}
5049
}
@@ -56,8 +55,7 @@ public static void afterClass() {
5655
STATEMENT.close();
5756
// 关闭连接
5857
CONNECTION.close();
59-
}
60-
catch (SQLException e) {
58+
} catch (SQLException e) {
6159
e.printStackTrace();
6260
}
6361
}
@@ -85,8 +83,7 @@ public void test() {
8583
while (rs.next()) {
8684
System.out.println(rs.getString("id") + "," + rs.getString("name") + "," + rs.getString("sex"));
8785
}
88-
}
89-
catch (SQLException e) {
86+
} catch (SQLException e) {
9087
Assert.assertTrue(e.getMessage(), true);
9188
}
9289
}

codes/javadb/javadb-hbase/pom.xml

Lines changed: 54 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,63 @@
11
<?xml version="1.0"?>
22
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0">
4-
<modelVersion>4.0.0</modelVersion>
5-
<groupId>io.github.dunwu</groupId>
6-
<artifactId>javadb-hbase</artifactId>
7-
<version>1.0.0</version>
8-
<packaging>jar</packaging>
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
4+
xmlns="http://maven.apache.org/POM/4.0.0">
5+
<modelVersion>4.0.0</modelVersion>
6+
<groupId>io.github.dunwu</groupId>
7+
<artifactId>javadb-hbase</artifactId>
8+
<version>1.0.0</version>
9+
<packaging>jar</packaging>
910

10-
<properties>
11-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12-
<java.version>1.8</java.version>
13-
<maven.compiler.source>${java.version}</maven.compiler.source>
14-
<maven.compiler.target>${java.version}</maven.compiler.target>
11+
<properties>
12+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
13+
<java.version>1.8</java.version>
14+
<maven.compiler.source>${java.version}</maven.compiler.source>
15+
<maven.compiler.target>${java.version}</maven.compiler.target>
1516

16-
<hbase.version>1.3.1</hbase.version>
17-
<junit.version>4.12</junit.version>
18-
<dunwu.version>0.4.1</dunwu.version>
19-
</properties>
17+
<hbase.version>1.3.1</hbase.version>
18+
<junit.version>4.12</junit.version>
19+
<dunwu.version>0.4.1</dunwu.version>
20+
</properties>
2021

21-
<dependencies>
22-
<dependency>
23-
<groupId>org.apache.hbase</groupId>
24-
<artifactId>hbase-client</artifactId>
25-
</dependency>
26-
<dependency>
27-
<groupId>io.github.dunwu</groupId>
28-
<artifactId>dunwu-common</artifactId>
29-
</dependency>
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.apache.hbase</groupId>
25+
<artifactId>hbase-client</artifactId>
26+
</dependency>
27+
<dependency>
28+
<groupId>io.github.dunwu</groupId>
29+
<artifactId>dunwu-common</artifactId>
30+
</dependency>
3031

31-
<!-- test begin -->
32-
<dependency>
33-
<groupId>junit</groupId>
34-
<artifactId>junit</artifactId>
35-
</dependency>
36-
<!-- test end -->
37-
</dependencies>
32+
<!-- test begin -->
33+
<dependency>
34+
<groupId>junit</groupId>
35+
<artifactId>junit</artifactId>
36+
</dependency>
37+
<!-- test end -->
38+
</dependencies>
3839

39-
<dependencyManagement>
40-
<dependencies>
41-
<dependency>
42-
<groupId>org.apache.hbase</groupId>
43-
<artifactId>hbase-client</artifactId>
44-
<version>${hbase.version}</version>
45-
</dependency>
46-
<dependency>
47-
<groupId>io.github.dunwu</groupId>
48-
<artifactId>dunwu-common</artifactId>
49-
<version>${dunwu.version}</version>
50-
</dependency>
40+
<dependencyManagement>
41+
<dependencies>
42+
<dependency>
43+
<groupId>org.apache.hbase</groupId>
44+
<artifactId>hbase-client</artifactId>
45+
<version>${hbase.version}</version>
46+
</dependency>
47+
<dependency>
48+
<groupId>io.github.dunwu</groupId>
49+
<artifactId>dunwu-common</artifactId>
50+
<version>${dunwu.version}</version>
51+
</dependency>
5152

52-
<!-- test begin -->
53-
<dependency>
54-
<groupId>junit</groupId>
55-
<artifactId>junit</artifactId>
56-
<version>${junit.version}</version>
57-
<scope>test</scope>
58-
</dependency>
59-
<!-- test end -->
60-
</dependencies>
61-
</dependencyManagement>
53+
<!-- test begin -->
54+
<dependency>
55+
<groupId>junit</groupId>
56+
<artifactId>junit</artifactId>
57+
<version>${junit.version}</version>
58+
<scope>test</scope>
59+
</dependency>
60+
<!-- test end -->
61+
</dependencies>
62+
</dependencyManagement>
6263
</project>

codes/javadb/javadb-hbase/src/main/java/io/github/dunwu/javadb/HBaseConstant.java

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
public enum HBaseConstant {
44

55
HBASE_ZOOKEEPER_QUORUM("hbase.zookeeper.quorum"), HBASE_ENABLE("hbase.enable"), HBASE_MASTER(
6-
"hbase.master"), HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT(
7-
"hbase.zookeeper.property.clientPort"), HBASE_HCONNECTION_THREADS_MAX(
8-
"hbase.hconnection.threads.max"), HBASE_HCONNECTION_THREADS_CORE(
9-
"hbase.hconnection.threads.core"), ZOOKEEPER_ZNODE_PARENT(
10-
"zookeeper.znode.parent"), HBASE_COLUMN_FAMILY(
11-
"hbase.column.family"), HBASE_EXECUTOR_NUM(
12-
"hbase.executor.num"), HBASE_IPC_POOL_SIZE(
13-
"hbase.client.ipc.pool.size");
6+
"hbase.master"), HBASE_ZOOKEEPER_PROPERTY_CLIENTPORT(
7+
"hbase.zookeeper.property.clientPort"), HBASE_HCONNECTION_THREADS_MAX(
8+
"hbase.hconnection.threads.max"), HBASE_HCONNECTION_THREADS_CORE(
9+
"hbase.hconnection.threads.core"), ZOOKEEPER_ZNODE_PARENT(
10+
"zookeeper.znode.parent"), HBASE_COLUMN_FAMILY(
11+
"hbase.column.family"), HBASE_EXECUTOR_NUM(
12+
"hbase.executor.num"), HBASE_IPC_POOL_SIZE(
13+
"hbase.client.ipc.pool.size");
1414

1515
private String key;
1616

@@ -21,5 +21,4 @@ public enum HBaseConstant {
2121
public String key() {
2222
return key;
2323
}
24-
2524
}

codes/javadb/javadb-hbase/src/main/java/io/github/dunwu/javadb/HbaseCellEntity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* HBase Cell 实体
55
*
66
* @author Zhang Peng
7-
* @date 2019-03-04
7+
* @since 2019-03-04
88
*/
99
public class HbaseCellEntity {
1010

@@ -79,7 +79,7 @@ public void setVal(String val) {
7979
@Override
8080
public String toString() {
8181
return "HbaseCellEntity{" + "table='" + table + '\'' + ", row='" + row + '\'' + ", colFamily='" + colFamily
82-
+ '\'' + ", col='" + col + '\'' + ", val='" + val + '\'' + '}';
82+
+ '\'' + ", col='" + col + '\'' + ", val='" + val + '\'' + '}';
8383
}
8484

8585
}

0 commit comments

Comments
 (0)