Skip to content

Commit 11db148

Browse files
authored
Upgrade supported JDK version to 11 (#842)
1 parent c941f18 commit 11db148

File tree

11 files changed

+128
-87
lines changed

11 files changed

+128
-87
lines changed

.github/workflows/maven.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,16 @@ on:
1111

1212
jobs:
1313
build:
14-
runs-on: ubuntu-16.04
15-
14+
runs-on: ubuntu-20.04
15+
strategy:
16+
matrix:
17+
jdk: [8, 11]
1618
steps:
1719
- uses: actions/checkout@v2
18-
- name: Set up JDK 1.8
20+
- name: Set up JDK
1921
uses: actions/setup-java@v1
2022
with:
21-
java-version: 1.8
23+
java-version: ${{ matrix.jdk }}
2224
- name: Install Zookeeper
2325
run: echo "Install Zookeeper 3.5.6"
2426
&& wget https://archive.apache.org/dist/zookeeper/zookeeper-3.5.6/apache-zookeeper-3.5.6-bin.tar.gz

sofa-boot-project/sofa-boot-core/isle-sofa-boot/src/test/java/com/alipay/sofa/isle/test/util/SeparateClassLoaderTestRunner.java

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
package com.alipay.sofa.isle.test.util;
1818

1919
import java.lang.reflect.Constructor;
20+
import java.lang.reflect.Field;
2021
import java.lang.reflect.Method;
22+
import java.net.URL;
2123
import java.net.URLClassLoader;
2224

2325
import org.junit.runner.notification.RunNotifier;
@@ -81,7 +83,19 @@ public static AddCustomJar getAddCustomJarAnnotationRecursively(Class<?> klass)
8183

8284
public static class SeparateClassLoader extends URLClassLoader {
8385
public SeparateClassLoader() {
84-
super(((URLClassLoader) getSystemClassLoader()).getURLs(), null);
86+
super(new URL[0], null);
87+
88+
try {
89+
Field f = getSystemClassLoader().getClass().getDeclaredField("ucp");
90+
f.setAccessible(true);
91+
Object path = f.get(getSystemClassLoader());
92+
Method m = path.getClass().getDeclaredMethod("getURLs");
93+
for (URL url : (URL[]) m.invoke(path)) {
94+
addURL(url);
95+
}
96+
} catch (Throwable e) {
97+
// ignore
98+
}
8599
}
86100

87101
@Override

sofa-boot-project/sofa-boot-core/rpc-sofa-boot/src/main/java/com/alipay/sofa/rpc/boot/runtime/binding/RpcBinding.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public HealthResult healthCheck() {
111111
}
112112

113113
/**
114-
* Getter method for property <tt>appName</tt>.
114+
* Getter method for property <code>appName</code>.
115115
*
116116
* @return property value of appName
117117
*/
@@ -120,7 +120,7 @@ public String getAppName() {
120120
}
121121

122122
/**
123-
* Setter method for property <tt>appName</tt>.
123+
* Setter method for property <code>appName</code>.
124124
*
125125
* @param appName value to be assigned to property appName
126126
*/
@@ -129,7 +129,7 @@ public void setAppName(String appName) {
129129
}
130130

131131
/**
132-
* Getter method for property <tt>beanId</tt>.
132+
* Getter method for property <code>beanId</code>.
133133
*
134134
* @return property value of beanId
135135
*/
@@ -138,7 +138,7 @@ public String getBeanId() {
138138
}
139139

140140
/**
141-
* Setter method for property <tt>beanId</tt>.
141+
* Setter method for property <code>beanId</code>.
142142
*
143143
* @param beanId value to be assigned to property beanId
144144
*/
@@ -147,7 +147,7 @@ public void setBeanId(String beanId) {
147147
}
148148

149149
/**
150-
* Getter method for property <tt>rpcBindingParam</tt>.
150+
* Getter method for property <code>rpcBindingParam</code>.
151151
*
152152
* @return property value of rpcBindingParam
153153
*/
@@ -156,7 +156,7 @@ public RpcBindingParam getRpcBindingParam() {
156156
}
157157

158158
/**
159-
* Setter method for property <tt>rpcBindingParam</tt>.
159+
* Setter method for property <code>rpcBindingParam</code>.
160160
*
161161
* @param rpcBindingParam value to be assigned to property rpcBindingParam
162162
*/
@@ -165,7 +165,7 @@ public void setRpcBindingParam(RpcBindingParam rpcBindingParam) {
165165
}
166166

167167
/**
168-
* Getter method for property <tt>applicationContext</tt>.
168+
* Getter method for property <code>applicationContext</code>.
169169
*
170170
* @return property value of applicationContext
171171
*/
@@ -174,7 +174,7 @@ public ApplicationContext getApplicationContext() {
174174
}
175175

176176
/**
177-
* Setter method for property <tt>applicationContext</tt>.
177+
* Setter method for property <code>applicationContext</code>.
178178
*
179179
* @param applicationContext value to be assigned to property applicationContext
180180
*/
@@ -183,7 +183,7 @@ public void setApplicationContext(ApplicationContext applicationContext) {
183183
}
184184

185185
/**
186-
* Getter method for property <tt>inBinding</tt>.
186+
* Getter method for property <code>inBinding</code>.
187187
*
188188
* @return property value of inBinding
189189
*/
@@ -192,7 +192,7 @@ public boolean isInBinding() {
192192
}
193193

194194
/**
195-
* Setter method for property <tt>inBinding</tt>.
195+
* Setter method for property <code>inBinding</code>.
196196
*
197197
* @param inBinding value to be assigned to property inBinding
198198
*/
@@ -201,7 +201,7 @@ public void setInBinding(boolean inBinding) {
201201
}
202202

203203
/**
204-
* Getter method for property <tt>consumerConfig</tt>.
204+
* Getter method for property <code>consumerConfig</code>.
205205
*
206206
* @return property value of consumerConfig
207207
*/
@@ -210,7 +210,7 @@ public ConsumerConfig getConsumerConfig() {
210210
}
211211

212212
/**
213-
* Setter method for property <tt>consumerConfig</tt>.
213+
* Setter method for property <code>consumerConfig</code>.
214214
*
215215
* @param consumerConfig value to be assigned to property consumerConfig
216216
*/

sofa-boot-project/sofa-boot-core/rpc-sofa-boot/src/main/java/com/alipay/sofa/rpc/boot/runtime/binding/RpcBindingMethodInfo.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public class RpcBindingMethodInfo {
3838
private Object callbackHandler;
3939

4040
/**
41-
* Getter method for property <tt>name</tt>.
41+
* Getter method for property <code>name</code>.
4242
*
4343
* @return property value of name
4444
*/
@@ -47,7 +47,7 @@ public String getName() {
4747
}
4848

4949
/**
50-
* Setter method for property <tt>name</tt>.
50+
* Setter method for property <code>name</code>.
5151
*
5252
* @param name value to be assigned to property name
5353
*/
@@ -56,7 +56,7 @@ public void setName(String name) {
5656
}
5757

5858
/**
59-
* Getter method for property <tt>type</tt>.
59+
* Getter method for property <code>type</code>.
6060
*
6161
* @return property value of type
6262
*/
@@ -65,7 +65,7 @@ public String getType() {
6565
}
6666

6767
/**
68-
* Setter method for property <tt>type</tt>.
68+
* Setter method for property <code>type</code>.
6969
*
7070
* @param type value to be assigned to property type
7171
*/
@@ -74,7 +74,7 @@ public void setType(String type) {
7474
}
7575

7676
/**
77-
* Getter method for property <tt>timeout</tt>.
77+
* Getter method for property <code>timeout</code>.
7878
*
7979
* @return property value of timeout
8080
*/
@@ -83,7 +83,7 @@ public Integer getTimeout() {
8383
}
8484

8585
/**
86-
* Setter method for property <tt>timeout</tt>.
86+
* Setter method for property <code>timeout</code>.
8787
*
8888
* @param timeout value to be assigned to property timeout
8989
*/
@@ -92,7 +92,7 @@ public void setTimeout(Integer timeout) {
9292
}
9393

9494
/**
95-
* Getter method for property <tt>retries</tt>.
95+
* Getter method for property <code>retries</code>.
9696
*
9797
* @return property value of retries
9898
*/
@@ -101,7 +101,7 @@ public Integer getRetries() {
101101
}
102102

103103
/**
104-
* Setter method for property <tt>retries</tt>.
104+
* Setter method for property <code>retries</code>.
105105
*
106106
* @param retries value to be assigned to property retries
107107
*/
@@ -110,7 +110,7 @@ public void setRetries(Integer retries) {
110110
}
111111

112112
/**
113-
* Getter method for property <tt>callbackClass</tt>.
113+
* Getter method for property <code>callbackClass</code>.
114114
*
115115
* @return property value of callbackClass
116116
*/
@@ -119,7 +119,7 @@ public String getCallbackClass() {
119119
}
120120

121121
/**
122-
* Setter method for property <tt>callbackClass</tt>.
122+
* Setter method for property <code>callbackClass</code>.
123123
*
124124
* @param callbackClass value to be assigned to property callbackClass
125125
*/
@@ -128,7 +128,7 @@ public void setCallbackClass(String callbackClass) {
128128
}
129129

130130
/**
131-
* Getter method for property <tt>callbackRef</tt>.
131+
* Getter method for property <code>callbackRef</code>.
132132
*
133133
* @return property value of callbackRef
134134
*/
@@ -137,7 +137,7 @@ public String getCallbackRef() {
137137
}
138138

139139
/**
140-
* Setter method for property <tt>callbackRef</tt>.
140+
* Setter method for property <code>callbackRef</code>.
141141
*
142142
* @param callbackRef value to be assigned to property callbackRef
143143
*/
@@ -146,7 +146,7 @@ public void setCallbackRef(String callbackRef) {
146146
}
147147

148148
/**
149-
* Getter method for property <tt>callbackHandler</tt>.
149+
* Getter method for property <code>callbackHandler</code>.
150150
*
151151
* @return property value of callbackHandler
152152
*/
@@ -155,7 +155,7 @@ public Object getCallbackHandler() {
155155
}
156156

157157
/**
158-
* Setter method for property <tt>callbackHandler</tt>.
158+
* Setter method for property <code>callbackHandler</code>.
159159
*
160160
* @param callbackHandler value to be assigned to property callbackHandler
161161
*/

0 commit comments

Comments
 (0)