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/10/21 09:21:35 UTC

[shardingsphere-elasticjob] branch master updated: For checkstyle (#1625)

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


The following commit(s) were added to refs/heads/master by this push:
     new 301a56e  For checkstyle (#1625)
301a56e is described below

commit 301a56edb50402c46a8f8c5f78ed515371caac10
Author: Liang Zhang <te...@163.com>
AuthorDate: Wed Oct 21 17:21:27 2020 +0800

    For checkstyle (#1625)
---
 .../restful/pipeline/ExceptionHandling.java        |  2 +-
 .../restful/pipeline/HandleMethodExecutor.java     |  2 +-
 .../restful/pipeline/HandlerParameterDecoder.java  |  2 +-
 .../restful/pipeline/HttpRequestDispatcher.java    |  2 +-
 .../pipeline/RestfulServiceChannelInitializer.java |  2 +-
 .../elasticjob/restful/pipeline/HttpClient.java    |  2 +-
 .../internal/listener/AbstractListenerManager.java |  2 +-
 .../internal/schedule/JobScheduleController.java   |  4 +--
 .../lite/integrate/BaseIntegrateTest.java          |  4 ---
 .../job/tag/JobListenerBeanDefinitionTag.java      | 38 ----------------------
 10 files changed, 9 insertions(+), 51 deletions(-)

diff --git a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/ExceptionHandling.java b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/ExceptionHandling.java
index a1b1903..6b4276f 100644
--- a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/ExceptionHandling.java
+++ b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/ExceptionHandling.java
@@ -70,7 +70,7 @@ public final class ExceptionHandling extends ChannelInboundHandlerAdapter {
     }
     
     @Override
-    public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) throws Exception {
+    public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) {
         ExceptionHandler<Throwable> exceptionHandler = searchExceptionHandler(cause);
         ExceptionHandleResult handleResult = exceptionHandler.handleException(cause);
         String mimeType = HttpUtil.getMimeType(handleResult.getContentType()).toString();
diff --git a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HandleMethodExecutor.java b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HandleMethodExecutor.java
index 1b5c3fb..82234c1 100644
--- a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HandleMethodExecutor.java
+++ b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HandleMethodExecutor.java
@@ -71,7 +71,7 @@ public final class HandleMethodExecutor extends ChannelInboundHandlerAdapter {
     }
     
     @Override
-    public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) throws Exception {
+    public void exceptionCaught(final ChannelHandlerContext ctx, final Throwable cause) {
         if (cause instanceof InvocationTargetException) {
             ctx.fireExceptionCaught(cause.getCause());
         } else {
diff --git a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HandlerParameterDecoder.java b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HandlerParameterDecoder.java
index d0e8cf2..c5a4673 100644
--- a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HandlerParameterDecoder.java
+++ b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HandlerParameterDecoder.java
@@ -54,7 +54,7 @@ public final class HandlerParameterDecoder extends ChannelInboundHandlerAdapter
     private final PathMatcher pathMatcher = new RegexPathMatcher();
     
     @Override
-    public void channelRead(final ChannelHandlerContext ctx, final Object msg) throws Exception {
+    public void channelRead(final ChannelHandlerContext ctx, final Object msg) {
         HandleContext<Handler> handleContext = (HandleContext<Handler>) msg;
         FullHttpRequest httpRequest = handleContext.getHttpRequest();
         MappingContext<Handler> mappingContext = handleContext.getMappingContext();
diff --git a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HttpRequestDispatcher.java b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HttpRequestDispatcher.java
index b927d98..104609e 100644
--- a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HttpRequestDispatcher.java
+++ b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HttpRequestDispatcher.java
@@ -56,7 +56,7 @@ public final class HttpRequestDispatcher extends ChannelInboundHandlerAdapter {
     }
     
     @Override
-    public void channelRead(final ChannelHandlerContext ctx, final Object msg) throws Exception {
+    public void channelRead(final ChannelHandlerContext ctx, final Object msg) {
         log.debug("{}", msg);
         FullHttpRequest request = (FullHttpRequest) msg;
         if (!trailingSlashSensitive) {
diff --git a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/RestfulServiceChannelInitializer.java b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/RestfulServiceChannelInitializer.java
index 831df2c..019e8f1 100644
--- a/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/RestfulServiceChannelInitializer.java
+++ b/elasticjob-infra/elasticjob-restful/src/main/java/org/apache/shardingsphere/elasticjob/restful/pipeline/RestfulServiceChannelInitializer.java
@@ -45,7 +45,7 @@ public final class RestfulServiceChannelInitializer extends ChannelInitializer<C
     }
     
     @Override
-    protected void initChannel(final Channel channel) throws Exception {
+    protected void initChannel(final Channel channel) {
         ChannelPipeline pipeline = channel.pipeline();
         pipeline.addLast("codec", new HttpServerCodec());
         pipeline.addLast("aggregator", new HttpObjectAggregator(1024 * 1024));
diff --git a/elasticjob-infra/elasticjob-restful/src/test/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HttpClient.java b/elasticjob-infra/elasticjob-restful/src/test/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HttpClient.java
index 73ae1d5..7c5bfa0 100644
--- a/elasticjob-infra/elasticjob-restful/src/test/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HttpClient.java
+++ b/elasticjob-infra/elasticjob-restful/src/test/java/org/apache/shardingsphere/elasticjob/restful/pipeline/HttpClient.java
@@ -59,7 +59,7 @@ public final class HttpClient {
                 .remoteAddress(host, port)
                 .handler(new ChannelInitializer<Channel>() {
                     @Override
-                    protected void initChannel(final Channel ch) throws Exception {
+                    protected void initChannel(final Channel ch) {
                         ch.pipeline()
                                 .addLast(new HttpClientCodec())
                                 .addLast(new HttpObjectAggregator(1024 * 1024))
diff --git a/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/listener/AbstractListenerManager.java b/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/listener/AbstractListenerManager.java
index 25f4f17..dde3925 100644
--- a/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/listener/AbstractListenerManager.java
+++ b/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/listener/AbstractListenerManager.java
@@ -31,7 +31,7 @@ public abstract class AbstractListenerManager {
     protected AbstractListenerManager(final CoordinatorRegistryCenter regCenter, final String jobName) {
         jobNodeStorage = new JobNodeStorage(regCenter, jobName);
     }
-
+    
     /**
      * Start listener.
      */
diff --git a/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/schedule/JobScheduleController.java b/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/schedule/JobScheduleController.java
index 7677675..09679ae 100644
--- a/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/schedule/JobScheduleController.java
+++ b/elasticjob-lite/elasticjob-lite-core/src/main/java/org/apache/shardingsphere/elasticjob/lite/internal/schedule/JobScheduleController.java
@@ -73,7 +73,7 @@ public final class JobScheduleController {
             throw new JobSystemException(ex);
         }
     }
-
+    
     /**
      * Reschedule OneOff job.
      */
@@ -162,7 +162,7 @@ public final class JobScheduleController {
     public synchronized void shutdown() {
         shutdown(false);
     }
-
+    
     /**
      * Shutdown scheduler graceful.
      * @param isCleanShutdown if wait jobs complete
diff --git a/elasticjob-lite/elasticjob-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/BaseIntegrateTest.java b/elasticjob-lite/elasticjob-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/BaseIntegrateTest.java
index 9eb6b81..77a483d 100644
--- a/elasticjob-lite/elasticjob-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/BaseIntegrateTest.java
+++ b/elasticjob-lite/elasticjob-lite-core/src/test/java/org/apache/shardingsphere/elasticjob/lite/integrate/BaseIntegrateTest.java
@@ -53,10 +53,6 @@ public abstract class BaseIntegrateTest {
     
     private final String jobName = System.nanoTime() + "_test_job";
     
-    protected BaseIntegrateTest() {
-        this(null, null);
-    }
-    
     protected BaseIntegrateTest(final TestType type, final ElasticJob elasticJob) {
         this.elasticJob = elasticJob;
         jobConfiguration = getJobConfiguration(jobName);
diff --git a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/tag/JobListenerBeanDefinitionTag.java b/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/tag/JobListenerBeanDefinitionTag.java
deleted file mode 100644
index 7adf4e6..0000000
--- a/elasticjob-lite/elasticjob-lite-spring/elasticjob-lite-spring-namespace/src/main/java/org/apache/shardingsphere/elasticjob/lite/spring/namespace/job/tag/JobListenerBeanDefinitionTag.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *  
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.shardingsphere.elasticjob.lite.spring.namespace.job.tag;
-
-import lombok.AccessLevel;
-import lombok.NoArgsConstructor;
-
-/**
- * Job listener bean definition tag.
- */
-@NoArgsConstructor(access = AccessLevel.PRIVATE)
-public final class JobListenerBeanDefinitionTag {
-    
-    public static final String LISTENER_TAG = "listener";
-    
-    public static final String DISTRIBUTED_LISTENER_TAG = "distributed-listener";
-    
-    public static final String CLASS_ATTRIBUTE = "class";
-    
-    public static final String DISTRIBUTED_LISTENER_STARTED_TIMEOUT_MILLISECONDS_ATTRIBUTE = "started-timeout-milliseconds";
-    
-    public static final String DISTRIBUTED_LISTENER_COMPLETED_TIMEOUT_MILLISECONDS_ATTRIBUTE = "completed-timeout-milliseconds";
-}