From 1bdcc5786042c8ce2b8be4210f7795adef880b71 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:06:12 +0800 Subject: [PATCH 01/23] Bump commons-logging:commons-logging from 1.3.0 to 1.3.1 (#13987) Bumps commons-logging:commons-logging from 1.3.0 to 1.3.1. --- updated-dependencies: - dependency-name: commons-logging:commons-logging dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index a58a6f4a7b..d810510204 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -139,7 +139,7 @@ 1.2.2 1.7.36 - 1.3.0 + 1.3.1 1.2.17 1.2.13 From fa07b6171065d5850cb265410ef281363d7eb683 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:06:20 +0800 Subject: [PATCH 02/23] Bump org.apache.maven.plugins:maven-compiler-plugin (#13986) Bumps [org.apache.maven.plugins:maven-compiler-plugin](https://github.com/apache/maven-compiler-plugin) from 3.12.1 to 3.13.0. - [Release notes](https://github.com/apache/maven-compiler-plugin/releases) - [Commits](https://github.com/apache/maven-compiler-plugin/compare/maven-compiler-plugin-3.12.1...maven-compiler-plugin-3.13.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-compiler-plugin dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml | 2 +- dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml | 2 +- dubbo-demo/dubbo-demo-triple/pom.xml | 2 +- pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml index 0a76dfafee..2854aebf89 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-consumer/pom.xml @@ -216,7 +216,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.12.1 + 3.13.0 1.8 1.8 diff --git a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml index 1fc7bf44be..e6293ea41b 100644 --- a/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml +++ b/dubbo-demo/dubbo-demo-native/dubbo-demo-native-provider/pom.xml @@ -214,7 +214,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.12.1 + 3.13.0 1.8 1.8 diff --git a/dubbo-demo/dubbo-demo-triple/pom.xml b/dubbo-demo/dubbo-demo-triple/pom.xml index f16ba20b35..44f26c6add 100644 --- a/dubbo-demo/dubbo-demo-triple/pom.xml +++ b/dubbo-demo/dubbo-demo-triple/pom.xml @@ -32,7 +32,7 @@ true 1.8 1.8 - 3.12.1 + 3.13.0 diff --git a/pom.xml b/pom.xml index a2628fae02..d13f2040ef 100644 --- a/pom.xml +++ b/pom.xml @@ -145,7 +145,7 @@ 3.2.5 3.2.5 2.8.2 - 3.12.1 + 3.13.0 3.3.0 3.6.3 9.4.54.v20240208 From f4d75450b0582556ec0fbd0aa848f6a922f07bfa Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:06:31 +0800 Subject: [PATCH 03/23] Bump swagger_version from 1.6.13 to 1.6.14 (#13990) Bumps `swagger_version` from 1.6.13 to 1.6.14. Updates `io.swagger:swagger-annotations` from 1.6.13 to 1.6.14 Updates `io.swagger:swagger-jaxrs` from 1.6.13 to 1.6.14 --- updated-dependencies: - dependency-name: io.swagger:swagger-annotations dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: io.swagger:swagger-jaxrs dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index d810510204..3c0c3fc591 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -155,7 +155,7 @@ 1.2.0 1.19.7 3.2.13 - 1.6.13 + 1.6.14 1.1.10.5 1.70 From 59b3c9c9dc887807bccbb77eeb58ccab28df765a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:06:38 +0800 Subject: [PATCH 04/23] Bump org.aspectj:aspectjweaver from 1.9.21.2 to 1.9.22 (#13991) Bumps [org.aspectj:aspectjweaver](https://github.com/eclipse/org.aspectj) from 1.9.21.2 to 1.9.22. - [Release notes](https://github.com/eclipse/org.aspectj/releases) - [Commits](https://github.com/eclipse/org.aspectj/commits) --- updated-dependencies: - dependency-name: org.aspectj:aspectjweaver dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-config/dubbo-config-spring/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-config/dubbo-config-spring/pom.xml b/dubbo-config/dubbo-config-spring/pom.xml index d12920b529..d054d5a9f0 100644 --- a/dubbo-config/dubbo-config-spring/pom.xml +++ b/dubbo-config/dubbo-config-spring/pom.xml @@ -74,7 +74,7 @@ org.aspectj aspectjweaver - 1.9.21.2 + 1.9.22 test From d7d46e635c77adc4bca0c13e7a22b72c279dde73 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:06:44 +0800 Subject: [PATCH 05/23] Bump com.alibaba.fastjson2:fastjson2 from 2.0.47 to 2.0.48 (#13989) Bumps [com.alibaba.fastjson2:fastjson2](https://github.com/alibaba/fastjson2) from 2.0.47 to 2.0.48. - [Release notes](https://github.com/alibaba/fastjson2/releases) - [Commits](https://github.com/alibaba/fastjson2/compare/2.0.47...2.0.48) --- updated-dependencies: - dependency-name: com.alibaba.fastjson2:fastjson2 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 3c0c3fc591..d947edc170 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -99,7 +99,7 @@ 4.5.14 4.4.16 1.2.83 - 2.0.47 + 2.0.48 3.7.0 5.1.0 2.12.0 From 9e18589e81787897b9db9484561ff20ca211111f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:06:53 +0800 Subject: [PATCH 06/23] Bump netty4_version from 4.1.107.Final to 4.1.108.Final (#13988) Bumps `netty4_version` from 4.1.107.Final to 4.1.108.Final. Updates `io.netty:netty-all` from 4.1.107.Final to 4.1.108.Final - [Commits](https://github.com/netty/netty/compare/netty-4.1.107.Final...netty-4.1.108.Final) Updates `io.netty:netty-bom` from 4.1.107.Final to 4.1.108.Final - [Commits](https://github.com/netty/netty/compare/netty-4.1.107.Final...netty-4.1.108.Final) --- updated-dependencies: - dependency-name: io.netty:netty-all dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: io.netty:netty-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index d947edc170..d9709d1d87 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -95,7 +95,7 @@ 3.30.2-GA 1.14.12 3.2.10.Final - 4.1.107.Final + 4.1.108.Final 4.5.14 4.4.16 1.2.83 From 1f74ffd9690e2c8b09e048f4e907225644f82023 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:07:02 +0800 Subject: [PATCH 07/23] Bump org.springframework.security:spring-security-bom (#13993) Bumps [org.springframework.security:spring-security-bom](https://github.com/spring-projects/spring-security) from 5.8.10 to 5.8.11. - [Release notes](https://github.com/spring-projects/spring-security/releases) - [Changelog](https://github.com/spring-projects/spring-security/blob/main/RELEASE.adoc) - [Commits](https://github.com/spring-projects/spring-security/compare/5.8.10...5.8.11) --- updated-dependencies: - dependency-name: org.springframework.security:spring-security-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index d9709d1d87..f234cf40c6 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -91,7 +91,7 @@ 5.3.25 - 5.8.10 + 5.8.11 3.30.2-GA 1.14.12 3.2.10.Final From 4be3587dd14e68f52404960feb1152ab93c96570 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 19:07:11 +0800 Subject: [PATCH 08/23] Bump org.apache.maven.plugins:maven-assembly-plugin from 3.7.0 to 3.7.1 (#13992) Bumps [org.apache.maven.plugins:maven-assembly-plugin](https://github.com/apache/maven-assembly-plugin) from 3.7.0 to 3.7.1. - [Release notes](https://github.com/apache/maven-assembly-plugin/releases) - [Commits](https://github.com/apache/maven-assembly-plugin/compare/maven-assembly-plugin-3.7.0...maven-assembly-plugin-3.7.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-assembly-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-distribution/dubbo-apache-release/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-distribution/dubbo-apache-release/pom.xml b/dubbo-distribution/dubbo-apache-release/pom.xml index fcd2ca4ac5..1a1e30dc25 100644 --- a/dubbo-distribution/dubbo-apache-release/pom.xml +++ b/dubbo-distribution/dubbo-apache-release/pom.xml @@ -52,7 +52,7 @@ maven-assembly-plugin - 3.7.0 + 3.7.1 bin From 00812ce41c44be6e5cd5e2b8e5bf602f806bbbca Mon Sep 17 00:00:00 2001 From: jean pierre Lerbscher <5850581+jlerbsc@users.noreply.github.com> Date: Fri, 29 Mar 2024 04:40:06 +0100 Subject: [PATCH 09/23] Fix Sonar issue s2293 The diamond operator ('<>') should be used (#14005) --- .../dubbo/rpc/cluster/SingleRouterChain.java | 6 +++--- .../configurator/AbstractConfigurator.java | 2 +- .../loadbalance/ConsistentHashLoadBalance.java | 5 ++--- .../dubbo/rpc/cluster/merger/MapMerger.java | 2 +- .../rpc/cluster/merger/MergerFactory.java | 2 +- .../dubbo/rpc/cluster/merger/SetMerger.java | 2 +- .../condition/ConditionStateRouterFactory.java | 2 +- .../config/ServiceStateRouterFactory.java | 2 +- .../router/mesh/route/MeshRuleCache.java | 2 +- .../router/mock/MockStateRouterFactory.java | 2 +- .../router/tag/TagStateRouterFactory.java | 2 +- .../support/FailoverClusterInvoker.java | 4 ++-- .../rpc/cluster/support/MergeableCluster.java | 2 +- .../support/registry/ZoneAwareCluster.java | 2 +- .../support/wrapper/MockClusterWrapper.java | 2 +- .../java/org/apache/dubbo/common/Version.java | 2 +- .../common/beanutil/JavaBeanSerializeUtil.java | 6 +++--- .../apache/dubbo/common/bytecode/Mixin.java | 2 +- .../apache/dubbo/common/bytecode/Wrapper.java | 4 ++-- .../common/compiler/support/ClassUtils.java | 2 +- .../threadlocal/InternalThreadLocalMap.java | 2 +- .../dubbo/common/timer/HashedWheelTimer.java | 2 +- .../apache/dubbo/common/utils/CIDRUtils.java | 2 +- .../apache/dubbo/common/utils/ConfigUtils.java | 4 ++-- .../org/apache/dubbo/common/utils/IOUtils.java | 2 +- .../org/apache/dubbo/common/utils/Stack.java | 2 +- .../apache/dubbo/common/utils/StringUtils.java | 4 ++-- .../apache/dubbo/common/utils/UrlUtils.java | 2 +- .../dubbo/config/AbstractInterfaceConfig.java | 2 +- .../apache/dubbo/config/ApplicationConfig.java | 2 +- .../org/apache/dubbo/config/ModuleConfig.java | 2 +- .../metadata/definition/util/ClassUtils.java | 2 +- .../apache/dubbo/rpc/model/ProviderModel.java | 2 +- .../cache/support/AbstractCacheFactory.java | 2 +- .../alibaba/dubbo/config/ServiceConfig.java | 2 +- .../com/alibaba/dubbo/container/page/Page.java | 4 ++-- .../dubbo/container/page/PageServlet.java | 4 ++-- .../dubbo/container/page/ResourceFilter.java | 2 +- .../container/page/pages/HomePageHandler.java | 4 ++-- .../container/page/pages/LogPageHandler.java | 4 ++-- .../page/pages/StatusPageHandler.java | 8 ++++---- .../page/pages/SystemPageHandler.java | 18 +++++++++--------- .../java/com/alibaba/dubbo/rpc/RpcContext.java | 2 +- .../com/alibaba/dubbo/rpc/RpcInvocation.java | 6 +++--- .../org/apache/dubbo/config/ServiceConfig.java | 4 ++-- .../config/utils/ConfigValidationUtils.java | 4 ++-- .../AbstractAnnotationBeanPostProcessor.java | 5 ++--- .../config/spring/util/AnnotationUtils.java | 4 ++-- .../spring/util/PropertySourcesUtils.java | 2 +- .../java/org/apache/dubbo/container/Main.java | 2 +- .../cache/support/AbstractCacheFactory.java | 2 +- .../cache/support/expiring/ExpiringMap.java | 2 +- .../store/nacos/NacosMetadataReport.java | 2 +- .../support/AbstractMonitorFactory.java | 4 ++-- .../command/decoder/HttpCommandDecoder.java | 4 ++-- .../dubbo/qos/command/impl/CountTelnet.java | 6 +++--- .../dubbo/qos/command/util/CommandHelper.java | 2 +- .../org/apache/dubbo/qos/textui/TLadder.java | 2 +- .../org/apache/dubbo/qos/textui/TTable.java | 2 +- .../org/apache/dubbo/qos/textui/TTree.java | 2 +- .../reactive/calls/ReactorServerCalls.java | 4 ++-- .../InterfaceCompatibleRegistryProtocol.java | 2 +- .../registry/multicast/MulticastRegistry.java | 6 +++--- .../registry/multiple/MultipleRegistry.java | 2 +- .../exchange/support/ReplierDispatcher.java | 2 +- .../support/header/HeaderExchangeServer.java | 2 +- .../remoting/telnet/codec/TelnetCodec.java | 2 +- .../support/command/HelpTelnetHandler.java | 4 ++-- .../support/command/StatusTelnetHandler.java | 10 +++++----- .../dubbo/remoting/transport/CodecSupport.java | 6 +++--- .../dubbo/remoting/http/RequestTemplate.java | 4 ++-- .../http/servlet/DispatcherServlet.java | 2 +- .../remoting/http/servlet/ServletManager.java | 2 +- .../remoting/transport/netty/NettyChannel.java | 4 ++-- .../remoting/transport/netty/NettyHandler.java | 2 +- .../transport/netty4/NettyChannel.java | 5 ++--- .../apache/dubbo/rpc/RpcServiceContext.java | 2 +- .../java/org/apache/dubbo/rpc/RpcStatus.java | 7 +++---- .../dubbo/rpc/filter/DeprecatedFilter.java | 2 +- .../rpc/filter/tps/DefaultTPSLimiter.java | 2 +- .../rpc/protocol/AbstractProxyProtocol.java | 2 +- .../rpc/protocol/ProtocolListenerWrapper.java | 3 +-- .../apache/dubbo/rpc/support/MockInvoker.java | 4 ++-- .../rpc/protocol/dubbo/DubboProtocol.java | 4 ++-- .../rpc/protocol/injvm/InjvmProtocol.java | 4 ++-- .../dubbo/rpc/protocol/rest/RestProtocol.java | 2 +- .../rpc/protocol/rest/ViolationReport.java | 2 +- .../DubboPreMatchContainerRequestContext.java | 2 +- .../rpc/protocol/rest/util/ReflectUtils.java | 2 +- .../tri/TriHttp2RemoteFlowController.java | 2 +- .../org/apache/dubbo/test/common/SysProps.java | 2 +- 91 files changed, 143 insertions(+), 148 deletions(-) diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/SingleRouterChain.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/SingleRouterChain.java index c217bdb0d6..5c6dec6efc 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/SingleRouterChain.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/SingleRouterChain.java @@ -212,7 +212,7 @@ public class SingleRouterChain { public RouterSnapshotNode buildRouterSnapshot( URL url, BitList> availableInvokers, Invocation invocation) { BitList> resultInvokers = availableInvokers.clone(); - RouterSnapshotNode parentNode = new RouterSnapshotNode("Parent", resultInvokers.clone()); + RouterSnapshotNode parentNode = new RouterSnapshotNode<>("Parent", resultInvokers.clone()); parentNode.setNodeOutputInvokers(resultInvokers.clone()); // 1. route state router @@ -227,7 +227,7 @@ public class SingleRouterChain { return parentNode; } - RouterSnapshotNode commonRouterNode = new RouterSnapshotNode("CommonRouter", resultInvokers.clone()); + RouterSnapshotNode commonRouterNode = new RouterSnapshotNode<>("CommonRouter", resultInvokers.clone()); parentNode.appendNode(commonRouterNode); List> commonRouterResult = resultInvokers; @@ -237,7 +237,7 @@ public class SingleRouterChain { List> inputInvokers = new ArrayList<>(commonRouterResult); RouterSnapshotNode currentNode = - new RouterSnapshotNode(router.getClass().getSimpleName(), inputInvokers); + new RouterSnapshotNode<>(router.getClass().getSimpleName(), inputInvokers); // append to router node chain commonRouterNode.appendNode(currentNode); diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java index a72956054a..406756ad03 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/configurator/AbstractConfigurator.java @@ -223,7 +223,7 @@ public abstract class AbstractConfigurator implements Configurator { } private Set genConditionKeys() { - Set conditionKeys = new HashSet(); + Set conditionKeys = new HashSet<>(); conditionKeys.add(CATEGORY_KEY); conditionKeys.add(Constants.CHECK_KEY); conditionKeys.add(DYNAMIC_KEY); diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java index fb777ef03a..82421e460f 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/loadbalance/ConsistentHashLoadBalance.java @@ -46,8 +46,7 @@ public class ConsistentHashLoadBalance extends AbstractLoadBalance { */ public static final String HASH_ARGUMENTS = "hash.arguments"; - private final ConcurrentMap> selectors = - new ConcurrentHashMap>(); + private final ConcurrentMap> selectors = new ConcurrentHashMap<>(); @SuppressWarnings("unchecked") @Override @@ -75,7 +74,7 @@ public class ConsistentHashLoadBalance extends AbstractLoadBalance { private final int[] argumentIndex; ConsistentHashSelector(List> invokers, String methodName, int identityHashCode) { - this.virtualInvokers = new TreeMap>(); + this.virtualInvokers = new TreeMap<>(); this.identityHashCode = identityHashCode; URL url = invokers.get(0).getUrl(); this.replicaNumber = url.getMethodParameter(methodName, HASH_NODES, 160); diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MapMerger.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MapMerger.java index eaa863ed64..dca9c34b25 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MapMerger.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MapMerger.java @@ -32,7 +32,7 @@ public class MapMerger implements Merger> { if (ArrayUtils.isEmpty(items)) { return Collections.emptyMap(); } - Map result = new HashMap(); + Map result = new HashMap<>(); Stream.of(items).filter(Objects::nonNull).forEach(result::putAll); return result; } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MergerFactory.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MergerFactory.java index 3aa07f2ad3..0ac9949470 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MergerFactory.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/MergerFactory.java @@ -36,7 +36,7 @@ public class MergerFactory implements ScopeModelAware { private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(MergerFactory.class); - private ConcurrentMap, Merger> MERGER_CACHE = new ConcurrentHashMap, Merger>(); + private ConcurrentMap, Merger> MERGER_CACHE = new ConcurrentHashMap<>(); private ScopeModel scopeModel; @Override diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/SetMerger.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/SetMerger.java index 5b0dc5e0c3..5b77177cd0 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/SetMerger.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/merger/SetMerger.java @@ -32,7 +32,7 @@ public class SetMerger implements Merger> { if (ArrayUtils.isEmpty(items)) { return Collections.emptySet(); } - Set result = new HashSet(); + Set result = new HashSet<>(); Stream.of(items).filter(Objects::nonNull).forEach(result::addAll); return result; } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/ConditionStateRouterFactory.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/ConditionStateRouterFactory.java index 06a40e81df..c18f674c3e 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/ConditionStateRouterFactory.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/ConditionStateRouterFactory.java @@ -30,6 +30,6 @@ public class ConditionStateRouterFactory extends CacheableStateRouterFactory { @Override protected StateRouter createRouter(Class interfaceClass, URL url) { - return new ConditionStateRouter(url); + return new ConditionStateRouter<>(url); } } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ServiceStateRouterFactory.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ServiceStateRouterFactory.java index ecc536953b..d35baf6ee3 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ServiceStateRouterFactory.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/condition/config/ServiceStateRouterFactory.java @@ -32,6 +32,6 @@ public class ServiceStateRouterFactory extends CacheableStateRouterFactory { @Override protected StateRouter createRouter(Class interfaceClass, URL url) { - return new ServiceStateRouter(url); + return new ServiceStateRouter<>(url); } } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleCache.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleCache.java index 098b9bd4cf..a53e47280a 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleCache.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mesh/route/MeshRuleCache.java @@ -136,7 +136,7 @@ public class MeshRuleCache { Collections.unmodifiableMap(totalSubsetMap), unmatchedInvokers); } else { - return new MeshRuleCache( + return new MeshRuleCache<>( Collections.emptyList(), Collections.emptyMap(), Collections.emptyMap(), invokers); } } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mock/MockStateRouterFactory.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mock/MockStateRouterFactory.java index 9bff80a573..d81b578ae3 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mock/MockStateRouterFactory.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/mock/MockStateRouterFactory.java @@ -30,6 +30,6 @@ public class MockStateRouterFactory implements StateRouterFactory { @Override public StateRouter getRouter(Class interfaceClass, URL url) { - return new MockInvokersSelector(url); + return new MockInvokersSelector<>(url); } } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagStateRouterFactory.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagStateRouterFactory.java index b05e09e703..de38ff8f7f 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagStateRouterFactory.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/router/tag/TagStateRouterFactory.java @@ -31,6 +31,6 @@ public class TagStateRouterFactory extends CacheableStateRouterFactory { @Override protected StateRouter createRouter(Class interfaceClass, URL url) { - return new TagStateRouter(url); + return new TagStateRouter<>(url); } } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailoverClusterInvoker.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailoverClusterInvoker.java index a840773c51..1fc3cadcc1 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailoverClusterInvoker.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/FailoverClusterInvoker.java @@ -63,8 +63,8 @@ public class FailoverClusterInvoker extends AbstractClusterInvoker { int len = calculateInvokeTimes(methodName); // retry loop. RpcException le = null; // last exception. - List> invoked = new ArrayList>(copyInvokers.size()); // invoked invokers. - Set providers = new HashSet(len); + List> invoked = new ArrayList<>(copyInvokers.size()); // invoked invokers. + Set providers = new HashSet<>(len); for (int i = 0; i < len; i++) { // Reselect before retry to avoid a change of candidate `invokers`. // NOTE: if `invokers` changed, then `invoked` also lose accuracy. diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableCluster.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableCluster.java index 9bc030729f..c219745b38 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableCluster.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/MergeableCluster.java @@ -26,6 +26,6 @@ public class MergeableCluster extends AbstractCluster { @Override public AbstractClusterInvoker doJoin(Directory directory) throws RpcException { - return new MergeableClusterInvoker(directory); + return new MergeableClusterInvoker<>(directory); } } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareCluster.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareCluster.java index a1cbf14e60..10a1297983 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareCluster.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/registry/ZoneAwareCluster.java @@ -27,6 +27,6 @@ public class ZoneAwareCluster extends AbstractCluster { @Override protected AbstractClusterInvoker doJoin(Directory directory) throws RpcException { - return new ZoneAwareClusterInvoker(directory); + return new ZoneAwareClusterInvoker<>(directory); } } diff --git a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/MockClusterWrapper.java b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/MockClusterWrapper.java index 0836e48e25..0a2a2e7388 100644 --- a/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/MockClusterWrapper.java +++ b/dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/support/wrapper/MockClusterWrapper.java @@ -35,7 +35,7 @@ public class MockClusterWrapper implements Cluster { @Override public Invoker join(Directory directory, boolean buildFilterChain) throws RpcException { - return new MockClusterInvoker(directory, this.cluster.join(directory, buildFilterChain)); + return new MockClusterInvoker<>(directory, this.cluster.join(directory, buildFilterChain)); } public Cluster getCluster() { diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java b/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java index a33be42ddc..90f2b70704 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/Version.java @@ -60,7 +60,7 @@ public final class Version { public static final int LOWEST_VERSION_FOR_RESPONSE_ATTACHMENT = 2000200; // 2.0.2 public static final int HIGHEST_PROTOCOL_VERSION = 2009900; // 2.0.99 - private static final Map VERSION2INT = new HashMap(); + private static final Map VERSION2INT = new HashMap<>(); static { // get dubbo version and last commit id diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/beanutil/JavaBeanSerializeUtil.java b/dubbo-common/src/main/java/org/apache/dubbo/common/beanutil/JavaBeanSerializeUtil.java index 6a3afbde42..0149cc9ee7 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/beanutil/JavaBeanSerializeUtil.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/beanutil/JavaBeanSerializeUtil.java @@ -35,7 +35,7 @@ import java.util.Map; public final class JavaBeanSerializeUtil { private static final Logger logger = LoggerFactory.getLogger(JavaBeanSerializeUtil.class); - private static final Map> TYPES = new HashMap>(); + private static final Map> TYPES = new HashMap<>(); private static final String ARRAY_PREFIX = "["; private static final String REFERENCE_TYPE_PREFIX = "L"; private static final String REFERENCE_TYPE_SUFFIX = ";"; @@ -72,7 +72,7 @@ public final class JavaBeanSerializeUtil { if (obj instanceof JavaBeanDescriptor) { return (JavaBeanDescriptor) obj; } - IdentityHashMap cache = new IdentityHashMap(); + IdentityHashMap cache = new IdentityHashMap<>(); return createDescriptorIfAbsent(obj, accessor, cache); } @@ -209,7 +209,7 @@ public final class JavaBeanSerializeUtil { if (beanDescriptor == null) { return null; } - IdentityHashMap cache = new IdentityHashMap(); + IdentityHashMap cache = new IdentityHashMap<>(); Object result = instantiateForDeserialize(beanDescriptor, loader, cache); deserializeInternal(result, beanDescriptor, loader, cache); return result; diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Mixin.java b/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Mixin.java index 81cadc0d76..4a6e37c883 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Mixin.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Mixin.java @@ -120,7 +120,7 @@ public abstract class Mixin { Class neighbor = null; // impl methods. - Set worked = new HashSet(); + Set worked = new HashSet<>(); for (int i = 0; i < ics.length; i++) { if (!Modifier.isPublic(ics[i].getModifiers())) { String npkg = ics[i].getPackage().getName(); diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Wrapper.java b/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Wrapper.java index b42d5e286f..b68e1ab5e1 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Wrapper.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/bytecode/Wrapper.java @@ -42,8 +42,8 @@ import javassist.CtMethod; * Wrapper. */ public abstract class Wrapper { - private static final ConcurrentMap, Wrapper> WRAPPER_MAP = - new ConcurrentHashMap, Wrapper>(); // class wrapper map + // class wrapper map + private static final ConcurrentMap, Wrapper> WRAPPER_MAP = new ConcurrentHashMap<>(); private static final String[] EMPTY_STRING_ARRAY = new String[0]; private static final String[] OBJECT_METHODS = new String[] {"getClass", "hashCode", "toString", "equals"}; private static final Wrapper OBJECT_WRAPPER = new Wrapper() { diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java index d2c39053d6..aba14f4cea 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/compiler/support/ClassUtils.java @@ -392,7 +392,7 @@ public class ClassUtils { } public static Map toMap(Map.Entry[] entries) { - Map map = new HashMap(); + Map map = new HashMap<>(); if (entries != null && entries.length > 0) { for (Map.Entry entry : entries) { map.put(entry.getKey(), entry.getValue()); diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/threadlocal/InternalThreadLocalMap.java b/dubbo-common/src/main/java/org/apache/dubbo/common/threadlocal/InternalThreadLocalMap.java index 58b269a4f3..88a4fc74f4 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/threadlocal/InternalThreadLocalMap.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/threadlocal/InternalThreadLocalMap.java @@ -28,7 +28,7 @@ public final class InternalThreadLocalMap { private Object[] indexedVariables; - private static ThreadLocal slowThreadLocalMap = new ThreadLocal(); + private static ThreadLocal slowThreadLocalMap = new ThreadLocal<>(); private static final AtomicInteger NEXT_INDEX = new AtomicInteger(); diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java b/dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java index a5c255b2b8..fb03da44ea 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/timer/HashedWheelTimer.java @@ -427,7 +427,7 @@ public class HashedWheelTimer implements Timer { } private final class Worker implements Runnable { - private final Set unprocessedTimeouts = new HashSet(); + private final Set unprocessedTimeouts = new HashSet<>(); private long tick; diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CIDRUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CIDRUtils.java index 5d9dc8bcbd..5f3632af7a 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CIDRUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/CIDRUtils.java @@ -98,7 +98,7 @@ public class CIDRUtils { private byte[] toBytes(byte[] array, int targetSize) { int counter = 0; - List newArr = new ArrayList(); + List newArr = new ArrayList<>(); while (counter < targetSize && (array.length - 1 - counter >= 0)) { newArr.add(0, array[array.length - 1 - counter]); counter++; diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java index 74ad48add5..27b9c41c64 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/ConfigUtils.java @@ -87,7 +87,7 @@ public class ConfigUtils { */ public static List mergeValues( ExtensionDirector extensionDirector, Class type, String cfg, List def) { - List defaults = new ArrayList(); + List defaults = new ArrayList<>(); if (def != null) { for (String name : def) { if (extensionDirector.getExtensionLoader(type).hasExtension(name)) { @@ -96,7 +96,7 @@ public class ConfigUtils { } } - List names = new ArrayList(); + List names = new ArrayList<>(); // add initial values String[] configs = (cfg == null || cfg.trim().length() == 0) ? new String[0] : COMMA_SPLIT_PATTERN.split(cfg); diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/IOUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/IOUtils.java index 0578feed90..c2ee5587b3 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/IOUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/IOUtils.java @@ -179,7 +179,7 @@ public class IOUtils { * @throws IOException If an I/O error occurs */ public static String[] readLines(InputStream is) throws IOException { - List lines = new ArrayList(); + List lines = new ArrayList<>(); try (BufferedReader reader = new BufferedReader(new InputStreamReader(is))) { String line; while ((line = reader.readLine()) != null) { diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/Stack.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/Stack.java index 13e7ae4e7d..38f274d98f 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/Stack.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/Stack.java @@ -26,7 +26,7 @@ import java.util.List; public class Stack { private int mSize = 0; - private final List mElements = new ArrayList(); + private final List mElements = new ArrayList<>(); public Stack() {} diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/StringUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/StringUtils.java index e46c77e059..54b87a28a0 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/StringUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/StringUtils.java @@ -861,7 +861,7 @@ public final class StringUtils { */ private static Map parseKeyValuePair(String str, String itemSeparator) { String[] tmp = str.split(itemSeparator); - Map map = new HashMap(tmp.length); + Map map = new HashMap<>(tmp.length); for (int i = 0; i < tmp.length; i++) { Matcher matcher = KVP_PATTERN.matcher(tmp[i]); if (!matcher.matches()) { @@ -885,7 +885,7 @@ public final class StringUtils { */ public static Map parseQueryString(String qs) { if (isEmpty(qs)) { - return new HashMap(); + return new HashMap<>(); } return parseKeyValuePair(qs, "\\&"); } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java index ec1745e431..89e6b52b8d 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/UrlUtils.java @@ -181,7 +181,7 @@ public class UrlUtils { throw new IllegalArgumentException( "Addresses is not allowed to be empty, please re-enter."); // here won't be empty } - List registries = new ArrayList(); + List registries = new ArrayList<>(); for (String addr : addresses) { registries.add(parseURL(addr, defaults)); } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java index 9eec9c55d8..e82a8a1a77 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/AbstractInterfaceConfig.java @@ -204,7 +204,7 @@ public abstract class AbstractInterfaceConfig extends AbstractMethodConfig { /** * The url of the reference service */ - protected final transient List urls = new ArrayList(); + protected final transient List urls = new ArrayList<>(); @Transient public List getExportedUrls() { diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java index 3666135ae8..7f25d99d47 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ApplicationConfig.java @@ -361,7 +361,7 @@ public class ApplicationConfig extends AbstractConfig { } public void setRegistry(RegistryConfig registry) { - List registries = new ArrayList(1); + List registries = new ArrayList<>(1); registries.add(registry); this.registries = registries; } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/config/ModuleConfig.java b/dubbo-common/src/main/java/org/apache/dubbo/config/ModuleConfig.java index 51fb4706ff..6e0fd8719f 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/config/ModuleConfig.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/config/ModuleConfig.java @@ -186,7 +186,7 @@ public class ModuleConfig extends AbstractConfig { } public void setRegistry(RegistryConfig registry) { - List registries = new ArrayList(1); + List registries = new ArrayList<>(1); registries.add(registry); this.registries = registries; } diff --git a/dubbo-common/src/main/java/org/apache/dubbo/metadata/definition/util/ClassUtils.java b/dubbo-common/src/main/java/org/apache/dubbo/metadata/definition/util/ClassUtils.java index 1115c451b2..b7441b76b0 100755 --- a/dubbo-common/src/main/java/org/apache/dubbo/metadata/definition/util/ClassUtils.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/metadata/definition/util/ClassUtils.java @@ -96,7 +96,7 @@ public final class ClassUtils { * @return methods list */ public static List getPublicNonStaticMethods(final Class clazz) { - List result = new ArrayList(); + List result = new ArrayList<>(); Method[] methods = clazz.getMethods(); for (Method method : methods) { diff --git a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ProviderModel.java b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ProviderModel.java index bb1f0ed8a0..a509506ec5 100644 --- a/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ProviderModel.java +++ b/dubbo-common/src/main/java/org/apache/dubbo/rpc/model/ProviderModel.java @@ -135,7 +135,7 @@ public class ProviderModel extends ServiceModel { } public List getAllMethodModels() { - List result = new ArrayList(); + List result = new ArrayList<>(); for (List models : methods.values()) { result.addAll(models); } diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/cache/support/AbstractCacheFactory.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/cache/support/AbstractCacheFactory.java index 05a9c25d52..eba2fa5613 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/cache/support/AbstractCacheFactory.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/cache/support/AbstractCacheFactory.java @@ -30,7 +30,7 @@ import static org.apache.dubbo.common.constants.CommonConstants.METHOD_KEY; @Deprecated public abstract class AbstractCacheFactory implements CacheFactory { - private final ConcurrentMap caches = new ConcurrentHashMap(); + private final ConcurrentMap caches = new ConcurrentHashMap<>(); @Override public Cache getCache(URL url, Invocation invocation) { diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java index fbd752f358..58ad1e779c 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/config/ServiceConfig.java @@ -86,7 +86,7 @@ public class ServiceConfig extends org.apache.dubbo.config.ServiceConfig { if (providers == null || providers.isEmpty()) { return null; } - List protocols = new ArrayList(providers.size()); + List protocols = new ArrayList<>(providers.size()); for (ProviderConfig provider : providers) { protocols.add(convertProviderToProtocol(provider)); } diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/Page.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/Page.java index 24042939a8..387723e82f 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/Page.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/Page.java @@ -57,8 +57,8 @@ public class Page { } private static List> stringToList(String str) { - List> rows = new ArrayList>(); - List row = new ArrayList(); + List> rows = new ArrayList<>(); + List row = new ArrayList<>(); row.add(str); rows.add(row); return rows; diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/PageServlet.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/PageServlet.java index 25486c07ed..f9cf0fb3fa 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/PageServlet.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/PageServlet.java @@ -49,8 +49,8 @@ public class PageServlet extends HttpServlet { private static final long serialVersionUID = -8370312705453328501L; private static PageServlet INSTANCE; protected final Random random = new Random(); - protected final Map pages = new ConcurrentHashMap(); - protected final List menus = new ArrayList(); + protected final Map pages = new ConcurrentHashMap<>(); + protected final List menus = new ArrayList<>(); public static PageServlet getInstance() { return INSTANCE; diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/ResourceFilter.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/ResourceFilter.java index 62f3da3d8e..981508e4ae 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/ResourceFilter.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/ResourceFilter.java @@ -46,7 +46,7 @@ public class ResourceFilter implements Filter { private final long start = System.currentTimeMillis(); - private final List resources = new ArrayList(); + private final List resources = new ArrayList<>(); public void init(FilterConfig filterConfig) throws ServletException { String config = filterConfig.getInitParameter("resources"); diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/HomePageHandler.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/HomePageHandler.java index 306706c22c..0556a55a55 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/HomePageHandler.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/HomePageHandler.java @@ -35,11 +35,11 @@ public class HomePageHandler implements PageHandler { @Override public Page handle(URL url) { - List> rows = new ArrayList>(); + List> rows = new ArrayList<>(); for (PageHandler handler : PageServlet.getInstance().getMenus()) { String uri = ExtensionLoader.getExtensionLoader(PageHandler.class).getExtensionName(handler); Menu menu = handler.getClass().getAnnotation(Menu.class); - List row = new ArrayList(); + List row = new ArrayList<>(); row.add("" + menu.name() + ""); row.add(menu.desc()); rows.add(row); diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/LogPageHandler.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/LogPageHandler.java index ee9f3670d5..cc5a5b3ec0 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/LogPageHandler.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/LogPageHandler.java @@ -97,8 +97,8 @@ public class LogPageHandler implements PageHandler { } } Level level = LogManager.getRootLogger().getLevel(); - List> rows = new ArrayList>(); - List row = new ArrayList(); + List> rows = new ArrayList<>(); + List row = new ArrayList<>(); row.add(content); rows.add(row); return new Page( diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/StatusPageHandler.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/StatusPageHandler.java index f0fdb34a2a..7a6b762309 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/StatusPageHandler.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/StatusPageHandler.java @@ -40,14 +40,14 @@ public class StatusPageHandler implements PageHandler { @Override public Page handle(URL url) { - List> rows = new ArrayList>(); + List> rows = new ArrayList<>(); Set names = ExtensionLoader.getExtensionLoader(StatusChecker.class).getSupportedExtensions(); - Map statuses = new HashMap(); + Map statuses = new HashMap<>(); for (String name : names) { StatusChecker checker = ExtensionLoader.getExtensionLoader(StatusChecker.class).getExtension(name); - List row = new ArrayList(); + List row = new ArrayList<>(); row.add(name); Status status = checker.check(); if (status != null && !Status.Level.UNKNOWN.equals(status.getLevel())) { @@ -61,7 +61,7 @@ public class StatusPageHandler implements PageHandler { if ("status".equals(url.getPath())) { return new Page("", "", "", status.getLevel().toString()); } else { - List row = new ArrayList(); + List row = new ArrayList<>(); row.add("summary"); row.add(getLevelHtml(status.getLevel())); row.add("summary"); diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/SystemPageHandler.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/SystemPageHandler.java index 0c8e3c26ec..d771c061e9 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/SystemPageHandler.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/container/page/pages/SystemPageHandler.java @@ -44,49 +44,49 @@ public class SystemPageHandler implements PageHandler { @Override public Page handle(URL url) { - List> rows = new ArrayList>(); + List> rows = new ArrayList<>(); List row; - row = new ArrayList(); + row = new ArrayList<>(); row.add("Version"); row.add(Version.getVersion(SystemPageHandler.class, "2.0.0")); rows.add(row); - row = new ArrayList(); + row = new ArrayList<>(); row.add("Host"); String address = NetUtils.getLocalHost(); row.add(NetUtils.getHostName(address) + "/" + address); rows.add(row); - row = new ArrayList(); + row = new ArrayList<>(); row.add("OS"); row.add(System.getProperty("os.name") + " " + System.getProperty("os.version")); rows.add(row); - row = new ArrayList(); + row = new ArrayList<>(); row.add("JVM"); row.add(System.getProperty("java.runtime.name") + " " + System.getProperty("java.runtime.version") + ",
" + System.getProperty("java.vm.name") + " " + System.getProperty("java.vm.version") + " " + System.getProperty("java.vm.info", "")); rows.add(row); - row = new ArrayList(); + row = new ArrayList<>(); row.add("CPU"); row.add(System.getProperty("os.arch", "") + ", " + String.valueOf(Runtime.getRuntime().availableProcessors()) + " cores"); rows.add(row); - row = new ArrayList(); + row = new ArrayList<>(); row.add("Locale"); row.add(Locale.getDefault().toString() + "/" + System.getProperty("file.encoding")); rows.add(row); - row = new ArrayList(); + row = new ArrayList<>(); row.add("Uptime"); row.add(formatUptime(ManagementFactory.getRuntimeMXBean().getUptime())); rows.add(row); - row = new ArrayList(); + row = new ArrayList<>(); row.add("Time"); row.add(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS Z").format(new Date())); rows.add(row); diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java index 6f1b383e62..0f19232bca 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java @@ -353,7 +353,7 @@ public class RpcContext { final T o = callable.call(); // local invoke will return directly if (o != null) { - FutureTask f = new FutureTask(new Callable() { + FutureTask f = new FutureTask<>(new Callable() { @Override public T call() throws Exception { return o; diff --git a/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcInvocation.java b/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcInvocation.java index d9bc2dd662..2a741489d0 100644 --- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcInvocation.java +++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcInvocation.java @@ -162,14 +162,14 @@ public class RpcInvocation implements Invocation, Serializable { public void setAttachment(String key, String value) { if (attachments == null) { - attachments = new HashMap(); + attachments = new HashMap<>(); } attachments.put(key, value); } public void setAttachmentIfAbsent(String key, String value) { if (attachments == null) { - attachments = new HashMap(); + attachments = new HashMap<>(); } if (!attachments.containsKey(key)) { attachments.put(key, value); @@ -181,7 +181,7 @@ public class RpcInvocation implements Invocation, Serializable { return; } if (this.attachments == null) { - this.attachments = new HashMap(); + this.attachments = new HashMap<>(); } this.attachments.putAll(attachments); } diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java index e77c9e2e82..bde86c3a9b 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java @@ -128,7 +128,7 @@ public class ServiceConfig extends ServiceConfigBase { /** * A random port cache, the different protocols who have no port specified have different random port */ - private static final Map RANDOM_PORT_MAP = new HashMap(); + private static final Map RANDOM_PORT_MAP = new HashMap<>(); private Protocol protocolSPI; @@ -651,7 +651,7 @@ public class ServiceConfig extends ServiceConfigBase { private Map buildAttributes(ProtocolConfig protocolConfig) { - Map map = new HashMap(); + Map map = new HashMap<>(); map.put(SIDE_KEY, PROVIDER_SIDE); // append params with basic configs, diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java index 728aa21845..696c12eb43 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/utils/ConfigValidationUtils.java @@ -209,7 +209,7 @@ public class ConfigValidationUtils { address = ANYHOST_VALUE; } if (!RegistryConfig.NO_AVAILABLE.equalsIgnoreCase(address)) { - Map map = new HashMap(); + Map map = new HashMap<>(); AbstractConfig.appendParameters(map, application); AbstractConfig.appendParameters(map, config); map.put(PATH_KEY, RegistryService.class.getName()); @@ -309,7 +309,7 @@ public class ConfigValidationUtils { } public static URL loadMonitor(AbstractInterfaceConfig interfaceConfig, URL registryURL) { - Map map = new HashMap(); + Map map = new HashMap<>(); map.put(INTERFACE_KEY, MonitorService.class.getName()); AbstractInterfaceConfig.appendRuntimeParameters(map); // set ip diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/AbstractAnnotationBeanPostProcessor.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/AbstractAnnotationBeanPostProcessor.java index c287e23ae4..683a335fef 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/AbstractAnnotationBeanPostProcessor.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/beans/factory/annotation/AbstractAnnotationBeanPostProcessor.java @@ -78,8 +78,7 @@ public abstract class AbstractAnnotationBeanPostProcessor private final Class[] annotationTypes; private final ConcurrentMap - injectionMetadataCache = new ConcurrentHashMap< - String, AbstractAnnotationBeanPostProcessor.AnnotatedInjectionMetadata>(CACHE_SIZE); + injectionMetadataCache = new ConcurrentHashMap<>(CACHE_SIZE); private ConfigurableListableBeanFactory beanFactory; @@ -98,7 +97,7 @@ public abstract class AbstractAnnotationBeanPostProcessor } private static Collection combine(Collection... elements) { - List allElements = new ArrayList(); + List allElements = new ArrayList<>(); for (Collection e : elements) { allElements.addAll(e); } diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/AnnotationUtils.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/AnnotationUtils.java index 713a191835..02771ca121 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/AnnotationUtils.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/AnnotationUtils.java @@ -87,7 +87,7 @@ public abstract class AnnotationUtils { Set ignoreAttributeNamesSet = new HashSet<>(Arrays.asList(ignoreAttributeNames)); - Map actualAttributes = new LinkedHashMap(); + Map actualAttributes = new LinkedHashMap<>(); for (Map.Entry annotationAttribute : annotationAttributes.entrySet()) { @@ -143,7 +143,7 @@ public abstract class AnnotationUtils { if (ignoreDefaultValue && !isEmpty(annotationAttributes)) { - List attributeNamesToIgnore = new LinkedList(asList(ignoreAttributeNames)); + List attributeNamesToIgnore = new LinkedList<>(asList(ignoreAttributeNames)); for (Map.Entry annotationAttribute : annotationAttributes.entrySet()) { String attributeName = annotationAttribute.getKey(); diff --git a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/PropertySourcesUtils.java b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/PropertySourcesUtils.java index 15e164b5ee..8a5eff73e5 100644 --- a/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/PropertySourcesUtils.java +++ b/dubbo-config/dubbo-config-spring/src/main/java/org/apache/dubbo/config/spring/util/PropertySourcesUtils.java @@ -103,7 +103,7 @@ public abstract class PropertySourcesUtils { public static Map getSubProperties( PropertySources propertySources, PropertyResolver propertyResolver, String prefix) { - Map subProperties = new LinkedHashMap(); + Map subProperties = new LinkedHashMap<>(); String normalizedPrefix = normalizePrefix(prefix); diff --git a/dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java b/dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java index 9845e778c3..89add47aff 100644 --- a/dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java +++ b/dubbo-container/dubbo-container-api/src/main/java/org/apache/dubbo/container/Main.java @@ -60,7 +60,7 @@ public class Main { args = COMMA_SPLIT_PATTERN.split(config); } - final List containers = new ArrayList(); + final List containers = new ArrayList<>(); for (int i = 0; i < args.length; i++) { containers.add(LOADER.getExtension(args[i])); } diff --git a/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/AbstractCacheFactory.java b/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/AbstractCacheFactory.java index 00276dda8c..ac3c155463 100644 --- a/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/AbstractCacheFactory.java +++ b/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/AbstractCacheFactory.java @@ -42,7 +42,7 @@ public abstract class AbstractCacheFactory implements CacheFactory { /** * This is used to store factory level-1 cached data. */ - private final ConcurrentMap caches = new ConcurrentHashMap(); + private final ConcurrentMap caches = new ConcurrentHashMap<>(); private final Object MONITOR = new Object(); diff --git a/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java b/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java index cec8854d7d..9061e7a6f4 100644 --- a/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java +++ b/dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/support/expiring/ExpiringMap.java @@ -158,7 +158,7 @@ public class ExpiringMap implements Map { @Override public Collection values() { - List list = new ArrayList(); + List list = new ArrayList<>(); Set> delegatedSet = delegateMap.entrySet(); for (Entry entry : delegatedSet) { ExpiryObject value = entry.getValue(); diff --git a/dubbo-metadata/dubbo-metadata-report-nacos/src/main/java/org/apache/dubbo/metadata/store/nacos/NacosMetadataReport.java b/dubbo-metadata/dubbo-metadata-report-nacos/src/main/java/org/apache/dubbo/metadata/store/nacos/NacosMetadataReport.java index bdd5e83006..d6dac4355e 100644 --- a/dubbo-metadata/dubbo-metadata-report-nacos/src/main/java/org/apache/dubbo/metadata/store/nacos/NacosMetadataReport.java +++ b/dubbo-metadata/dubbo-metadata-report-nacos/src/main/java/org/apache/dubbo/metadata/store/nacos/NacosMetadataReport.java @@ -258,7 +258,7 @@ public class NacosMetadataReport extends AbstractMetadataReport { if (StringUtils.isEmpty(content)) { return Collections.emptyList(); } - return new ArrayList(Arrays.asList(URL.decode(content))); + return new ArrayList<>(Arrays.asList(URL.decode(content))); } @Override diff --git a/dubbo-monitor/dubbo-monitor-api/src/main/java/org/apache/dubbo/monitor/support/AbstractMonitorFactory.java b/dubbo-monitor/dubbo-monitor-api/src/main/java/org/apache/dubbo/monitor/support/AbstractMonitorFactory.java index 0e774cc018..cdd45552d7 100644 --- a/dubbo-monitor/dubbo-monitor-api/src/main/java/org/apache/dubbo/monitor/support/AbstractMonitorFactory.java +++ b/dubbo-monitor/dubbo-monitor-api/src/main/java/org/apache/dubbo/monitor/support/AbstractMonitorFactory.java @@ -53,9 +53,9 @@ public abstract class AbstractMonitorFactory implements MonitorFactory { /** * The monitor centers Map */ - private static final Map MONITORS = new ConcurrentHashMap(); + private static final Map MONITORS = new ConcurrentHashMap<>(); - private static final Map> FUTURES = new ConcurrentHashMap>(); + private static final Map> FUTURES = new ConcurrentHashMap<>(); /** * The monitor create executor diff --git a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/decoder/HttpCommandDecoder.java b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/decoder/HttpCommandDecoder.java index 77e7fa8928..2d0367ae6a 100644 --- a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/decoder/HttpCommandDecoder.java +++ b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/decoder/HttpCommandDecoder.java @@ -46,7 +46,7 @@ public class HttpCommandDecoder { commandContext = CommandContextFactory.newInstance(name); commandContext.setHttp(true); } else { - List valueList = new ArrayList(); + List valueList = new ArrayList<>(); for (List values : queryStringDecoder.parameters().values()) { valueList.addAll(values); @@ -56,7 +56,7 @@ public class HttpCommandDecoder { } } else if (request.method() == HttpMethod.POST) { HttpPostRequestDecoder httpPostRequestDecoder = new HttpPostRequestDecoder(request); - List valueList = new ArrayList(); + List valueList = new ArrayList<>(); for (InterfaceHttpData interfaceHttpData : httpPostRequestDecoder.getBodyHttpDatas()) { if (interfaceHttpData.getHttpDataType() == InterfaceHttpData.HttpDataType.Attribute) { Attribute attribute = (Attribute) interfaceHttpData; diff --git a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/impl/CountTelnet.java b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/impl/CountTelnet.java index 425f4706b3..e81c8a0c95 100644 --- a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/impl/CountTelnet.java +++ b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/impl/CountTelnet.java @@ -155,8 +155,8 @@ public class CountTelnet implements BaseCommand { private String count(Invoker invoker, String method) { URL url = invoker.getUrl(); - List> table = new ArrayList>(); - List header = new ArrayList(); + List> table = new ArrayList<>(); + List header = new ArrayList<>(); header.add("method"); header.add("total"); header.add("failed"); @@ -188,7 +188,7 @@ public class CountTelnet implements BaseCommand { } private List createRow(String methodName, RpcStatus count) { - List row = new ArrayList(); + List row = new ArrayList<>(); row.add(methodName); row.add(String.valueOf(count.getTotal())); row.add(String.valueOf(count.getFailed())); diff --git a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/util/CommandHelper.java b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/util/CommandHelper.java index faad6041de..0889eecf15 100644 --- a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/util/CommandHelper.java +++ b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/util/CommandHelper.java @@ -46,7 +46,7 @@ public class CommandHelper { public List> getAllCommandClass() { final Set commandList = frameworkModel.getExtensionLoader(BaseCommand.class).getSupportedExtensions(); - final List> classes = new ArrayList>(); + final List> classes = new ArrayList<>(); for (String commandName : commandList) { BaseCommand command = diff --git a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TLadder.java b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TLadder.java index f89996d0ef..66e8421c6f 100644 --- a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TLadder.java +++ b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TLadder.java @@ -35,7 +35,7 @@ public class TLadder implements TComponent { // indent length private static final int INDENT_STEP = 2; - private final List items = new LinkedList(); + private final List items = new LinkedList<>(); @Override public String rendering() { diff --git a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TTable.java b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TTable.java index f96e857184..326f1be16e 100644 --- a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TTable.java +++ b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TTable.java @@ -299,7 +299,7 @@ public class TTable implements TComponent { private final Align align; // data rows - private final List rows = new ArrayList(); + private final List rows = new ArrayList<>(); public ColumnDefine(int width, boolean isAutoResize, Align align) { this.width = width; diff --git a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TTree.java b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TTree.java index 6b599da45a..8c4d650682 100644 --- a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TTree.java +++ b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/textui/TTree.java @@ -181,7 +181,7 @@ public class TTree implements TComponent { /** * child nodes */ - final List children = new ArrayList(); + final List children = new ArrayList<>(); /** * begin timestamp diff --git a/dubbo-plugin/dubbo-reactive/src/main/java/org/apache/dubbo/reactive/calls/ReactorServerCalls.java b/dubbo-plugin/dubbo-reactive/src/main/java/org/apache/dubbo/reactive/calls/ReactorServerCalls.java index 33e529336e..58ec934c42 100644 --- a/dubbo-plugin/dubbo-reactive/src/main/java/org/apache/dubbo/reactive/calls/ReactorServerCalls.java +++ b/dubbo-plugin/dubbo-reactive/src/main/java/org/apache/dubbo/reactive/calls/ReactorServerCalls.java @@ -83,7 +83,7 @@ public final class ReactorServerCalls { public static StreamObserver manyToOne( StreamObserver responseObserver, Function, Mono> func) { ServerTripleReactorPublisher serverPublisher = - new ServerTripleReactorPublisher((CallStreamObserver) responseObserver); + new ServerTripleReactorPublisher<>((CallStreamObserver) responseObserver); try { Mono responseMono = func.apply(Flux.from(serverPublisher)); responseMono.subscribe( @@ -118,7 +118,7 @@ public final class ReactorServerCalls { StreamObserver responseObserver, Function, Flux> func) { // responseObserver is also a subscription of publisher, we can use it to request more data ServerTripleReactorPublisher serverPublisher = - new ServerTripleReactorPublisher((CallStreamObserver) responseObserver); + new ServerTripleReactorPublisher<>((CallStreamObserver) responseObserver); try { Flux responseFlux = func.apply(Flux.from(serverPublisher)); ServerTripleReactorSubscriber serverSubscriber = diff --git a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/InterfaceCompatibleRegistryProtocol.java b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/InterfaceCompatibleRegistryProtocol.java index ba3e936d16..8ee41924a2 100644 --- a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/InterfaceCompatibleRegistryProtocol.java +++ b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/InterfaceCompatibleRegistryProtocol.java @@ -75,6 +75,6 @@ public class InterfaceCompatibleRegistryProtocol extends RegistryProtocol { URL url, URL consumerUrl) { // ClusterInvoker invoker = getInvoker(cluster, registry, type, url); - return new MigrationInvoker(registryProtocol, cluster, registry, type, url, consumerUrl); + return new MigrationInvoker<>(registryProtocol, cluster, registry, type, url, consumerUrl); } } diff --git a/dubbo-registry/dubbo-registry-multicast/src/main/java/org/apache/dubbo/registry/multicast/MulticastRegistry.java b/dubbo-registry/dubbo-registry-multicast/src/main/java/org/apache/dubbo/registry/multicast/MulticastRegistry.java index c5e386bb99..6763543c7c 100644 --- a/dubbo-registry/dubbo-registry-multicast/src/main/java/org/apache/dubbo/registry/multicast/MulticastRegistry.java +++ b/dubbo-registry/dubbo-registry-multicast/src/main/java/org/apache/dubbo/registry/multicast/MulticastRegistry.java @@ -82,7 +82,7 @@ public class MulticastRegistry extends FailbackRegistry { private final int multicastPort; - private final ConcurrentMap> received = new ConcurrentHashMap>(); + private final ConcurrentMap> received = new ConcurrentHashMap<>(); private final ScheduledExecutorService cleanExecutor = Executors.newScheduledThreadPool(1, new NamedThreadFactory("DubboMulticastRegistryCleanTimer", true)); @@ -361,7 +361,7 @@ public class MulticastRegistry extends FailbackRegistry { } if (urls == null || urls.isEmpty()) { if (urls == null) { - urls = new ConcurrentHashSet(); + urls = new ConcurrentHashSet<>(); } URL empty = url.setProtocol(EMPTY_PROTOCOL); urls.add(empty); @@ -380,7 +380,7 @@ public class MulticastRegistry extends FailbackRegistry { } private List toList(Set urls) { - List list = new ArrayList(); + List list = new ArrayList<>(); if (CollectionUtils.isNotEmpty(urls)) { list.addAll(urls); } diff --git a/dubbo-registry/dubbo-registry-multiple/src/main/java/org/apache/dubbo/registry/multiple/MultipleRegistry.java b/dubbo-registry/dubbo-registry-multiple/src/main/java/org/apache/dubbo/registry/multiple/MultipleRegistry.java index 44a2e57126..4a7edf788b 100644 --- a/dubbo-registry/dubbo-registry-multiple/src/main/java/org/apache/dubbo/registry/multiple/MultipleRegistry.java +++ b/dubbo-registry/dubbo-registry-multiple/src/main/java/org/apache/dubbo/registry/multiple/MultipleRegistry.java @@ -268,7 +268,7 @@ public class MultipleRegistry extends AbstractRegistry { protected static class MultipleNotifyListenerWrapper implements NotifyListener { - Map registryMap = new ConcurrentHashMap(4); + Map registryMap = new ConcurrentHashMap<>(4); NotifyListener sourceNotifyListener; public MultipleNotifyListenerWrapper(NotifyListener sourceNotifyListener) { diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/ReplierDispatcher.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/ReplierDispatcher.java index 549593a888..979c49c2a5 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/ReplierDispatcher.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/ReplierDispatcher.java @@ -30,7 +30,7 @@ public class ReplierDispatcher implements Replier { private final Replier defaultReplier; - private final Map, Replier> repliers = new ConcurrentHashMap, Replier>(); + private final Map, Replier> repliers = new ConcurrentHashMap<>(); public ReplierDispatcher() { this(null, null); diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java index 340c50c724..2204076aba 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java @@ -161,7 +161,7 @@ public class HeaderExchangeServer implements ExchangeServer { @Override public Collection getExchangeChannels() { - Collection exchangeChannels = new ArrayList(); + Collection exchangeChannels = new ArrayList<>(); Collection channels = server.getChannels(); if (CollectionUtils.isNotEmpty(channels)) { for (Channel channel : channels) { diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/codec/TelnetCodec.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/codec/TelnetCodec.java index c106572e3f..3f1140b22c 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/codec/TelnetCodec.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/codec/TelnetCodec.java @@ -283,7 +283,7 @@ public class TelnetCodec extends TransportCodec { String result = toString(message, getCharset(channel)); if (result.trim().length() > 0) { if (history == null) { - history = new LinkedList(); + history = new LinkedList<>(); channel.setAttribute(HISTORY_LIST_KEY, history); } if (history.isEmpty()) { diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/HelpTelnetHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/HelpTelnetHandler.java index da5b727398..f33c61360b 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/HelpTelnetHandler.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/HelpTelnetHandler.java @@ -73,12 +73,12 @@ public class HelpTelnetHandler implements TelnetHandler { } private String generateForAllCommand(Channel channel) { - List> table = new ArrayList>(); + List> table = new ArrayList<>(); List handlers = extensionLoader.getActivateExtension(channel.getUrl(), "telnet"); if (CollectionUtils.isNotEmpty(handlers)) { for (TelnetHandler handler : handlers) { Help help = handler.getClass().getAnnotation(Help.class); - List row = new ArrayList(); + List row = new ArrayList<>(); String parameter = " " + extensionLoader.getExtensionName(handler) + " " + (help != null ? help.parameter().replace("\r\n", " ").replace("\n", " ") : ""); row.add(parameter.length() > 55 ? parameter.substring(0, 55) + "..." : parameter); diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/StatusTelnetHandler.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/StatusTelnetHandler.java index f65966321c..d111a87fc9 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/StatusTelnetHandler.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/telnet/support/command/StatusTelnetHandler.java @@ -53,8 +53,8 @@ public class StatusTelnetHandler implements TelnetHandler { if ("-l".equals(message)) { List checkers = extensionLoader.getActivateExtension(channel.getUrl(), STATUS_KEY); String[] header = new String[] {"resource", "status", "message"}; - List> table = new ArrayList>(); - Map statuses = new HashMap(); + List> table = new ArrayList<>(); + Map statuses = new HashMap<>(); if (CollectionUtils.isNotEmpty(checkers)) { for (StatusChecker checker : checkers) { String name = extensionLoader.getExtensionName(checker); @@ -66,7 +66,7 @@ public class StatusTelnetHandler implements TelnetHandler { } statuses.put(name, stat); if (stat.getLevel() != null && stat.getLevel() != Status.Level.UNKNOWN) { - List row = new ArrayList(); + List row = new ArrayList<>(); row.add(name); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage() == null ? "" : stat.getMessage()); @@ -75,7 +75,7 @@ public class StatusTelnetHandler implements TelnetHandler { } } Status stat = StatusUtils.getSummaryStatus(statuses); - List row = new ArrayList(); + List row = new ArrayList<>(); row.add("summary"); row.add(String.valueOf(stat.getLevel())); row.add(stat.getMessage()); @@ -85,7 +85,7 @@ public class StatusTelnetHandler implements TelnetHandler { return "Unsupported parameter " + message + " for status."; } String status = channel.getUrl().getParameter("status"); - Map statuses = new HashMap(); + Map statuses = new HashMap<>(); if (StringUtils.isNotEmpty(status)) { String[] ss = COMMA_SPLIT_PATTERN.split(status); for (String s : ss) { diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java index 8023274ac4..d3e24111a3 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/CodecSupport.java @@ -42,9 +42,9 @@ import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_FA public class CodecSupport { private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(CodecSupport.class); - private static Map ID_SERIALIZATION_MAP = new HashMap(); - private static Map ID_SERIALIZATIONNAME_MAP = new HashMap(); - private static Map SERIALIZATIONNAME_ID_MAP = new HashMap(); + private static Map ID_SERIALIZATION_MAP = new HashMap<>(); + private static Map ID_SERIALIZATIONNAME_MAP = new HashMap<>(); + private static Map SERIALIZATIONNAME_ID_MAP = new HashMap<>(); // Cache null object serialize results, for heartbeat request/response serialize use. private static ConcurrentMap ID_NULLBYTES_MAP = new ConcurrentHashMap<>(); diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/RequestTemplate.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/RequestTemplate.java index d02d63be29..5536e6c83e 100644 --- a/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/RequestTemplate.java +++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/RequestTemplate.java @@ -35,8 +35,8 @@ public class RequestTemplate implements Serializable { public static final String ENCODING_DEFLATE = "deflate"; private static final List EMPTY_ARRAYLIST = new ArrayList<>(); - private final Map> queries = new LinkedHashMap>(); - private final Map> headers = new LinkedHashMap>(); + private final Map> queries = new LinkedHashMap<>(); + private final Map> headers = new LinkedHashMap<>(); private String httpMethod; private String path; private String address; diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/DispatcherServlet.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/DispatcherServlet.java index ced2170b3b..0f2358cee0 100644 --- a/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/DispatcherServlet.java +++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/DispatcherServlet.java @@ -33,7 +33,7 @@ import java.util.concurrent.ConcurrentHashMap; public class DispatcherServlet extends HttpServlet { private static final long serialVersionUID = 5766349180380479888L; - private static final Map HANDLERS = new ConcurrentHashMap(); + private static final Map HANDLERS = new ConcurrentHashMap<>(); private static DispatcherServlet INSTANCE; public DispatcherServlet() { diff --git a/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/ServletManager.java b/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/ServletManager.java index a261b6e54c..dc71cd862d 100644 --- a/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/ServletManager.java +++ b/dubbo-remoting/dubbo-remoting-http/src/main/java/org/apache/dubbo/remoting/http/servlet/ServletManager.java @@ -30,7 +30,7 @@ public class ServletManager { private static final ServletManager INSTANCE = new ServletManager(); - private final Map contextMap = new ConcurrentHashMap(); + private final Map contextMap = new ConcurrentHashMap<>(); public static ServletManager getInstance() { return INSTANCE; diff --git a/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyChannel.java b/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyChannel.java index 695983a22f..95539ac9ac 100644 --- a/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyChannel.java +++ b/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyChannel.java @@ -43,11 +43,11 @@ final class NettyChannel extends AbstractChannel { private static final ErrorTypeAwareLogger logger = LoggerFactory.getErrorTypeAwareLogger(NettyChannel.class); private static final ConcurrentMap CHANNEL_MAP = - new ConcurrentHashMap(); + new ConcurrentHashMap<>(); private final org.jboss.netty.channel.Channel channel; - private final Map attributes = new ConcurrentHashMap(); + private final Map attributes = new ConcurrentHashMap<>(); private NettyChannel(org.jboss.netty.channel.Channel channel, URL url, ChannelHandler handler) { super(url, handler); diff --git a/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyHandler.java b/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyHandler.java index f1d4bfd23c..d864639dac 100644 --- a/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyHandler.java +++ b/dubbo-remoting/dubbo-remoting-netty/src/main/java/org/apache/dubbo/remoting/transport/netty/NettyHandler.java @@ -42,7 +42,7 @@ public class NettyHandler extends SimpleChannelHandler { private static final Logger logger = LoggerFactory.getLogger(NettyHandler.class); - private final Map channels = new ConcurrentHashMap(); // + private final Map channels = new ConcurrentHashMap<>(); // private final URL url; diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyChannel.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyChannel.java index 41b7bb5f4c..8041c72bd8 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyChannel.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyChannel.java @@ -61,14 +61,13 @@ final class NettyChannel extends AbstractChannel { /** * the cache for netty channel and dubbo channel */ - private static final ConcurrentMap CHANNEL_MAP = - new ConcurrentHashMap(); + private static final ConcurrentMap CHANNEL_MAP = new ConcurrentHashMap<>(); /** * netty channel */ private final Channel channel; - private final Map attributes = new ConcurrentHashMap(); + private final Map attributes = new ConcurrentHashMap<>(); private final AtomicBoolean active = new AtomicBoolean(false); diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcServiceContext.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcServiceContext.java index 5a8a640bd6..6bc36b75ae 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcServiceContext.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcServiceContext.java @@ -459,7 +459,7 @@ public class RpcServiceContext extends RpcContext { public RpcServiceContext setInvokers(List> invokers) { this.invokers = invokers; if (CollectionUtils.isNotEmpty(invokers)) { - List urls = new ArrayList(invokers.size()); + List urls = new ArrayList<>(invokers.size()); for (Invoker invoker : invokers) { urls.add(invoker.getUrl()); } diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java index 30de38825d..9b0769f545 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcStatus.java @@ -33,13 +33,12 @@ import java.util.concurrent.atomic.AtomicLong; */ public class RpcStatus { - private static final ConcurrentMap SERVICE_STATISTICS = - new ConcurrentHashMap(); + private static final ConcurrentMap SERVICE_STATISTICS = new ConcurrentHashMap<>(); private static final ConcurrentMap> METHOD_STATISTICS = - new ConcurrentHashMap>(); + new ConcurrentHashMap<>(); - private final ConcurrentMap values = new ConcurrentHashMap(); + private final ConcurrentMap values = new ConcurrentHashMap<>(); private final AtomicInteger active = new AtomicInteger(); private final AtomicLong total = new AtomicLong(); diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/DeprecatedFilter.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/DeprecatedFilter.java index 1cbabd45d0..e1b2c4966c 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/DeprecatedFilter.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/DeprecatedFilter.java @@ -44,7 +44,7 @@ public class DeprecatedFilter implements Filter { private static final ErrorTypeAwareLogger LOGGER = LoggerFactory.getErrorTypeAwareLogger(DeprecatedFilter.class); - private static final Set LOGGED = new ConcurrentHashSet(); + private static final Set LOGGED = new ConcurrentHashSet<>(); @Override public Result invoke(Invoker invoker, Invocation invocation) throws RpcException { diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/tps/DefaultTPSLimiter.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/tps/DefaultTPSLimiter.java index 0410d70c50..645345db3f 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/tps/DefaultTPSLimiter.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/filter/tps/DefaultTPSLimiter.java @@ -35,7 +35,7 @@ import static org.apache.dubbo.rpc.Constants.TPS_LIMIT_RATE_KEY; */ public class DefaultTPSLimiter implements TPSLimiter { - private final ConcurrentMap stats = new ConcurrentHashMap(); + private final ConcurrentMap stats = new ConcurrentHashMap<>(); @Override public boolean isAllowable(URL url, Invocation invocation) { diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractProxyProtocol.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractProxyProtocol.java index 843754a1dd..8bd9e41a36 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractProxyProtocol.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/AbstractProxyProtocol.java @@ -50,7 +50,7 @@ import static org.apache.dubbo.common.constants.LoggerCodeConstants.PROTOCOL_UNS */ public abstract class AbstractProxyProtocol extends AbstractProtocol { - private final List> rpcExceptions = new CopyOnWriteArrayList>(); + private final List> rpcExceptions = new CopyOnWriteArrayList<>(); protected ProxyFactory proxyFactory; diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/ProtocolListenerWrapper.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/ProtocolListenerWrapper.java index 421e1148e7..52ca299bb8 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/ProtocolListenerWrapper.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/protocol/ProtocolListenerWrapper.java @@ -74,8 +74,7 @@ public class ProtocolListenerWrapper implements Protocol { .getBeanFactory() .getBean(InjvmExporterListener.class)); } - return new ListenerExporterWrapper( - protocol.export(invoker), Collections.unmodifiableList(exporterListeners)); + return new ListenerExporterWrapper<>(protocol.export(invoker), Collections.unmodifiableList(exporterListeners)); } @Override diff --git a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/MockInvoker.java b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/MockInvoker.java index 9e798e51df..4f35a9cb31 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/MockInvoker.java +++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/support/MockInvoker.java @@ -47,8 +47,8 @@ import static org.apache.dubbo.rpc.Constants.THROW_PREFIX; public final class MockInvoker implements Invoker { private final ProxyFactory proxyFactory; - private static final Map> MOCK_MAP = new ConcurrentHashMap>(); - private static final Map THROWABLE_MAP = new ConcurrentHashMap(); + private static final Map> MOCK_MAP = new ConcurrentHashMap<>(); + private static final Map THROWABLE_MAP = new ConcurrentHashMap<>(); private final URL url; private final Class type; diff --git a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java index a8bd3c0c02..4a919adf25 100644 --- a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java +++ b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/DubboProtocol.java @@ -339,7 +339,7 @@ public class DubboProtocol extends AbstractProtocol { // export service. String key = serviceKey(url); - DubboExporter exporter = new DubboExporter(invoker, key, exporterMap); + DubboExporter exporter = new DubboExporter<>(invoker, key, exporterMap); // export a stub service for dispatching event boolean isStubSupportEvent = url.getParameter(STUB_EVENT_KEY, DEFAULT_STUB_EVENT); @@ -443,7 +443,7 @@ public class DubboProtocol extends AbstractProtocol { optimizeSerialization(url); // create rpc invoker. - DubboInvoker invoker = new DubboInvoker(serviceType, url, getClients(url), invokers); + DubboInvoker invoker = new DubboInvoker<>(serviceType, url, getClients(url), invokers); invokers.add(invoker); return invoker; diff --git a/dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmProtocol.java b/dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmProtocol.java index c4955e7ce7..b335784709 100644 --- a/dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmProtocol.java +++ b/dubbo-rpc/dubbo-rpc-injvm/src/main/java/org/apache/dubbo/rpc/protocol/injvm/InjvmProtocol.java @@ -75,12 +75,12 @@ public class InjvmProtocol extends AbstractProtocol { @Override public Exporter export(Invoker invoker) throws RpcException { - return new InjvmExporter(invoker, invoker.getUrl().getServiceKey(), exporterMap); + return new InjvmExporter<>(invoker, invoker.getUrl().getServiceKey(), exporterMap); } @Override public Invoker protocolBindingRefer(Class serviceType, URL url) throws RpcException { - return new InjvmInvoker(serviceType, url, url.getServiceKey(), exporterMap); + return new InjvmInvoker<>(serviceType, url, url.getServiceKey(), exporterMap); } public boolean isInjvmRefer(URL url) { diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestProtocol.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestProtocol.java index 2311928019..16d30ba264 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestProtocol.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestProtocol.java @@ -134,7 +134,7 @@ public class RestProtocol extends AbstractProtocol { MetadataResolver.resolveConsumerServiceMetadata(type, url, contextPathFromUrl); Invoker invoker = - new RestInvoker(type, url, refClient, httpConnectionPreBuildIntercepts, serviceRestMetadata); + new RestInvoker<>(type, url, refClient, httpConnectionPreBuildIntercepts, serviceRestMetadata); invokers.add(invoker); return invoker; diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/ViolationReport.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/ViolationReport.java index 0a87d6d8f3..fcf7faf5f5 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/ViolationReport.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/ViolationReport.java @@ -42,7 +42,7 @@ public class ViolationReport implements Serializable { public void addConstraintViolation(RestConstraintViolation constraintViolation) { if (constraintViolations == null) { - constraintViolations = new LinkedList(); + constraintViolations = new LinkedList<>(); } constraintViolations.add(constraintViolation); } diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/DubboPreMatchContainerRequestContext.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/DubboPreMatchContainerRequestContext.java index 4964f1792d..6350eaaf15 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/DubboPreMatchContainerRequestContext.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/extension/resteasy/filter/DubboPreMatchContainerRequestContext.java @@ -82,7 +82,7 @@ public class DubboPreMatchContainerRequestContext implements SuspendableContaine @Override public Collection getPropertyNames() { - ArrayList names = new ArrayList(); + ArrayList names = new ArrayList<>(); Enumeration enames = httpRequest.getAttributeNames(); while (enames.hasMoreElements()) { names.add(enames.nextElement()); diff --git a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/util/ReflectUtils.java b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/util/ReflectUtils.java index 627ad1c195..deacffa63a 100644 --- a/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/util/ReflectUtils.java +++ b/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/util/ReflectUtils.java @@ -115,7 +115,7 @@ public class ReflectUtils { } catch (Exception e) { } - return new ArrayList>(methods); + return new ArrayList<>(methods); } private static void filterConstructMethod(Set> methods, Constructor[] declaredMethods) { diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TriHttp2RemoteFlowController.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TriHttp2RemoteFlowController.java index b29439fe3e..aa5339317d 100644 --- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TriHttp2RemoteFlowController.java +++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/TriHttp2RemoteFlowController.java @@ -306,7 +306,7 @@ public class TriHttp2RemoteFlowController implements Http2RemoteFlowController { FlowState(Http2Stream stream) { this.stream = stream; - pendingWriteQueue = new ArrayDeque(2); + pendingWriteQueue = new ArrayDeque<>(2); } /** diff --git a/dubbo-test/dubbo-test-common/src/main/java/org/apache/dubbo/test/common/SysProps.java b/dubbo-test/dubbo-test-common/src/main/java/org/apache/dubbo/test/common/SysProps.java index dcfafc37f8..6c9f5c1001 100644 --- a/dubbo-test/dubbo-test-common/src/main/java/org/apache/dubbo/test/common/SysProps.java +++ b/dubbo-test/dubbo-test-common/src/main/java/org/apache/dubbo/test/common/SysProps.java @@ -24,7 +24,7 @@ import java.util.Map; */ public class SysProps { - private static Map map = new LinkedHashMap(); + private static Map map = new LinkedHashMap<>(); public static void reset() { map.clear(); From ec443043e2da83d946943baabf7f122f9efc0dcc Mon Sep 17 00:00:00 2001 From: icodening Date: Mon, 1 Apr 2024 11:03:29 +0800 Subject: [PATCH 10/23] fix triple stub calling grpc server fail (#14012) --- .../src/main/java/org/apache/dubbo/config/ReferenceConfig.java | 1 + 1 file changed, 1 insertion(+) diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java index fe9f2cdacc..aecd3223fa 100644 --- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java +++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ReferenceConfig.java @@ -346,6 +346,7 @@ public class ReferenceConfig extends ReferenceConfigBase { if (CommonConstants.NATIVE_STUB.equals(getProxy())) { serviceDescriptor = StubSuppliers.getServiceDescriptor(interfaceName); repository.registerService(serviceDescriptor); + setInterface(serviceDescriptor.getInterfaceName()); } else { serviceDescriptor = repository.registerService(interfaceClass); } From b44ca6b51f6bdac1092b63470a6bb90bdce40414 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:44:13 +0800 Subject: [PATCH 11/23] Bump net.bytebuddy:byte-buddy from 1.14.12 to 1.14.13 (#14018) Bumps [net.bytebuddy:byte-buddy](https://github.com/raphw/byte-buddy) from 1.14.12 to 1.14.13. - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.12...byte-buddy-1.14.13) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index f234cf40c6..30c3be7734 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -93,7 +93,7 @@ 5.3.25 5.8.11 3.30.2-GA - 1.14.12 + 1.14.13 3.2.10.Final 4.1.108.Final 4.5.14 From b472712f052ffe8a414065eb96348811ffb8c784 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 16:44:35 +0800 Subject: [PATCH 12/23] Bump org.apache.tomcat.embed:tomcat-embed-core from 8.5.99 to 8.5.100 (#14019) Bumps org.apache.tomcat.embed:tomcat-embed-core from 8.5.99 to 8.5.100. --- updated-dependencies: - dependency-name: org.apache.tomcat.embed:tomcat-embed-core dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 30c3be7734..81791a9b33 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -132,7 +132,7 @@ 2.1.1 3.15.6.Final 1.9.13 - 8.5.99 + 8.5.100 2.3.1 1.62.2 0.8.1 From 40280a2c2968376e9b1e5bab89a597f01fb3de7f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:39:43 +0800 Subject: [PATCH 13/23] Bump commons-io:commons-io from 2.15.1 to 2.16.0 (#14020) Bumps commons-io:commons-io from 2.15.1 to 2.16.0. --- updated-dependencies: - dependency-name: commons-io:commons-io dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- dubbo-maven-plugin/pom.xml | 2 +- dubbo-native-plugin/pom.xml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 81791a9b33..12c898a9de 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -144,7 +144,7 @@ 1.2.13 2.23.1 - 2.15.1 + 2.16.0 0.13.0 diff --git a/dubbo-maven-plugin/pom.xml b/dubbo-maven-plugin/pom.xml index 78c3b37e22..29d8d47a8e 100644 --- a/dubbo-maven-plugin/pom.xml +++ b/dubbo-maven-plugin/pom.xml @@ -65,7 +65,7 @@ commons-io commons-io - 2.15.1 + 2.16.0 diff --git a/dubbo-native-plugin/pom.xml b/dubbo-native-plugin/pom.xml index a3b847c1da..fb5ea39793 100644 --- a/dubbo-native-plugin/pom.xml +++ b/dubbo-native-plugin/pom.xml @@ -61,7 +61,7 @@ commons-io commons-io - 2.15.1 + 2.16.0 org.apache.dubbo From f03823eec1610ab40fa894e279614703617ab29b Mon Sep 17 00:00:00 2001 From: hanpen24 <150456356+hanpen24@users.noreply.github.com> Date: Sun, 7 Apr 2024 11:31:23 +0900 Subject: [PATCH 14/23] Use ExecutorService instead of event loop for Netty connection (#13904) * Use ExecutorService instead of event loop for Netty connection This change addresses the issue of the event loop being blocked for an extended period, improving overall performance and responsiveness. * fix log getConnectAddress * applay format * applay format * applay format * applay format * applay format * Use an independent ExecutorService * Use ScheduledExecutorService for scheduling tasks * delete unnecessary files * Modify to stop ExecutorService using shutdownNow * Modify to use ScheduledExecutor managed by FrameworkExecutorRepository * Synchronize reconnectDuration with HeaderExchangeClient's reconnectDuration * get framework model directly use awaitility --- .../remoting/transport/AbstractClient.java | 42 +++++++++++++++++++ .../netty4/NettyConnectionClient.java | 21 +++++++--- .../transport/netty4/ConnectionTest.java | 3 ++ 3 files changed, 61 insertions(+), 5 deletions(-) diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractClient.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractClient.java index 7b465c6649..7be50fff2e 100644 --- a/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractClient.java +++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/transport/AbstractClient.java @@ -21,6 +21,7 @@ import org.apache.dubbo.common.Version; import org.apache.dubbo.common.logger.ErrorTypeAwareLogger; import org.apache.dubbo.common.logger.LoggerFactory; import org.apache.dubbo.common.threadpool.manager.ExecutorRepository; +import org.apache.dubbo.common.threadpool.manager.FrameworkExecutorRepository; import org.apache.dubbo.common.utils.NetUtils; import org.apache.dubbo.remoting.Channel; import org.apache.dubbo.remoting.ChannelHandler; @@ -28,9 +29,11 @@ import org.apache.dubbo.remoting.Client; import org.apache.dubbo.remoting.Constants; import org.apache.dubbo.remoting.RemotingException; import org.apache.dubbo.remoting.transport.dispatcher.ChannelHandlers; +import org.apache.dubbo.rpc.model.FrameworkModel; import java.net.InetSocketAddress; import java.util.concurrent.ExecutorService; +import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; @@ -41,6 +44,11 @@ import static org.apache.dubbo.common.constants.CommonConstants.THREAD_NAME_KEY; import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_FAILED_CLOSE; import static org.apache.dubbo.common.constants.LoggerCodeConstants.TRANSPORT_FAILED_CONNECT_PROVIDER; import static org.apache.dubbo.config.Constants.CLIENT_THREAD_POOL_NAME; +import static org.apache.dubbo.remoting.Constants.HEARTBEAT_CHECK_TICK; +import static org.apache.dubbo.remoting.Constants.LEAST_HEARTBEAT_DURATION; +import static org.apache.dubbo.remoting.Constants.LEAST_RECONNECT_DURATION; +import static org.apache.dubbo.remoting.Constants.LEAST_RECONNECT_DURATION_KEY; +import static org.apache.dubbo.remoting.utils.UrlUtils.getIdleTimeout; /** * AbstractClient @@ -55,13 +63,23 @@ public abstract class AbstractClient extends AbstractEndpoint implements Client protected volatile ExecutorService executor; + protected volatile ScheduledExecutorService connectivityExecutor; + + private FrameworkModel frameworkModel; + + protected long reconnectDuaration; + public AbstractClient(URL url, ChannelHandler handler) throws RemotingException { super(url, handler); // set default needReconnect true when channel is not connected needReconnect = url.getParameter(Constants.SEND_RECONNECT_KEY, true); + frameworkModel = url.getOrDefaultFrameworkModel(); + initExecutor(url); + reconnectDuaration = getReconnectDuration(url); + try { doOpen(); } catch (Throwable t) { @@ -134,6 +152,11 @@ public abstract class AbstractClient extends AbstractEndpoint implements Client url = url.addParameter(THREAD_NAME_KEY, CLIENT_THREAD_POOL_NAME) .addParameterIfAbsent(THREADPOOL_KEY, DEFAULT_CLIENT_THREADPOOL); executor = executorRepository.createExecutorIfAbsent(url); + + connectivityExecutor = frameworkModel + .getBeanFactory() + .getBean(FrameworkExecutorRepository.class) + .getConnectivityScheduledExecutor(); } protected static ChannelHandler wrapChannelHandler(URL url, ChannelHandler handler) { @@ -296,6 +319,25 @@ public abstract class AbstractClient extends AbstractEndpoint implements Client } } + private long getReconnectDuration(URL url) { + int idleTimeout = getIdleTimeout(url); + long heartbeatTimeoutTick = calculateLeastDuration(idleTimeout); + return calculateReconnectDuration(url, heartbeatTimeoutTick); + } + + private long calculateLeastDuration(int time) { + if (time / HEARTBEAT_CHECK_TICK <= 0) { + return LEAST_HEARTBEAT_DURATION; + } else { + return time / HEARTBEAT_CHECK_TICK; + } + } + + private long calculateReconnectDuration(URL url, long tick) { + long leastReconnectDuration = url.getParameter(LEAST_RECONNECT_DURATION_KEY, LEAST_RECONNECT_DURATION); + return Math.max(leastReconnectDuration, tick); + } + @Override public void reconnect() throws RemotingException { connectLock.lock(); diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyConnectionClient.java b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyConnectionClient.java index ab8f39bcf7..85cd565173 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyConnectionClient.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/main/java/org/apache/dubbo/remoting/transport/netty4/NettyConnectionClient.java @@ -43,7 +43,6 @@ import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelInitializer; import io.netty.channel.ChannelOption; import io.netty.channel.ChannelPipeline; -import io.netty.channel.EventLoop; import io.netty.channel.socket.SocketChannel; import io.netty.handler.ssl.SslContext; import io.netty.handler.timeout.IdleStateHandler; @@ -75,6 +74,8 @@ public class NettyConnectionClient extends AbstractConnectionClient { public static final AttributeKey CONNECTION = AttributeKey.valueOf("connection"); + private AtomicBoolean isReconnecting; + public NettyConnectionClient(URL url, ChannelHandler handler) throws RemotingException { super(url, handler); } @@ -91,6 +92,7 @@ public class NettyConnectionClient extends AbstractConnectionClient { this.closePromise = new DefaultPromise<>(GlobalEventExecutor.INSTANCE); this.init = new AtomicBoolean(false); this.increase(); + this.isReconnecting = new AtomicBoolean(false); } @Override @@ -158,6 +160,10 @@ public class NettyConnectionClient extends AbstractConnectionClient { @Override protected void doConnect() throws RemotingException { + if (!isReconnecting.compareAndSet(false, true)) { + return; + } + if (isClosed()) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( @@ -347,6 +353,11 @@ public class NettyConnectionClient extends AbstractConnectionClient { @Override public void operationComplete(ChannelFuture future) { + + if (!isReconnecting.compareAndSet(true, false)) { + return; + } + if (future.isSuccess()) { return; } @@ -364,8 +375,8 @@ public class NettyConnectionClient extends AbstractConnectionClient { "%s is reconnecting, attempt=%d cause=%s", connectionClient, 0, future.cause().getMessage())); } - final EventLoop loop = future.channel().eventLoop(); - loop.schedule( + + connectivityExecutor.schedule( () -> { try { connectionClient.doConnect(); @@ -377,8 +388,8 @@ public class NettyConnectionClient extends AbstractConnectionClient { "Failed to connect to server: " + getConnectAddress()); } }, - 1L, - TimeUnit.SECONDS); + reconnectDuaration, + TimeUnit.MILLISECONDS); } } } diff --git a/dubbo-remoting/dubbo-remoting-netty4/src/test/java/org/apache/dubbo/remoting/transport/netty4/ConnectionTest.java b/dubbo-remoting/dubbo-remoting-netty4/src/test/java/org/apache/dubbo/remoting/transport/netty4/ConnectionTest.java index 37b4439bba..c90418fa4d 100644 --- a/dubbo-remoting/dubbo-remoting-netty4/src/test/java/org/apache/dubbo/remoting/transport/netty4/ConnectionTest.java +++ b/dubbo-remoting/dubbo-remoting-netty4/src/test/java/org/apache/dubbo/remoting/transport/netty4/ConnectionTest.java @@ -28,6 +28,7 @@ import org.apache.dubbo.remoting.api.pu.DefaultPuHandler; import org.apache.dubbo.rpc.model.ApplicationModel; import org.apache.dubbo.rpc.model.ModuleModel; +import java.time.Duration; import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -39,6 +40,7 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import static org.apache.dubbo.common.constants.CommonConstants.EXECUTOR_MANAGEMENT_MODE_DEFAULT; +import static org.awaitility.Awaitility.await; public class ConnectionTest { @@ -138,6 +140,7 @@ public class ConnectionTest { nettyPortUnificationServer.bind(); // auto reconnect + await().atMost(Duration.ofSeconds(100)).until(() -> connectionClient.isAvailable()); Assertions.assertTrue(connectionClient.isAvailable()); connectionClient.close(); From 95439fb23ce9855197843e5f2ee02c4713f09846 Mon Sep 17 00:00:00 2001 From: caoyanan666 <55247691+caoyanan666@users.noreply.github.com> Date: Sun, 7 Apr 2024 14:56:35 +0800 Subject: [PATCH 15/23] fix(3.2): triple AbstractServerCallListener NPE (#14009) * fix NPE * Optimize the handling of exceptions in response --------- Co-authored-by: caoyanan --- .../rpc/protocol/tri/call/AbstractServerCallListener.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java index 7fa838d8d7..879cf44e10 100644 --- a/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java +++ b/dubbo-rpc/dubbo-rpc-triple/src/main/java/org/apache/dubbo/rpc/protocol/tri/call/AbstractServerCallListener.java @@ -62,14 +62,18 @@ public abstract class AbstractServerCallListener implements AbstractServerCall.L final long stInMillis = System.currentTimeMillis(); try { final Result response = invoker.invoke(invocation); + if (response.hasException()) { + doOnResponseHasException(response.getException()); + return; + } response.whenCompleteWithContext((r, t) -> { responseObserver.setResponseAttachments(response.getObjectAttachments()); if (t != null) { responseObserver.onError(t); return; } - if (response.hasException()) { - doOnResponseHasException(response.getException()); + if (r.hasException()) { + doOnResponseHasException(r.getException()); return; } final long cost = System.currentTimeMillis() - stInMillis; From 3e4fda20bba18f0a85340c86ae8ccbb004c7ea84 Mon Sep 17 00:00:00 2001 From: heliang666s <147408835+heliang666s@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:34:36 +0800 Subject: [PATCH 16/23] Update the comment content in pom.xml to be consistent (#14039) --- .../dubbo-configcenter-nacos/pom.xml | 28 ++++++++--------- .../dubbo-demo-annotation-consumer/pom.xml | 30 +++++++++---------- dubbo-demo/dubbo-demo-annotation/pom.xml | 30 +++++++++---------- .../dubbo-demo-api-consumer/pom.xml | 30 +++++++++---------- dubbo-demo/dubbo-demo-api/pom.xml | 30 +++++++++---------- dubbo-demo/dubbo-demo-generic-call/pom.xml | 30 +++++++++---------- dubbo-demo/dubbo-demo-triple/pom.xml | 30 +++++++++---------- .../pom.xml | 28 ++++++++--------- .../dubbo-dependencies-zookeeper/pom.xml | 28 ++++++++--------- .../dubbo-metadata-processor/pom.xml | 28 ++++++++--------- .../dubbo-metadata-report-nacos/pom.xml | 28 ++++++++--------- .../dubbo-nacos-spring-boot-starter/pom.xml | 28 ++++++++--------- .../pom.xml | 28 ++++++++--------- .../pom.xml | 28 ++++++++--------- .../dubbo-spring-boot-starters/pom.xml | 28 ++++++++--------- 15 files changed, 210 insertions(+), 222 deletions(-) diff --git a/dubbo-configcenter/dubbo-configcenter-nacos/pom.xml b/dubbo-configcenter/dubbo-configcenter-nacos/pom.xml index e3cce7faf9..9af3a3a7fa 100644 --- a/dubbo-configcenter/dubbo-configcenter-nacos/pom.xml +++ b/dubbo-configcenter/dubbo-configcenter-nacos/pom.xml @@ -1,19 +1,19 @@ 4.0.0 diff --git a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/pom.xml b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/pom.xml index d8e0fe734d..23df7f130e 100644 --- a/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-annotation/dubbo-demo-annotation-consumer/pom.xml @@ -1,21 +1,19 @@ 4.0.0 diff --git a/dubbo-demo/dubbo-demo-annotation/pom.xml b/dubbo-demo/dubbo-demo-annotation/pom.xml index d881d55fdc..8e82740451 100644 --- a/dubbo-demo/dubbo-demo-annotation/pom.xml +++ b/dubbo-demo/dubbo-demo-annotation/pom.xml @@ -1,21 +1,19 @@ 4.0.0 diff --git a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/pom.xml b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/pom.xml index 41b30699d5..639b17b93a 100644 --- a/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/pom.xml +++ b/dubbo-demo/dubbo-demo-api/dubbo-demo-api-consumer/pom.xml @@ -1,21 +1,19 @@ 4.0.0 diff --git a/dubbo-demo/dubbo-demo-api/pom.xml b/dubbo-demo/dubbo-demo-api/pom.xml index deaf2b0dbd..33ed7504db 100644 --- a/dubbo-demo/dubbo-demo-api/pom.xml +++ b/dubbo-demo/dubbo-demo-api/pom.xml @@ -1,21 +1,19 @@ 4.0.0 diff --git a/dubbo-demo/dubbo-demo-generic-call/pom.xml b/dubbo-demo/dubbo-demo-generic-call/pom.xml index 53925c9f36..c1523f2fe7 100644 --- a/dubbo-demo/dubbo-demo-generic-call/pom.xml +++ b/dubbo-demo/dubbo-demo-generic-call/pom.xml @@ -1,21 +1,19 @@ 4.0.0 diff --git a/dubbo-demo/dubbo-demo-triple/pom.xml b/dubbo-demo/dubbo-demo-triple/pom.xml index 44f26c6add..4336d2ca38 100644 --- a/dubbo-demo/dubbo-demo-triple/pom.xml +++ b/dubbo-demo/dubbo-demo-triple/pom.xml @@ -1,21 +1,19 @@ 4.0.0 diff --git a/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml b/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml index 99b0c92b14..886395eae0 100644 --- a/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml +++ b/dubbo-dependencies/dubbo-dependencies-zookeeper-curator5/pom.xml @@ -1,19 +1,19 @@ 4.0.0 diff --git a/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml b/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml index a3b19fc261..b48bcd0af1 100644 --- a/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml +++ b/dubbo-dependencies/dubbo-dependencies-zookeeper/pom.xml @@ -1,19 +1,19 @@ 4.0.0 diff --git a/dubbo-metadata/dubbo-metadata-processor/pom.xml b/dubbo-metadata/dubbo-metadata-processor/pom.xml index f42ccb5580..826ecefd1f 100644 --- a/dubbo-metadata/dubbo-metadata-processor/pom.xml +++ b/dubbo-metadata/dubbo-metadata-processor/pom.xml @@ -1,19 +1,19 @@ 4.0.0 diff --git a/dubbo-metadata/dubbo-metadata-report-nacos/pom.xml b/dubbo-metadata/dubbo-metadata-report-nacos/pom.xml index 9b716b33ad..11e7913a39 100644 --- a/dubbo-metadata/dubbo-metadata-report-nacos/pom.xml +++ b/dubbo-metadata/dubbo-metadata-report-nacos/pom.xml @@ -1,19 +1,19 @@ 4.0.0 diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-nacos-spring-boot-starter/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-nacos-spring-boot-starter/pom.xml index 49ea3b67be..563a89ee08 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-nacos-spring-boot-starter/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-nacos-spring-boot-starter/pom.xml @@ -1,19 +1,19 @@ 4.0.0 diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-curator5-spring-boot-starter/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-curator5-spring-boot-starter/pom.xml index 3ce640cd72..ca94a4d9b2 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-curator5-spring-boot-starter/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-curator5-spring-boot-starter/pom.xml @@ -1,19 +1,19 @@ 4.0.0 diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-spring-boot-starter/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-spring-boot-starter/pom.xml index ed854501a7..f2896c7284 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-spring-boot-starter/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-starters/dubbo-zookeeper-spring-boot-starter/pom.xml @@ -1,19 +1,19 @@ 4.0.0 diff --git a/dubbo-spring-boot/dubbo-spring-boot-starters/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-starters/pom.xml index 1d921ebd86..f932b8c275 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-starters/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-starters/pom.xml @@ -1,19 +1,19 @@ 4.0.0 From cf0529f7aee496314465c8f0da178841e1ba7e75 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:35:00 +0800 Subject: [PATCH 17/23] Bump grpc.version from 1.62.2 to 1.63.0 (#14044) Bumps `grpc.version` from 1.62.2 to 1.63.0. Updates `io.grpc:grpc-core` from 1.62.2 to 1.63.0 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0) Updates `io.grpc:grpc-stub` from 1.62.2 to 1.63.0 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0) Updates `io.grpc:grpc-protobuf` from 1.62.2 to 1.63.0 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0) Updates `io.grpc:grpc-context` from 1.62.2 to 1.63.0 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0) Updates `io.grpc:grpc-netty-shaded` from 1.62.2 to 1.63.0 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0) Updates `io.grpc:grpc-netty` from 1.62.2 to 1.63.0 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0) Updates `io.grpc:grpc-grpclb` from 1.62.2 to 1.63.0 - [Release notes](https://github.com/grpc/grpc-java/releases) - [Commits](https://github.com/grpc/grpc-java/compare/v1.62.2...v1.63.0) --- updated-dependencies: - dependency-name: io.grpc:grpc-core dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.grpc:grpc-stub dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.grpc:grpc-protobuf dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.grpc:grpc-context dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.grpc:grpc-netty-shaded dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.grpc:grpc-netty dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: io.grpc:grpc-grpclb dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 12c898a9de..c17d0d44bc 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -134,7 +134,7 @@ 1.9.13 8.5.100 2.3.1 - 1.62.2 + 1.63.0 0.8.1 1.2.2 From 1689109725aa4ac015900856efe0ce858325b8c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:35:19 +0800 Subject: [PATCH 18/23] Bump spring_version from 5.3.25 to 5.3.33 (#14041) Bumps `spring_version` from 5.3.25 to 5.3.33. Updates `org.springframework:spring-test` from 5.3.25 to 5.3.33 - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v5.3.25...v5.3.33) Updates `org.springframework:spring-framework-bom` from 3.2.18.RELEASE to 5.3.33 - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v3.2.18.RELEASE...v5.3.33) --- updated-dependencies: - dependency-name: org.springframework:spring-test dependency-type: direct:production update-type: version-update:semver-patch - dependency-name: org.springframework:spring-framework-bom dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- dubbo-test/dubbo-test-spring/pom.xml | 2 +- dubbo-test/dubbo-test-spring3.2/pom.xml | 2 +- dubbo-test/dubbo-test-spring4.1/pom.xml | 2 +- dubbo-test/dubbo-test-spring4.2/pom.xml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index c17d0d44bc..3b475cf4b3 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -90,7 +90,7 @@ - 5.3.25 + 5.3.33 5.8.11 3.30.2-GA 1.14.13 diff --git a/dubbo-test/dubbo-test-spring/pom.xml b/dubbo-test/dubbo-test-spring/pom.xml index 6a4eb4744f..369efb800e 100644 --- a/dubbo-test/dubbo-test-spring/pom.xml +++ b/dubbo-test/dubbo-test-spring/pom.xml @@ -29,7 +29,7 @@ true 1.7.33 - 3.2.18.RELEASE + 5.3.33 diff --git a/dubbo-test/dubbo-test-spring3.2/pom.xml b/dubbo-test/dubbo-test-spring3.2/pom.xml index ca027c3d49..788dd28e9d 100644 --- a/dubbo-test/dubbo-test-spring3.2/pom.xml +++ b/dubbo-test/dubbo-test-spring3.2/pom.xml @@ -28,7 +28,7 @@ true - 3.2.18.RELEASE + 5.3.33 diff --git a/dubbo-test/dubbo-test-spring4.1/pom.xml b/dubbo-test/dubbo-test-spring4.1/pom.xml index f7a82c8ec3..34dfd41eef 100644 --- a/dubbo-test/dubbo-test-spring4.1/pom.xml +++ b/dubbo-test/dubbo-test-spring4.1/pom.xml @@ -28,7 +28,7 @@ true - 4.1.9.RELEASE + 5.3.33 diff --git a/dubbo-test/dubbo-test-spring4.2/pom.xml b/dubbo-test/dubbo-test-spring4.2/pom.xml index 7c9aa64023..6a55ebfe85 100644 --- a/dubbo-test/dubbo-test-spring4.2/pom.xml +++ b/dubbo-test/dubbo-test-spring4.2/pom.xml @@ -28,7 +28,7 @@ true - 4.2.4.RELEASE + 5.3.33 From 029650668f3696016853cc5e7ff5fd38c79365f2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:35:28 +0800 Subject: [PATCH 19/23] Bump bytebuddy.version from 1.14.12 to 1.14.13 (#14046) Bumps `bytebuddy.version` from 1.14.12 to 1.14.13. Updates `net.bytebuddy:byte-buddy` from 1.14.12 to 1.14.13 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.12...byte-buddy-1.14.13) Updates `net.bytebuddy:byte-buddy-agent` from 1.14.12 to 1.14.13 - [Release notes](https://github.com/raphw/byte-buddy/releases) - [Changelog](https://github.com/raphw/byte-buddy/blob/master/release-notes.md) - [Commits](https://github.com/raphw/byte-buddy/compare/byte-buddy-1.14.12...byte-buddy-1.14.13) --- updated-dependencies: - dependency-name: net.bytebuddy:byte-buddy dependency-type: direct:development update-type: version-update:semver-patch - dependency-name: net.bytebuddy:byte-buddy-agent dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-spring-boot/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-spring-boot/pom.xml b/dubbo-spring-boot/pom.xml index eb08c5fa8c..2276261aa4 100644 --- a/dubbo-spring-boot/pom.xml +++ b/dubbo-spring-boot/pom.xml @@ -43,7 +43,7 @@ 2.23.1 - 1.14.12 + 1.14.13 From 3608f384c27e19dab19232835ad09de5a845bf6e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:35:36 +0800 Subject: [PATCH 20/23] Bump org.apache.maven.plugin-tools:maven-plugin-annotations (#14048) Bumps [org.apache.maven.plugin-tools:maven-plugin-annotations](https://github.com/apache/maven-plugin-tools) from 3.11.0 to 3.12.0. - [Release notes](https://github.com/apache/maven-plugin-tools/releases) - [Commits](https://github.com/apache/maven-plugin-tools/compare/maven-plugin-tools-3.11.0...maven-plugin-tools-3.12.0) --- updated-dependencies: - dependency-name: org.apache.maven.plugin-tools:maven-plugin-annotations dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-maven-plugin/pom.xml | 2 +- dubbo-native-plugin/pom.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dubbo-maven-plugin/pom.xml b/dubbo-maven-plugin/pom.xml index 29d8d47a8e..e0ca5b99f4 100644 --- a/dubbo-maven-plugin/pom.xml +++ b/dubbo-maven-plugin/pom.xml @@ -46,7 +46,7 @@ org.apache.maven.plugin-tools maven-plugin-annotations - 3.11.0 + 3.12.0 provided diff --git a/dubbo-native-plugin/pom.xml b/dubbo-native-plugin/pom.xml index fb5ea39793..3685489fec 100644 --- a/dubbo-native-plugin/pom.xml +++ b/dubbo-native-plugin/pom.xml @@ -48,7 +48,7 @@ org.apache.maven.plugin-tools maven-plugin-annotations - 3.11.0 + 3.12.0 provided From f987d50047cdaf2f6ee381ee7d4e55216fcc9547 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:35:45 +0800 Subject: [PATCH 21/23] Bump org.jacoco:jacoco-maven-plugin from 0.8.11 to 0.8.12 (#14047) Bumps [org.jacoco:jacoco-maven-plugin](https://github.com/jacoco/jacoco) from 0.8.11 to 0.8.12. - [Release notes](https://github.com/jacoco/jacoco/releases) - [Commits](https://github.com/jacoco/jacoco/compare/v0.8.11...v0.8.12) --- updated-dependencies: - dependency-name: org.jacoco:jacoco-maven-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index d13f2040ef..3228c45969 100644 --- a/pom.xml +++ b/pom.xml @@ -150,7 +150,7 @@ 3.6.3 9.4.54.v20240208 3.3.1 - 0.8.11 + 0.8.12 1.6.0 3.4.1 3.1.0 From 16bca1e42c4a1ef097f6fac031b10dcb4aaa4601 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 16:35:52 +0800 Subject: [PATCH 22/23] Bump org.apache.maven.plugins:maven-source-plugin from 3.3.0 to 3.3.1 (#14049) Bumps [org.apache.maven.plugins:maven-source-plugin](https://github.com/apache/maven-source-plugin) from 3.3.0 to 3.3.1. - [Commits](https://github.com/apache/maven-source-plugin/compare/maven-source-plugin-3.3.0...maven-source-plugin-3.3.1) --- updated-dependencies: - dependency-name: org.apache.maven.plugins:maven-source-plugin dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 3228c45969..f4c4136abf 100644 --- a/pom.xml +++ b/pom.xml @@ -146,7 +146,7 @@ 3.2.5 2.8.2 3.13.0 - 3.3.0 + 3.3.1 3.6.3 9.4.54.v20240208 3.3.1 From 45b5d44064c752d51dcc4b6a699c4f6ce7f3c09d Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 09:48:39 +0800 Subject: [PATCH 23/23] Bump com.alibaba.nacos:nacos-client from 2.3.1 to 2.3.2 (#14042) Bumps [com.alibaba.nacos:nacos-client](https://github.com/alibaba/nacos) from 2.3.1 to 2.3.2. - [Release notes](https://github.com/alibaba/nacos/releases) - [Changelog](https://github.com/alibaba/nacos/blob/develop/CHANGELOG.md) - [Commits](https://github.com/alibaba/nacos/compare/2.3.1...2.3.2) --- updated-dependencies: - dependency-name: com.alibaba.nacos:nacos-client dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- dubbo-dependencies-bom/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dubbo-dependencies-bom/pom.xml b/dubbo-dependencies-bom/pom.xml index 3b475cf4b3..61fd75e738 100644 --- a/dubbo-dependencies-bom/pom.xml +++ b/dubbo-dependencies-bom/pom.xml @@ -133,7 +133,7 @@ 3.15.6.Final 1.9.13 8.5.100 - 2.3.1 + 2.3.2 1.63.0 0.8.1 1.2.2