This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang 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 1a0b7316fe5 Remove useless @SuppressWarnings("UnstableApiUsage")
(#31032)
1a0b7316fe5 is described below
commit 1a0b7316fe587ab844cafd3bd40e5f541f0b4a4e
Author: Liang Zhang <[email protected]>
AuthorDate: Sat Apr 27 19:02:19 2024 +0800
Remove useless @SuppressWarnings("UnstableApiUsage") (#31032)
* Code format for test cases
* Code format for test cases
* Code format for test cases
* Code format for test cases
* Remove useless @SuppressWarnings("UnstableApiUsage")
---
.../apache/shardingsphere/infra/util/eventbus/EventBusContext.java | 1 -
.../infra/util/eventbus/fixture/EventListenerFixture.java | 2 +-
.../shardingsphere/mode/subsciber/RuleItemChangedSubscriber.java | 4 ++--
.../subscriber/ShardingSphereSchemaDataRegistrySubscriber.java | 1 -
.../registry/process/subscriber/ClusterProcessSubscriber.java | 1 -
.../registry/status/cluster/subscriber/ClusterStatusSubscriber.java | 1 -
.../manager/standalone/subscriber/StandaloneProcessSubscriber.java | 1 -
.../backend/mysql/handler/admin/executor/ShowProcessListExecutor.java | 2 +-
8 files changed, 4 insertions(+), 9 deletions(-)
diff --git
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/eventbus/EventBusContext.java
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/eventbus/EventBusContext.java
index 974989b8d91..48293435831 100644
---
a/infra/util/src/main/java/org/apache/shardingsphere/infra/util/eventbus/EventBusContext.java
+++
b/infra/util/src/main/java/org/apache/shardingsphere/infra/util/eventbus/EventBusContext.java
@@ -23,7 +23,6 @@ import org.slf4j.bridge.SLF4JBridgeHandler;
/**
* Event bus context.
*/
-@SuppressWarnings("UnstableApiUsage")
public final class EventBusContext {
private final EventBus eventBus = new EventBus();
diff --git
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/eventbus/fixture/EventListenerFixture.java
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/eventbus/fixture/EventListenerFixture.java
index f90d6de0380..76f04b6f50f 100644
---
a/infra/util/src/test/java/org/apache/shardingsphere/infra/util/eventbus/fixture/EventListenerFixture.java
+++
b/infra/util/src/test/java/org/apache/shardingsphere/infra/util/eventbus/fixture/EventListenerFixture.java
@@ -23,7 +23,6 @@ import lombok.Getter;
import java.util.LinkedList;
import java.util.List;
-@SuppressWarnings("UnstableApiUsage")
@Getter
public final class EventListenerFixture {
@@ -34,6 +33,7 @@ public final class EventListenerFixture {
*
* @param event event
*/
+ @SuppressWarnings("unused")
@Subscribe
public void listen(final String event) {
events.add(event);
diff --git
a/mode/core/src/main/java/org/apache/shardingsphere/mode/subsciber/RuleItemChangedSubscriber.java
b/mode/core/src/main/java/org/apache/shardingsphere/mode/subsciber/RuleItemChangedSubscriber.java
index b88030183f1..4eb874552df 100644
---
a/mode/core/src/main/java/org/apache/shardingsphere/mode/subsciber/RuleItemChangedSubscriber.java
+++
b/mode/core/src/main/java/org/apache/shardingsphere/mode/subsciber/RuleItemChangedSubscriber.java
@@ -42,7 +42,7 @@ public final class RuleItemChangedSubscriber {
*
* @param event alter rule item event
*/
- @SuppressWarnings({"UnstableApiUsage", "rawtypes", "unchecked"})
+ @SuppressWarnings({"rawtypes", "unchecked", "unused"})
@Subscribe
public void renew(final AlterRuleItemEvent event) {
if
(!event.getActiveVersion().equals(contextManager.getMetaDataContexts().getPersistService().getMetaDataVersionPersistService().getActiveVersionByFullPath(event.getActiveVersionKey())))
{
@@ -69,7 +69,7 @@ public final class RuleItemChangedSubscriber {
*
* @param event drop rule item event
*/
- @SuppressWarnings({"UnstableApiUsage", "rawtypes", "unchecked"})
+ @SuppressWarnings({"rawtypes", "unchecked", "unused"})
@Subscribe
public void renew(final DropRuleItemEvent event) {
if
(!contextManager.getMetaDataContexts().getMetaData().containsDatabase(event.getDatabaseName()))
{
diff --git
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/subscriber/ShardingSphereSchemaDataRegistrySubscriber.java
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/subscriber/ShardingSphereSchemaDataRegistrySubscriber.java
index 7efc3f24008..6ec93b79cc9 100644
---
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/subscriber/ShardingSphereSchemaDataRegistrySubscriber.java
+++
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/metadata/subscriber/ShardingSphereSchemaDataRegistrySubscriber.java
@@ -26,7 +26,6 @@ import
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositor
/**
* ShardingSphere schema data registry subscriber.
*/
-@SuppressWarnings("UnstableApiUsage")
public final class ShardingSphereSchemaDataRegistrySubscriber {
private final ShardingSphereDataPersistService persistService;
diff --git
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ClusterProcessSubscriber.java
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ClusterProcessSubscriber.java
index ae546387a8b..6b23cd3d2cd 100644
---
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ClusterProcessSubscriber.java
+++
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/process/subscriber/ClusterProcessSubscriber.java
@@ -41,7 +41,6 @@ import java.util.stream.Stream;
/**
* Cluster process subscriber.
*/
-@SuppressWarnings("UnstableApiUsage")
public final class ClusterProcessSubscriber implements ProcessSubscriber {
private final PersistRepository repository;
diff --git
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/subscriber/ClusterStatusSubscriber.java
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/subscriber/ClusterStatusSubscriber.java
index 45f5b9c044b..2a0ea7d7765 100644
---
a/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/subscriber/ClusterStatusSubscriber.java
+++
b/mode/type/cluster/core/src/main/java/org/apache/shardingsphere/mode/manager/cluster/coordinator/registry/status/cluster/subscriber/ClusterStatusSubscriber.java
@@ -26,7 +26,6 @@ import
org.apache.shardingsphere.mode.repository.cluster.ClusterPersistRepositor
/**
* Cluster status subscriber.
*/
-@SuppressWarnings("UnstableApiUsage")
public final class ClusterStatusSubscriber {
private final ClusterPersistRepository repository;
diff --git
a/mode/type/standalone/core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/subscriber/StandaloneProcessSubscriber.java
b/mode/type/standalone/core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/subscriber/StandaloneProcessSubscriber.java
index 88033a0dd9a..95081a3549f 100644
---
a/mode/type/standalone/core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/subscriber/StandaloneProcessSubscriber.java
+++
b/mode/type/standalone/core/src/main/java/org/apache/shardingsphere/mode/manager/standalone/subscriber/StandaloneProcessSubscriber.java
@@ -32,7 +32,6 @@ import java.sql.Statement;
/**
* Standalone process subscriber.
*/
-@SuppressWarnings("UnstableApiUsage")
public final class StandaloneProcessSubscriber implements ProcessSubscriber {
private final EventBusContext eventBusContext;
diff --git
a/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcessListExecutor.java
b/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcessListExecutor.java
index 34f975b2b4f..4fdaa73c79e 100644
---
a/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcessListExecutor.java
+++
b/proxy/backend/type/mysql/src/main/java/org/apache/shardingsphere/proxy/backend/mysql/handler/admin/executor/ShowProcessListExecutor.java
@@ -45,7 +45,6 @@ import java.util.stream.Collectors;
/**
* Show process list executor.
*/
-@SuppressWarnings("UnstableApiUsage")
public final class ShowProcessListExecutor implements
DatabaseAdminQueryExecutor {
private final boolean showFullProcesslist;
@@ -68,6 +67,7 @@ public final class ShowProcessListExecutor implements
DatabaseAdminQueryExecutor
*
* @param event show process list response event
*/
+ @SuppressWarnings("unused")
@Subscribe
public void receiveProcessListData(final ShowProcessListResponseEvent
event) {
processes = event.getProcesses();