Skip to content

Commit

Permalink
upgrade jdk11
Browse files Browse the repository at this point in the history
  • Loading branch information
dzdx committed Aug 4, 2022
1 parent b802ace commit 7da35ab
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .aci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ STC扫描:
checkRule:
- passRate = 100
tools:
jdk: '1.8' #jdk版本枚举:1.6、1.7、1.8
jdk: '11' #jdk版本枚举:1.6、1.7、1.8
maven: 3.2.5
parameters:
encoding: UTF-8 # 编码设置
Expand All @@ -38,7 +38,7 @@ STC扫描:
checkRule:
- passRate = 100
tools:
jdk: '1.8'
jdk: '11'
parameters:
encoding: UTF-8 # 编码设置
pluginConfig:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Integration Test
run: mvn compile -B
&& mvn clean test -DisSkipUnitTest=true "-Dtest.logging.level=ERROR"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pmd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: PMD
run: mvn install -Dmaven.test.skip=true
&& mvn pmd:check
4 changes: 2 additions & 2 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 1.8
java-version: 11
- name: Unit Testt
run: mvn compile -B
&& mvn clean test -DisSkipIntegrationTest=true "-Dtest.logging.level=ERROR" --fail-at-end --batch-mode
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: '{build}'
# environment settings
environment:
matrix:
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
- JAVA_HOME: C:\Program Files\Java\jdk11.0

platform: x64

Expand Down
2 changes: 2 additions & 0 deletions client/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

<properties>
<main.user.dir>../../</main.user.dir>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@
<module>test</module>
</modules>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<bolt.version>1.6.3</bolt.version>
<commons.lang.version>2.6</commons.lang.version>
Expand Down
4 changes: 2 additions & 2 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
</profiles>
<properties>
<!-- Build args -->
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<main.user.dir>../</main.user.dir>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.apache.commons.lang.StringUtils;
import sun.net.util.IPAddressUtil;
import org.glassfish.jersey.internal.guava.InetAddresses;

/**
* @author chen.zhu
Expand All @@ -51,7 +51,7 @@ public class RegistryCoreOpsResource {
@Deprecated
public CommonResponse kickoffServer(@PathParam(value = "ip") String ip) {
LOGGER.warn("[kickoffServer][begin] server [{}], use opsapi/v2 instead", ip);
if (StringUtils.isBlank(ip) || !IPAddressUtil.isIPv4LiteralAddress(ip)) {
if (StringUtils.isBlank(ip) || !InetAddresses.isUriInetAddress(ip)) {
LOGGER.error("[kickoffServer]invalid ip: {}", ip);
return GenericResponse.buildFailedResponse("invalid ip address: " + ip);
}
Expand All @@ -71,7 +71,7 @@ public CommonResponse kickoffServer(@PathParam(value = "ip") String ip) {
@Deprecated
public CommonResponse rejoinServerGroup(@PathParam(value = "ip") String ip) {
LOGGER.warn("[rejoinServerGroup][begin] server [{}], use opsapi/v2 instead", ip);
if (StringUtils.isBlank(ip) || !IPAddressUtil.isIPv4LiteralAddress(ip)) {
if (StringUtils.isBlank(ip) || !InetAddresses.isUriInetAddress(ip)) {
LOGGER.error("[rejoinServerGroup]invalid ip: {}", ip);
return GenericResponse.buildFailedResponse("invalid ip address: " + ip);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import org.apache.commons.lang.StringUtils;
import org.glassfish.jersey.internal.guava.InetAddresses;
import org.springframework.beans.factory.annotation.Autowired;
import sun.net.util.IPAddressUtil;


/**
* @author chen.zhu
Expand Down Expand Up @@ -65,7 +66,7 @@ public CommonResponse kickoffServer(
return GenericResponse.buildFailedResponse("invalid nodeType: " + nodeType);
}

if (StringUtils.isBlank(ip) || !IPAddressUtil.isIPv4LiteralAddress(ip)) {
if (StringUtils.isBlank(ip) || !InetAddresses.isUriInetAddress(ip)) {
LOGGER.error("[kickoffServerV2]invalid ip: {}", ip);
return GenericResponse.buildFailedResponse("invalid ip address: " + ip);
}
Expand Down Expand Up @@ -106,7 +107,7 @@ public CommonResponse rejoinServerGroup(
return GenericResponse.buildFailedResponse("invalid nodeType: " + nodeType);
}

if (StringUtils.isBlank(ip) || !IPAddressUtil.isIPv4LiteralAddress(ip)) {
if (StringUtils.isBlank(ip) || !InetAddresses.isUriInetAddress(ip)) {
LOGGER.error("[rejoinServerGroupV2]invalid ip: {}", ip);
return GenericResponse.buildFailedResponse("invalid ip address: " + ip);
}
Expand Down

0 comments on commit 7da35ab

Please sign in to comment.