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/04 12:30:45 UTC
[shardingsphere-elasticjob-lite] branch master updated: Check style
fix (#933)
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-elasticjob-lite.git
The following commit(s) were added to refs/heads/master by this push:
new 248dac3 Check style fix (#933)
248dac3 is described below
commit 248dac30995b558308d58e72f716dca64de18e1c
Author: 孙念君 Sun Nianjun <ka...@outlook.com>
AuthorDate: Sat Jul 4 20:30:37 2020 +0800
Check style fix (#933)
* Refactor: rename the exception variable
* Refactor: refactor the access level
* Remove: remove the explicitly access level
* Remove: remove the useless import
* Refactor: refactor the super constructor init
* Refactor: refactor the super constructor
* Revert: revert the change to Main method
* Refactor: replace with AllArgsConstructor
* Refactor: get back the default page number.
* Add: add the indent back
* Add: add the indent back
* Add: add the indent back
* Add: add the indent back
---
.../elasticjob/lite/console/dto/request/BasePageRequest.java | 10 ++++------
.../console/dto/request/FindJobExecutionEventsRequest.java | 10 +++-------
.../console/dto/request/FindJobStatusTraceEventsRequest.java | 8 ++------
.../lite/reg/zookeeper/ZookeeperElectionService.java | 2 +-
4 files changed, 10 insertions(+), 20 deletions(-)
diff --git a/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/BasePageRequest.java b/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/BasePageRequest.java
index a1c6860..78fec7e 100644
--- a/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/BasePageRequest.java
+++ b/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/BasePageRequest.java
@@ -34,29 +34,27 @@ public class BasePageRequest {
public static final int DEFAULT_PAGE_SIZE = 10;
- // CHECKSTYLE:OFF
/**
* Page size of request.
*/
@JsonProperty("per_page")
- protected Integer pageSize = DEFAULT_PAGE_SIZE;
+ private Integer pageSize = DEFAULT_PAGE_SIZE;
/**
* Page number of request.
*/
@JsonProperty("page")
- protected Integer pageNumber = 1;
+ private Integer pageNumber = 1;
/**
* The field name for sort by.
*/
@JsonProperty("sort")
- protected String sortBy;
+ private String sortBy;
/**
* Order type, asc or desc.
*/
@JsonProperty("order")
- protected String orderType;
- // CHECKSTYLE:ON
+ private String orderType;
}
diff --git a/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/FindJobExecutionEventsRequest.java b/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/FindJobExecutionEventsRequest.java
index 466c62d..29ea75e 100644
--- a/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/FindJobExecutionEventsRequest.java
+++ b/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/FindJobExecutionEventsRequest.java
@@ -44,7 +44,7 @@ public class FindJobExecutionEventsRequest extends BasePageRequest {
@JsonProperty("startTime")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date start;
-
+
@JsonProperty("endTime")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date end;
@@ -55,8 +55,7 @@ public class FindJobExecutionEventsRequest extends BasePageRequest {
* @param pageSize page size
*/
public FindJobExecutionEventsRequest(final Integer pageSize, final Integer pageNumber) {
- this.pageSize = pageSize;
- this.pageNumber = pageNumber;
+ super(pageSize, pageNumber, null, null);
}
/**
@@ -70,10 +69,7 @@ public class FindJobExecutionEventsRequest extends BasePageRequest {
*/
public FindJobExecutionEventsRequest(final Integer pageSize, final Integer pageNumber, final String sortBy,
final String orderType, final Date startTime, final Date endTime) {
- this.pageSize = pageSize;
- this.pageNumber = pageNumber;
- this.sortBy = sortBy;
- this.orderType = orderType;
+ super(pageSize, pageNumber, sortBy, orderType);
this.start = startTime;
this.end = endTime;
}
diff --git a/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/FindJobStatusTraceEventsRequest.java b/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/FindJobStatusTraceEventsRequest.java
index 51e5bd9..95b97cc 100644
--- a/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/FindJobStatusTraceEventsRequest.java
+++ b/elastic-job-lite-console/src/main/java/org/apache/shardingsphere/elasticjob/lite/console/dto/request/FindJobStatusTraceEventsRequest.java
@@ -52,15 +52,11 @@ public class FindJobStatusTraceEventsRequest extends BasePageRequest {
private Date end;
public FindJobStatusTraceEventsRequest(final Integer pageSize, final Integer pageNumber) {
- this.pageSize = pageSize;
- this.pageNumber = pageNumber;
+ super(pageSize, pageNumber, null, null);
}
public FindJobStatusTraceEventsRequest(final Integer pageSize, final Integer pageNumber, final String sortBy, final String orderType, final Date startTime, final Date endTime) {
- this.pageSize = pageSize;
- this.pageNumber = pageNumber;
- this.sortBy = sortBy;
- this.orderType = orderType;
+ super(pageSize, pageNumber, sortBy, orderType);
this.start = startTime;
this.end = endTime;
}
diff --git a/elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/reg/zookeeper/ZookeeperElectionService.java b/elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/reg/zookeeper/ZookeeperElectionService.java
index e27c4bb..fbe3986 100644
--- a/elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/reg/zookeeper/ZookeeperElectionService.java
+++ b/elastic-job-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/reg/zookeeper/ZookeeperElectionService.java
@@ -74,7 +74,7 @@ public final class ZookeeperElectionService {
try {
leaderSelector.close();
// CHECKSTYLE:OFF
- } catch (final Exception ignored) {
+ } catch (final Exception ignore) {
}
// CHECKSTYLE:ON
}