From be2715d8147935e35c4cd8fd31d9d60a498d39bf Mon Sep 17 00:00:00 2001 From: Eric Zhao Date: Mon, 1 Feb 2021 09:53:32 +0800 Subject: [PATCH] Update source/target JDK version to 1.8 and update documents Signed-off-by: Eric Zhao --- README.md | 4 ++-- pom.xml | 4 ++-- .../pom.xml | 5 ----- .../sentinel-motan-adapter/pom.xml | 16 ++-------------- .../sentinel-reactor-adapter/README.md | 2 -- .../README.md | 2 -- .../sentinel-spring-webflux-adapter/README.md | 2 -- sentinel-benchmark/pom.xml | 11 ----------- sentinel-cluster/pom.xml | 3 --- .../processor/RequestProcessorProvider.java | 6 +----- sentinel-dashboard/pom.xml | 11 ----------- sentinel-demo/pom.xml | 5 ----- .../sentinel-demo-apollo-datasource/pom.xml | 2 -- sentinel-demo/sentinel-demo-dubbo/pom.xml | 14 -------------- .../sentinel-demo-dynamic-file-rule/pom.xml | 15 --------------- .../sentinel-demo-etcd-datasource/pom.xml | 18 ------------------ sentinel-demo/sentinel-demo-motan/pom.xml | 15 --------------- .../sentinel-demo-nacos-datasource/pom.xml | 14 -------------- .../pom.xml | 5 ----- sentinel-demo/sentinel-demo-rocketmq/pom.xml | 14 -------------- .../sentinel-demo-spring-cloud-gateway/pom.xml | 5 ----- .../sentinel-demo-zookeeper-datasource/pom.xml | 15 --------------- .../sentinel-datasource-consul/README.md | 2 -- .../sentinel-datasource-etcd/README.md | 2 -- .../sentinel-datasource-redis/README.md | 2 +- .../sentinel-datasource-zookeeper/pom.xml | 2 -- .../sentinel-logging-slf4j/pom.xml | 2 -- 27 files changed, 8 insertions(+), 190 deletions(-) diff --git a/README.md b/README.md index 5ece139d..66713e63 100755 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ Below is a simple demo that guides new users to use Sentinel in just 3 steps. It ### 1. Add Dependency -**Note:** Sentinel Core requires Java 7 or later. +**Note:** Sentinel requires JDK 1.8 or later. -If your're using Maven, just add the following dependency in `pom.xml`. +If you're using Maven, just add the following dependency in `pom.xml`. ```xml diff --git a/pom.xml b/pom.xml index f2d53b60..00323e71 100755 --- a/pom.xml +++ b/pom.xml @@ -53,8 +53,8 @@ UTF-8 - 1.7 - 1.7 + 1.8 + 1.8 UTF-8 3.8.0 2.22.1 diff --git a/sentinel-adapter/sentinel-api-gateway-adapter-common/pom.xml b/sentinel-adapter/sentinel-api-gateway-adapter-common/pom.xml index 19b37b91..6b059f20 100644 --- a/sentinel-adapter/sentinel-api-gateway-adapter-common/pom.xml +++ b/sentinel-adapter/sentinel-api-gateway-adapter-common/pom.xml @@ -12,11 +12,6 @@ sentinel-api-gateway-adapter-common jar - - 1.7 - 1.7 - - com.alibaba.csp diff --git a/sentinel-adapter/sentinel-motan-adapter/pom.xml b/sentinel-adapter/sentinel-motan-adapter/pom.xml index 6ccb1a3b..f0f9fbbe 100644 --- a/sentinel-adapter/sentinel-motan-adapter/pom.xml +++ b/sentinel-adapter/sentinel-motan-adapter/pom.xml @@ -20,6 +20,7 @@ com.alibaba.csp sentinel-core + com.weibo motan-core @@ -33,18 +34,5 @@ provided - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 1.8 - 1.8 - ${java.encoding} - - - - + \ No newline at end of file diff --git a/sentinel-adapter/sentinel-reactor-adapter/README.md b/sentinel-adapter/sentinel-reactor-adapter/README.md index 28c6bed8..d53eaec0 100644 --- a/sentinel-adapter/sentinel-reactor-adapter/README.md +++ b/sentinel-adapter/sentinel-reactor-adapter/README.md @@ -1,7 +1,5 @@ # Sentinel Reactor Adapter -> Note: this module requires Java 8 or later version. - Sentinel provides integration module for [Reactor](https://projectreactor.io/). Add the following dependency in `pom.xml` (if you are using Maven): diff --git a/sentinel-adapter/sentinel-spring-cloud-gateway-adapter/README.md b/sentinel-adapter/sentinel-spring-cloud-gateway-adapter/README.md index 4961b32f..1a700b0e 100644 --- a/sentinel-adapter/sentinel-spring-cloud-gateway-adapter/README.md +++ b/sentinel-adapter/sentinel-spring-cloud-gateway-adapter/README.md @@ -1,7 +1,5 @@ # Sentinel Spring Cloud Gateway Adapter -> Note: this module requires Java 8 or later version. - Sentinel provides integration module with Spring Cloud Gateway. The integration module is based on the Sentinel Reactor Adapter. diff --git a/sentinel-adapter/sentinel-spring-webflux-adapter/README.md b/sentinel-adapter/sentinel-spring-webflux-adapter/README.md index 158937fe..6e165f92 100644 --- a/sentinel-adapter/sentinel-spring-webflux-adapter/README.md +++ b/sentinel-adapter/sentinel-spring-webflux-adapter/README.md @@ -1,7 +1,5 @@ # Sentinel Spring WebFlux Adapter -> Note: this module requires Java 8 or later version. - Sentinel provides integration module with Spring WebFlux, so reactive web applications can also leverage Sentinel's flow control and circuit breaking to achieve reliability. The integration module is based on the Sentinel Reactor Adapter. diff --git a/sentinel-benchmark/pom.xml b/sentinel-benchmark/pom.xml index e0c14884..dd88db7c 100644 --- a/sentinel-benchmark/pom.xml +++ b/sentinel-benchmark/pom.xml @@ -40,22 +40,11 @@ UTF-8 1.21 - 1.8 benchmarks - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - ${javac.target} - ${javac.target} - ${javac.target} - - org.apache.maven.plugins maven-pmd-plugin diff --git a/sentinel-cluster/pom.xml b/sentinel-cluster/pom.xml index 5bde8cc7..2ab0dac4 100644 --- a/sentinel-cluster/pom.xml +++ b/sentinel-cluster/pom.xml @@ -13,9 +13,6 @@ The parent module of Sentinel cluster server - 1.7 - 1.7 - 4.1.31.Final diff --git a/sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/server/processor/RequestProcessorProvider.java b/sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/server/processor/RequestProcessorProvider.java index 0dcffce9..96767f07 100644 --- a/sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/server/processor/RequestProcessorProvider.java +++ b/sentinel-cluster/sentinel-cluster-server-default/src/main/java/com/alibaba/csp/sentinel/cluster/server/processor/RequestProcessorProvider.java @@ -59,11 +59,7 @@ public final class RequestProcessorProvider { } static void addProcessorIfAbsent(int type, RequestProcessor processor) { - // TBD: use putIfAbsent in JDK 1.8. - if (PROCESSOR_MAP.containsKey(type)) { - return; - } - PROCESSOR_MAP.put(type, processor); + PROCESSOR_MAP.putIfAbsent(type, processor); } static void addProcessor(int type, RequestProcessor processor) { diff --git a/sentinel-dashboard/pom.xml b/sentinel-dashboard/pom.xml index 9b0f504d..46ecdaaa 100755 --- a/sentinel-dashboard/pom.xml +++ b/sentinel-dashboard/pom.xml @@ -13,8 +13,6 @@ jar - 1.8 - 1.8 2.0.5.RELEASE 4.0.1 @@ -158,15 +156,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - ${maven.compiler.source} - ${maven.compiler.target} - - - org.apache.maven.plugins maven-deploy-plugin diff --git a/sentinel-demo/pom.xml b/sentinel-demo/pom.xml index 990c3950..86131280 100755 --- a/sentinel-demo/pom.xml +++ b/sentinel-demo/pom.xml @@ -12,11 +12,6 @@ pom sentinel-demo - - 1.8 - 1.8 - - sentinel-demo-basic sentinel-demo-dynamic-file-rule diff --git a/sentinel-demo/sentinel-demo-apollo-datasource/pom.xml b/sentinel-demo/sentinel-demo-apollo-datasource/pom.xml index 8477462b..0b01d240 100644 --- a/sentinel-demo/sentinel-demo-apollo-datasource/pom.xml +++ b/sentinel-demo/sentinel-demo-apollo-datasource/pom.xml @@ -12,8 +12,6 @@ sentinel-demo-apollo-datasource - 1.8 - 1.8 2.9.1 1.7.25 diff --git a/sentinel-demo/sentinel-demo-dubbo/pom.xml b/sentinel-demo/sentinel-demo-dubbo/pom.xml index 58d00f8d..d42372cc 100644 --- a/sentinel-demo/sentinel-demo-dubbo/pom.xml +++ b/sentinel-demo/sentinel-demo-dubbo/pom.xml @@ -50,18 +50,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 1.8 - 1.8 - ${java.encoding} - - - - \ No newline at end of file diff --git a/sentinel-demo/sentinel-demo-dynamic-file-rule/pom.xml b/sentinel-demo/sentinel-demo-dynamic-file-rule/pom.xml index fddfb8f0..e2f77241 100755 --- a/sentinel-demo/sentinel-demo-dynamic-file-rule/pom.xml +++ b/sentinel-demo/sentinel-demo-dynamic-file-rule/pom.xml @@ -30,19 +30,4 @@ - - sentinel-demo-dynamic-file-rule - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 1.8 - 1.8 - ${java.encoding} - - - - \ No newline at end of file diff --git a/sentinel-demo/sentinel-demo-etcd-datasource/pom.xml b/sentinel-demo/sentinel-demo-etcd-datasource/pom.xml index 72195732..57cb3e6d 100644 --- a/sentinel-demo/sentinel-demo-etcd-datasource/pom.xml +++ b/sentinel-demo/sentinel-demo-etcd-datasource/pom.xml @@ -12,37 +12,19 @@ sentinel-demo-etcd-datasource - com.alibaba.csp sentinel-core - com.alibaba.csp sentinel-datasource-etcd - com.alibaba fastjson - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 1.8 - 1.8 - ${java.encoding} - - - - \ No newline at end of file diff --git a/sentinel-demo/sentinel-demo-motan/pom.xml b/sentinel-demo/sentinel-demo-motan/pom.xml index 4f48a87d..58ee8e9f 100644 --- a/sentinel-demo/sentinel-demo-motan/pom.xml +++ b/sentinel-demo/sentinel-demo-motan/pom.xml @@ -50,19 +50,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 1.8 - 1.8 - ${java.encoding} - - - - - \ No newline at end of file diff --git a/sentinel-demo/sentinel-demo-nacos-datasource/pom.xml b/sentinel-demo/sentinel-demo-nacos-datasource/pom.xml index e6d85336..dbffcfd5 100644 --- a/sentinel-demo/sentinel-demo-nacos-datasource/pom.xml +++ b/sentinel-demo/sentinel-demo-nacos-datasource/pom.xml @@ -37,18 +37,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 1.8 - 1.8 - ${java.encoding} - - - - \ No newline at end of file diff --git a/sentinel-demo/sentinel-demo-parameter-flow-control/pom.xml b/sentinel-demo/sentinel-demo-parameter-flow-control/pom.xml index c54d6fe3..6ec442ac 100644 --- a/sentinel-demo/sentinel-demo-parameter-flow-control/pom.xml +++ b/sentinel-demo/sentinel-demo-parameter-flow-control/pom.xml @@ -11,11 +11,6 @@ sentinel-demo-parameter-flow-control - - 1.8 - 1.8 - - com.alibaba.csp diff --git a/sentinel-demo/sentinel-demo-rocketmq/pom.xml b/sentinel-demo/sentinel-demo-rocketmq/pom.xml index 92f4160b..3a000be5 100755 --- a/sentinel-demo/sentinel-demo-rocketmq/pom.xml +++ b/sentinel-demo/sentinel-demo-rocketmq/pom.xml @@ -19,18 +19,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 1.8 - 1.8 - ${java.encoding} - - - - \ No newline at end of file diff --git a/sentinel-demo/sentinel-demo-spring-cloud-gateway/pom.xml b/sentinel-demo/sentinel-demo-spring-cloud-gateway/pom.xml index b3934892..858336b3 100644 --- a/sentinel-demo/sentinel-demo-spring-cloud-gateway/pom.xml +++ b/sentinel-demo/sentinel-demo-spring-cloud-gateway/pom.xml @@ -11,11 +11,6 @@ sentinel-demo-spring-cloud-gateway - - 1.8 - 1.8 - - org.springframework.cloud diff --git a/sentinel-demo/sentinel-demo-zookeeper-datasource/pom.xml b/sentinel-demo/sentinel-demo-zookeeper-datasource/pom.xml index 5513c822..0eac807c 100644 --- a/sentinel-demo/sentinel-demo-zookeeper-datasource/pom.xml +++ b/sentinel-demo/sentinel-demo-zookeeper-datasource/pom.xml @@ -54,19 +54,4 @@ - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven.compiler.version} - - 1.8 - 1.8 - ${java.encoding} - - - - - \ No newline at end of file diff --git a/sentinel-extension/sentinel-datasource-consul/README.md b/sentinel-extension/sentinel-datasource-consul/README.md index 8a407cc8..b5c18647 100644 --- a/sentinel-extension/sentinel-datasource-consul/README.md +++ b/sentinel-extension/sentinel-datasource-consul/README.md @@ -3,8 +3,6 @@ Sentinel DataSource Consul provides integration with Consul. The data source leverages blocking query (backed by long polling) of Consul. -> **NOTE**: This module requires JDK 1.8 or later. - ## Usage To use Sentinel DataSource Consul, you could add the following dependency: diff --git a/sentinel-extension/sentinel-datasource-etcd/README.md b/sentinel-extension/sentinel-datasource-etcd/README.md index 23d6129d..d63d209d 100644 --- a/sentinel-extension/sentinel-datasource-etcd/README.md +++ b/sentinel-extension/sentinel-datasource-etcd/README.md @@ -3,8 +3,6 @@ Sentinel DataSource Etcd provides integration with etcd so that etcd can be the dynamic rule data source of Sentinel. The data source uses push model (watcher). -> **NOTE**: This module requires JDK 1.8 or later. - To use Sentinel DataSource Etcd, you should add the following dependency: ```xml diff --git a/sentinel-extension/sentinel-datasource-redis/README.md b/sentinel-extension/sentinel-datasource-redis/README.md index 2436df04..d04a8e42 100644 --- a/sentinel-extension/sentinel-datasource-redis/README.md +++ b/sentinel-extension/sentinel-datasource-redis/README.md @@ -2,7 +2,7 @@ Sentinel DataSource Redis provides integration with Redis. The data source leverages Redis pub-sub feature to implement push model (listener). -The data source uses [Lettuce](https://lettuce.io/) as the Redis client internal. Requires JDK 1.8 or later. +The data source uses [Lettuce](https://lettuce.io/) as the Redis client, which requires JDK 1.8 or later. > **NOTE**: Currently we do not support Redis Cluster now. diff --git a/sentinel-extension/sentinel-datasource-zookeeper/pom.xml b/sentinel-extension/sentinel-datasource-zookeeper/pom.xml index 912f9461..34a764f9 100644 --- a/sentinel-extension/sentinel-datasource-zookeeper/pom.xml +++ b/sentinel-extension/sentinel-datasource-zookeeper/pom.xml @@ -13,8 +13,6 @@ jar - 1.7 - 1.7 3.4.14 4.0.1 2.12.0 diff --git a/sentinel-logging/sentinel-logging-slf4j/pom.xml b/sentinel-logging/sentinel-logging-slf4j/pom.xml index fb7daf32..f9e9583c 100644 --- a/sentinel-logging/sentinel-logging-slf4j/pom.xml +++ b/sentinel-logging/sentinel-logging-slf4j/pom.xml @@ -13,8 +13,6 @@ jar - 1.7 - 1.7 1.7.25 1.2.0