File tree Expand file tree Collapse file tree 10 files changed +22
-19
lines changed
server/meta/src/main/java/com/alipay/sofa/registry/server/meta/resource Expand file tree Collapse file tree 10 files changed +22
-19
lines changed Original file line number Diff line number Diff line change 2323 checkRule :
2424 - passRate = 100
2525 tools :
26- jdk : ' 1.8 ' # jdk版本枚举:1.6、1.7、1.8
26+ jdk : ' 11 ' # jdk版本枚举:1.6、1.7、1.8
2727 maven : 3.2.5
2828 parameters :
2929 encoding : UTF-8 # 编码设置
3838 checkRule :
3939 - passRate = 100
4040 tools :
41- jdk : ' 1.8 '
41+ jdk : ' 11 '
4242 parameters :
4343 encoding : UTF-8 # 编码设置
4444 pluginConfig :
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ jobs:
1616
1717 steps :
1818 - uses : actions/checkout@v2
19- - name : Set up JDK 1.8
19+ - name : Set up JDK 11
2020 uses : actions/setup-java@v1
2121 with :
22- java-version : 1.8
22+ java-version : 11
2323 - name : Integration Test
2424 run : mvn compile -B
2525 && mvn clean test -DisSkipUnitTest=true "-Dtest.logging.level=ERROR"
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ jobs:
1212 runs-on : ubuntu-latest
1313 steps :
1414 - uses : actions/checkout@v2
15- - name : Set up JDK 1.8
15+ - name : Set up JDK 11
1616 uses : actions/setup-java@v1
1717 with :
18- java-version : 1.8
18+ java-version : 11
1919 - name : PMD
2020 run : mvn install -Dmaven.test.skip=true
2121 && mvn pmd:check
Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ jobs:
1616
1717 steps :
1818 - uses : actions/checkout@v2
19- - name : Set up JDK 1.8
19+ - name : Set up JDK 11
2020 uses : actions/setup-java@v1
2121 with :
22- java-version : 1.8
22+ java-version : 11
2323 - name : Unit Testt
2424 run : mvn compile -B
2525 && mvn clean test -DisSkipIntegrationTest=true "-Dtest.logging.level=ERROR" --fail-at-end --batch-mode
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ version: '{build}'
44# environment settings
55environment :
66 matrix :
7- - JAVA_HOME : C:\Program Files\Java\jdk1.8 .0
7+ - JAVA_HOME : C:\Program Files\Java\jdk11 .0
88
99platform : x64
1010
Original file line number Diff line number Diff line change 1414
1515 <properties >
1616 <main .user.dir>../../</main .user.dir>
17+ <maven .compiler.source>1.8</maven .compiler.source>
18+ <maven .compiler.target>1.8</maven .compiler.target>
1719 </properties >
1820
1921 <dependencies >
Original file line number Diff line number Diff line change 5656 <module >test</module >
5757 </modules >
5858 <properties >
59- <maven .compiler.source>1.8 </maven .compiler.source>
60- <maven .compiler.target>1.8 </maven .compiler.target>
59+ <maven .compiler.source>11 </maven .compiler.source>
60+ <maven .compiler.target>11 </maven .compiler.target>
6161 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
6262 <bolt .version>1.6.3</bolt .version>
6363 <commons .lang.version>2.6</commons .lang.version>
Original file line number Diff line number Diff line change 4040 </profiles >
4141 <properties >
4242 <!-- Build args -->
43- <maven .compiler.source>1.8 </maven .compiler.source>
44- <maven .compiler.target>1.8 </maven .compiler.target>
43+ <maven .compiler.source>11 </maven .compiler.source>
44+ <maven .compiler.target>11 </maven .compiler.target>
4545 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
4646 <main .user.dir>../</main .user.dir>
4747 </properties >
Original file line number Diff line number Diff line change 2727import javax .ws .rs .Produces ;
2828import javax .ws .rs .core .MediaType ;
2929import org .apache .commons .lang .StringUtils ;
30- import sun . net . util . IPAddressUtil ;
30+ import org . glassfish . jersey . internal . guava . InetAddresses ;
3131
3232/**
3333 * @author chen.zhu
@@ -51,7 +51,7 @@ public class RegistryCoreOpsResource {
5151 @ Deprecated
5252 public CommonResponse kickoffServer (@ PathParam (value = "ip" ) String ip ) {
5353 LOGGER .warn ("[kickoffServer][begin] server [{}], use opsapi/v2 instead" , ip );
54- if (StringUtils .isBlank (ip ) || !IPAddressUtil . isIPv4LiteralAddress (ip )) {
54+ if (StringUtils .isBlank (ip ) || !InetAddresses . isUriInetAddress (ip )) {
5555 LOGGER .error ("[kickoffServer]invalid ip: {}" , ip );
5656 return GenericResponse .buildFailedResponse ("invalid ip address: " + ip );
5757 }
@@ -71,7 +71,7 @@ public CommonResponse kickoffServer(@PathParam(value = "ip") String ip) {
7171 @ Deprecated
7272 public CommonResponse rejoinServerGroup (@ PathParam (value = "ip" ) String ip ) {
7373 LOGGER .warn ("[rejoinServerGroup][begin] server [{}], use opsapi/v2 instead" , ip );
74- if (StringUtils .isBlank (ip ) || !IPAddressUtil . isIPv4LiteralAddress (ip )) {
74+ if (StringUtils .isBlank (ip ) || !InetAddresses . isUriInetAddress (ip )) {
7575 LOGGER .error ("[rejoinServerGroup]invalid ip: {}" , ip );
7676 return GenericResponse .buildFailedResponse ("invalid ip address: " + ip );
7777 }
Original file line number Diff line number Diff line change 3333import javax .ws .rs .Produces ;
3434import javax .ws .rs .core .MediaType ;
3535import org .apache .commons .lang .StringUtils ;
36+ import org .glassfish .jersey .internal .guava .InetAddresses ;
3637import org .springframework .beans .factory .annotation .Autowired ;
37- import sun . net . util . IPAddressUtil ;
38+
3839
3940/**
4041 * @author chen.zhu
@@ -65,7 +66,7 @@ public CommonResponse kickoffServer(
6566 return GenericResponse .buildFailedResponse ("invalid nodeType: " + nodeType );
6667 }
6768
68- if (StringUtils .isBlank (ip ) || !IPAddressUtil . isIPv4LiteralAddress (ip )) {
69+ if (StringUtils .isBlank (ip ) || !InetAddresses . isUriInetAddress (ip )) {
6970 LOGGER .error ("[kickoffServerV2]invalid ip: {}" , ip );
7071 return GenericResponse .buildFailedResponse ("invalid ip address: " + ip );
7172 }
@@ -106,7 +107,7 @@ public CommonResponse rejoinServerGroup(
106107 return GenericResponse .buildFailedResponse ("invalid nodeType: " + nodeType );
107108 }
108109
109- if (StringUtils .isBlank (ip ) || !IPAddressUtil . isIPv4LiteralAddress (ip )) {
110+ if (StringUtils .isBlank (ip ) || !InetAddresses . isUriInetAddress (ip )) {
110111 LOGGER .error ("[rejoinServerGroupV2]invalid ip: {}" , ip );
111112 return GenericResponse .buildFailedResponse ("invalid ip address: " + ip );
112113 }
You can’t perform that action at this time.
0 commit comments