Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we keep 1.8 and add 11 in the ci?

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