From 2fb1c36815f111516fa8de6d598f192b46166536 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=96=AF=E7=8B=82=E7=9A=84=E7=8B=AE=E5=AD=90Li?=
<15040126243@163.com>
Date: Wed, 9 Aug 2023 13:59:09 +0800
Subject: [PATCH] update dubbo 3.2.4 => 3.2.5
---
ruoyi-common/ruoyi-common-alibaba-bom/pom.xml | 2 +-
.../config/ProviderAppStateRouter.java | 80 -------------------
2 files changed, 1 insertion(+), 81 deletions(-)
delete mode 100644 ruoyi-common/ruoyi-common-dubbo/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ProviderAppStateRouter.java
diff --git a/ruoyi-common/ruoyi-common-alibaba-bom/pom.xml b/ruoyi-common/ruoyi-common-alibaba-bom/pom.xml
index 804ccccb..8d799684 100644
--- a/ruoyi-common/ruoyi-common-alibaba-bom/pom.xml
+++ b/ruoyi-common/ruoyi-common-alibaba-bom/pom.xml
@@ -19,7 +19,7 @@
1.8.6
1.7.0
2.2.1
- 3.2.4
+ 3.2.5
1.0.11
diff --git a/ruoyi-common/ruoyi-common-dubbo/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ProviderAppStateRouter.java b/ruoyi-common/ruoyi-common-dubbo/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ProviderAppStateRouter.java
deleted file mode 100644
index b39b3167..00000000
--- a/ruoyi-common/ruoyi-common-dubbo/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ProviderAppStateRouter.java
+++ /dev/null
@@ -1,80 +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.dubbo.rpc.cluster.router.condition.config;
-
-import org.apache.dubbo.common.URL;
-import org.apache.dubbo.common.config.configcenter.ConfigChangedEvent;
-import org.apache.dubbo.common.config.configcenter.DynamicConfiguration;
-import org.apache.dubbo.common.logger.ErrorTypeAwareLogger;
-import org.apache.dubbo.common.logger.LoggerFactory;
-import org.apache.dubbo.common.utils.CollectionUtils;
-import org.apache.dubbo.common.utils.StringUtils;
-import org.apache.dubbo.rpc.Invoker;
-import org.apache.dubbo.rpc.cluster.router.state.BitList;
-
-import static org.apache.dubbo.common.constants.LoggerCodeConstants.CLUSTER_TAG_ROUTE_EMPTY;
-import static org.apache.dubbo.common.utils.StringUtils.isEmpty;
-
-/**
- * Application level router, "application.condition-router"
- */
-public class ProviderAppStateRouter extends ListenableStateRouter {
- private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(ListenableStateRouter.class);
- public static final String NAME = "PROVIDER_APP_ROUTER";
- private String application;
- private final String currentApplication;
-
- public ProviderAppStateRouter(URL url) {
- super(url, url.getApplication());
- this.currentApplication = url.getApplication();
- }
-
- @Override
- public void notify(BitList> invokers) {
- if (CollectionUtils.isEmpty(invokers)) {
- return;
- }
-
- Invoker invoker = invokers.get(0);
- URL url = invoker.getUrl();
- String providerApplication = url.getRemoteApplication();
-
- // provider application is empty or equals with the current application
- if (isEmpty(providerApplication)) {
- logger.warn(CLUSTER_TAG_ROUTE_EMPTY, "condition router get providerApplication is empty, will not subscribe to provider app rules.", "", "");
- return;
- }
- if (providerApplication.equals(currentApplication)) {
- return;
- }
-
- synchronized (this) {
- if (!providerApplication.equals(application)) {
- if (StringUtils.isNotEmpty(application)) {
- this.getRuleRepository().removeListener(application + RULE_SUFFIX, this);
- }
- String key = providerApplication + RULE_SUFFIX;
- this.getRuleRepository().addListener(key, this);
- application = providerApplication;
- String rawRule = this.getRuleRepository().getRule(key, DynamicConfiguration.DEFAULT_GROUP);
- if (StringUtils.isNotEmpty(rawRule)) {
- this.process(new ConfigChangedEvent(key, DynamicConfiguration.DEFAULT_GROUP, rawRule));
- }
- }
- }
- }
-}