diff --git a/common/src/main/java/org/dromara/dynamictp/common/util/CommonUtil.java b/common/src/main/java/org/dromara/dynamictp/common/util/CommonUtil.java index 0890df2d7..e90e7b9e4 100644 --- a/common/src/main/java/org/dromara/dynamictp/common/util/CommonUtil.java +++ b/common/src/main/java/org/dromara/dynamictp/common/util/CommonUtil.java @@ -93,6 +93,4 @@ private static InetAddress getLocalHostExactAddress() throws SocketException, Un } return candidateAddress == null ? InetAddress.getLocalHost() : candidateAddress; } - - -} \ No newline at end of file +} diff --git a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/Priority.java b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/Priority.java index 594a7523a..c6d4324a0 100644 --- a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/Priority.java +++ b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/Priority.java @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.dromara.dynamictp.core.executor.priority; /** diff --git a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityCallable.java b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityCallable.java index f8262ca91..05a96d7c0 100644 --- a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityCallable.java +++ b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityCallable.java @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.dromara.dynamictp.core.executor.priority; import lombok.Getter; diff --git a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityDtpExecutor.java b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityDtpExecutor.java index 5f9eb432f..750cbf08d 100644 --- a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityDtpExecutor.java +++ b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityDtpExecutor.java @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + package org.dromara.dynamictp.core.executor.priority; import lombok.extern.slf4j.Slf4j; @@ -116,7 +117,6 @@ public PriorityDtpExecutor(int corePoolSize, super(corePoolSize, maximumPoolSize, keepAliveTime, unit, workQueue, threadFactory, handler); } - @Override protected RunnableFuture newTaskFor(Runnable runnable, T value) { return new PriorityFutureTask<>(runnable, value); @@ -149,7 +149,6 @@ public Future submit(Runnable task, T result, int priority) { return super.submit(PriorityRunnable.of(task, priority), result); } - @Override public Future submit(Callable task) { return super.submit(PriorityCallable.of(task, DEFAULT_PRIORITY)); @@ -159,7 +158,6 @@ public Future submit(Callable task, int priority) { return super.submit(PriorityCallable.of(task, priority)); } - /** * Priority Comparator * diff --git a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityFutureTask.java b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityFutureTask.java index d9dc03c6f..6ca7e0a35 100644 --- a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityFutureTask.java +++ b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityFutureTask.java @@ -14,8 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dromara.dynamictp.core.executor.priority; +package org.dromara.dynamictp.core.executor.priority; import java.util.concurrent.Callable; import java.util.concurrent.FutureTask; diff --git a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityRunnable.java b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityRunnable.java index d6eb62450..5682d0f3e 100644 --- a/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityRunnable.java +++ b/core/src/main/java/org/dromara/dynamictp/core/executor/priority/PriorityRunnable.java @@ -14,8 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.dromara.dynamictp.core.executor.priority; +package org.dromara.dynamictp.core.executor.priority; import lombok.Getter; diff --git a/test/test-core/src/test/java/org/dromara/dynamictp/test/core/thread/PriorityDtpExecutorStaticTest.java b/test/test-core/src/test/java/org/dromara/dynamictp/test/core/thread/PriorityDtpExecutorStaticTest.java index a37301a10..7587936c0 100644 --- a/test/test-core/src/test/java/org/dromara/dynamictp/test/core/thread/PriorityDtpExecutorStaticTest.java +++ b/test/test-core/src/test/java/org/dromara/dynamictp/test/core/thread/PriorityDtpExecutorStaticTest.java @@ -1,3 +1,20 @@ +/* + * 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.dromara.dynamictp.test.core.thread; import lombok.extern.slf4j.Slf4j; diff --git a/test/test-core/src/test/java/org/dromara/dynamictp/test/core/thread/PriorityDtpExecutorTest.java b/test/test-core/src/test/java/org/dromara/dynamictp/test/core/thread/PriorityDtpExecutorTest.java index 0b62232d9..52d4edf65 100644 --- a/test/test-core/src/test/java/org/dromara/dynamictp/test/core/thread/PriorityDtpExecutorTest.java +++ b/test/test-core/src/test/java/org/dromara/dynamictp/test/core/thread/PriorityDtpExecutorTest.java @@ -1,3 +1,20 @@ +/* + * 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.dromara.dynamictp.test.core.thread; import lombok.extern.slf4j.Slf4j;