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/24] 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 a58a6f4a7b04..d810510204e8 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/24] 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 0a76dfafee8e..2854aebf8992 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 1fc7bf44be9a..e6293ea41b1b 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 f16ba20b35e1..44f26c6add6d 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 a2628fae023e..d13f2040ef5b 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/24] 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 d810510204e8..3c0c3fc5918b 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/24] 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 d12920b52971..d054d5a9f027 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/24] 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 3c0c3fc5918b..d947edc1701b 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/24] 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 d947edc1701b..d9709d1d87a8 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/24] 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 d9709d1d87a8..f234cf40c671 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/24] 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 fcd2ca4ac573..1a1e30dc25c1 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/24] 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 c217bdb0d69f..5c6dec6efce5 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 @@ private void printRouterSnapshot(URL url, BitList> availableInvokers, 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 RouterSnapshotNode buildRouterSnapshot( 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 RouterSnapshotNode buildRouterSnapshot( 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 a72956054a90..406756ad03db 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 @@ private boolean isDeprecatedConditionMatch(Set conditionKeys, URL url) { } 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 fb777ef03a84..82421e460feb 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 @@ private static final class ConsistentHashSelector { 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 eaa863ed640f..dca9c34b25d7 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 3aa07f2ad3bd..0ac9949470f2 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 5b0dc5e0c3fe..5b77177cd0a6 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 Set merge(Set... items) { 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 06a40e81dfaf..c18f674c3ea5 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 ecc536953b3f..d35baf6ee384 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 098b9bd4cf0e..a53e47280a2d 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 static MeshRuleCache build( 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 9bff80a573ac..d81b578ae3c9 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 b05e09e7032f..de38ff8f7fdf 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 a840773c51c9..1fc3cadcc111 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 Result doInvoke(Invocation invocation, final List> invokers, L 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 9bc030729f6e..c219745b38f0 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 a1cbf14e60fe..10a129798386 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 0836e48e2582..0a2a2e738816 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 MockClusterWrapper(Cluster 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 a33be42ddcc2..90f2b707045e 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 6a3afbde4254..0149cc9ee7c3 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 @@ 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 static JavaBeanDescriptor serialize(Object obj, JavaBeanAccessor accessor 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 static Object deserialize(JavaBeanDescriptor beanDescriptor, ClassLoader 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 81cadc0d76a5..4a6e37c88392 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 static Mixin mixin(Class[] ics, Class[] dcs, ClassLoader cl) { 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 b42d5e286fba..b68e1ab5e147 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 @@ * 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 d2c39053d601..aba14f4cea5a 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 static String getInitCode(Class type) { } 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 58b269a4f3e8..88a4fc74f404 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 a5c255b2b8ae..fb03da44eab4 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 @@ private static void reportTooManyInstances() { } 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 5d9dc8bcbdf1..5f3632af7afa 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 @@ private void calculate() throws UnknownHostException { 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 74ad48add589..27b9c41c646e 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 static boolean isDefault(String value) { */ 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 static List mergeValues( } } - 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 0578feed909e..c2ee5587b3bf 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 static String[] readLines(File file) throws IOException { * @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 13e7ae4e7d4d..38f274d98f80 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 @@ 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 e46c77e05923..54b87a28a066 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 static String join(Collection coll, String split) { */ 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 static String getQueryStringValue(String qs, String key) { */ 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 ec1745e431fd..89e6b52b8d6c 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 static List parseURLs(String address, Map defaults) 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 9eec9c55d841..e82a8a1a7790 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 AbstractInterfaceConfig(ModuleModel moduleModel) { /** * 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 3666135ae858..7f25d99d4722 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 RegistryConfig getRegistry() { } 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 51fb4706ff28..6e0fd8719f29 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 RegistryConfig getRegistry() { } 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 1115c451b20e..b7441b76b06a 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 static List getNonStaticFields(final Class clazz) { * @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 bb1f0ed8a00a..a509506ec51b 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 void setRegistryUrl(URL registryUrl) { } 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 05a9c25d52de..eba2fa5613a3 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 @@ @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 fbd752f35820..58ad1e779cea 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 @@ private static List convertProviderToProtocol(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 24042939a800..387723e82fe6 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 Page(String navigation, String title, List columns, 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 25486c07edb5..f9cf0fb3fa76 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 62f3da3d8e48..981508e4aeba 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 306706c22cc4..0556a55a55b5 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 ee9f3670d53e..cc5a5b3ec0c6 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 Page handle(URL url) { } } 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 f0fdb34a2adc..7a6b762309bb 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 Page handle(URL url) { 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 0c8e3c26ec4b..d771c061e95e 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 6f1b383e629f..0f19232bca9c 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 Future asyncCall(Callable callable) { 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 d9bc2dd6627c..2a741489d09a 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 void setAttachments(Map attachments) { 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 void addAttachments(Map attachments) { 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 e77c9e2e8207..bde86c3a9ba0 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 @@ private void processServiceExecutor(URL url) { 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 728aa2184504..696c12eb43f8 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 static List loadRegistries(AbstractInterfaceConfig interfaceConfig, 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 @@ private static boolean registryNotExists(URL registryURL, List registryList } 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 c287e23ae4b6..683a335fef6b 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 AbstractAnnotationBeanPostProcessor(Class... annota } 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 713a19183566..02771ca12174 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 static Map getAttributes( 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 static Map getAttributes( 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 15e164b5eee3..8a5eff73e5ee 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 static Map getSubProperties(PropertySources propertySourc 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 9845e778c3d2..89add47aff86 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 static void main(String[] args) { 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 00276dda8c1f..ac3c15546369 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 cec8854d7d7f..9061e7a6f442 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 void putAll(Map inMap) { @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 bdd5e83006b6..d6dac4355ee3 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 @@ protected List doGetExportedURLs(ServiceMetadataIdentifier metadataIdent 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 0e774cc01824..cdd45552d742 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 77e7fa8928e9..2d0367ae6a02 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 static CommandContext decode(HttpRequest request) { 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 static CommandContext decode(HttpRequest request) { } } 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 425f4706b3a3..e81c8a0c9594 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 void send(Channel channel, Object message) throws RemotingException { 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 @@ private String count(Invoker invoker, String method) { } 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 faad6041de8c..0889eecf1539 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 boolean hasCommand(String commandName) { 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 f89996d0efbb..66e8421c6f81 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 f96e85718446..326f1be16ebd 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 static class ColumnDefine { 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 6b599da45a77..8c4d65068255 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 @@ private static class Node { /** * 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 33e529336e50..58ec934c42e4 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 static void oneToMany( 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 static StreamObserver manyToMany( 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 ba3e936d1616..8ee41924a257 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 @@ protected ClusterInvoker getMigrationInvoker( 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 c5e386bb9930..6763543c7c0d 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 @@ protected void unregistered(URL url) { } 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 @@ protected void subscribed(URL url, NotifyListener listener) { } 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 44a2e5712613..4a7edf788be5 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 List getEffectReferenceRegistryURLs() { 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 549593a888a1..979c49c2a5ea 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 340c50c724d3..2204076aba85 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 @@ private void cancelCloseTask() { @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 c106572e3f30..3f1140b22c5a 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 @@ protected Object decode(Channel channel, ChannelBuffer buffer, int readable, byt 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 da5b7273985b..f33c61360b66 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 @@ private String generateForOneCommand(String message) { } 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 f65966321cd5..d111a87fc91c 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 String telnet(Channel channel, String message) { 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 String telnet(Channel channel, String message) { } 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 String telnet(Channel channel, String message) { } } 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 String telnet(Channel channel, String message) { 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 8023274ac4de..d3e24111a39a 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 @@ 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 d02d63be29da..5536e6c83e62 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 ced2170b3b00..0f2358cee076 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 @@ 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 a261b6e54c4d..dc71cd862dcc 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 695983a22f19..95539ac9ac77 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 f1d4bfd23c8b..d864639dacc3 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 41b7bb5f4cd1..8041c72bd845 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 5a8a640bd664..6bc36b75ae44 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 List> getInvokers() { 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 30de38825d61..9b0769f54541 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 @@ */ 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 1cbabd45d015..e1b2c4966c30 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 0410d70c5056..645345db3faa 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 @@ */ 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 843754a1dd86..8bd9e41a3600 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 @@ */ 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 421e1148e7b4..52ca299bb82f 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 Exporter export(Invoker invoker) throws RpcException { .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 9e798e51df81..4f35a9cb3163 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 @@ 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 a8bd3c0c02e2..4a919adf2502 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 Exporter export(Invoker invoker) throws RpcException { // 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 Invoker protocolBindingRefer(Class serviceType, URL url) throws 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 c4955e7ce7fa..b33578470905 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 int getDefaultPort() { @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 2311928019d5..16d30ba2641e 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 @@ protected Invoker protocolBindingRefer(final Class type, final URL url 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 0a87d6d8f341..fcf7faf5f573 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 void setConstraintViolations(List constraintViol 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 4964f1792d81..6350eaaf1556 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 Object getProperty(String name) { @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 627ad1c195ed..deacffa63a92 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 static List> getConstructList(Class clazz) { } 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 b29439fe3e20..aa5339317d50 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 @@ private final class FlowState implements StreamByteDistributor.StreamState { 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 dcfafc37f8ee..6c9f5c1001ad 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 @@ */ 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/24] 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 fe9f2cdacc85..aecd3223faa2 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 @@ protected synchronized void init(boolean check) { 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/24] 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 f234cf40c671..30c3be773429 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/24] 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 30c3be773429..81791a9b3307 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/24] 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 81791a9b3307..12c898a9de8d 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 78c3b37e2268..29d8d47a8e9e 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 a3b847c1dafa..fb5ea3979329 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/24] 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 7b465c66498a..7be50fff2e9a 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.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.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.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 @@ private void initExecutor(URL url) { 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 void disconnect() { } } + 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 ab8f39bcf7d2..85cd56517329 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.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 @@ protected void initConnectionClient() { this.closePromise = new DefaultPromise<>(GlobalEventExecutor.INSTANCE); this.init = new AtomicBoolean(false); this.increase(); + this.isReconnecting = new AtomicBoolean(false); } @Override @@ -158,6 +160,10 @@ protected void doClose() { @Override protected void doConnect() throws RemotingException { + if (!isReconnecting.compareAndSet(false, true)) { + return; + } + if (isClosed()) { if (LOGGER.isDebugEnabled()) { LOGGER.debug( @@ -347,6 +353,11 @@ class ConnectionListener implements ChannelFutureListener { @Override public void operationComplete(ChannelFuture future) { + + if (!isReconnecting.compareAndSet(true, false)) { + return; + } + if (future.isSuccess()) { return; } @@ -364,8 +375,8 @@ public void operationComplete(ChannelFuture future) { "%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 void operationComplete(ChannelFuture future) { "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 37b4439bba69..c90418fa4de3 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.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.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 @@ void connectSyncTest() throws Throwable { 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/24] 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 7fa838d8d75b..879cf44e1010 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 void invoke() { 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/24] 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 e3cce7faf9d4..9af3a3a7fa48 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 d8e0fe734ddb..23df7f130ed3 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 d881d55fdce4..8e82740451ab 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 41b30699d54c..639b17b93ab4 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 deaf2b0dbd81..33ed7504dbd1 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 53925c9f3694..c1523f2fe7e8 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 44f26c6add6d..4336d2ca3891 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 99b0c92b140e..886395eae0fb 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 a3b19fc261fe..b48bcd0af1ab 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 f42ccb5580c1..826ecefd1f52 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 9b716b33adf2..11e7913a39e9 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 49ea3b67beb4..563a89ee0801 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 3ce640cd722c..ca94a4d9b202 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 ed854501a78b..f2896c728420 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 1d921ebd86bb..f932b8c27583 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/24] 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 12c898a9de8d..c17d0d44bc91 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/24] 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 c17d0d44bc91..3b475cf4b303 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 6a4eb4744fc4..369efb800e00 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 ca027c3d49e2..788dd28e9ddc 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 f7a82c8ec302..34dfd41eefb0 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 7c9aa6402332..6a55ebfe854b 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/24] 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 eb08c5fa8ccd..2276261aa436 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/24] 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 29d8d47a8e9e..e0ca5b99f4fa 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 fb5ea3979329..3685489fec72 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/24] 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 d13f2040ef5b..3228c4596923 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/24] 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 3228c4596923..f4c4136abfaf 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/24] 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 3b475cf4b303..61fd75e738d7 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 From 314547ef4d024305585b8b84f4ad77b41bd41e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E8=81=AA=E6=B4=8B?= <56506697+wcy666103@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:20:59 +0800 Subject: [PATCH 24/24] fix dubbo-spring-boot-interceptor dependency (#14059) --- dubbo-spring-boot/dubbo-spring-boot-interceptor/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dubbo-spring-boot/dubbo-spring-boot-interceptor/pom.xml b/dubbo-spring-boot/dubbo-spring-boot-interceptor/pom.xml index 6585f611e451..9e3f238ff826 100644 --- a/dubbo-spring-boot/dubbo-spring-boot-interceptor/pom.xml +++ b/dubbo-spring-boot/dubbo-spring-boot-interceptor/pom.xml @@ -46,6 +46,12 @@ spring-boot-starter-web true + + org.apache.dubbo + dubbo-rpc-api + ${project.version} + true +