Skip to content

Commit c5e2f93

Browse files
authored
Rest Refine (#14334)
1 parent 638f375 commit c5e2f93

File tree

160 files changed

+6016
-1783
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+6016
-1783
lines changed

.artifacts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,5 @@ dubbo-tracing
115115
dubbo-xds
116116
dubbo-plugin-loom
117117
dubbo-rest-jaxrs
118-
dubbo-rest-servlet
119118
dubbo-rest-spring
120119
dubbo-triple-servlet

.editorconfig

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,40 @@ ij_java_keep_simple_lambdas_in_one_line = true
4242
ij_java_keep_simple_methods_in_one_line = true
4343
ij_java_keep_blank_lines_in_code = 1
4444
ij_java_keep_blank_lines_in_declarations = 1
45+
ij_java_blank_lines_after_class_header = 1
4546
ij_java_class_count_to_use_import_on_demand = 999
4647
ij_java_names_count_to_use_import_on_demand = 999
4748
ij_java_imports_layout = org.apache.dubbo.**, |, javax.**, |, java.**, |, *, |, $*
4849
ij_java_insert_inner_class_imports = true
4950
ij_java_space_before_array_initializer_left_brace = true
5051
ij_java_method_parameters_new_line_after_left_paren = true
51-
ij_java_wrap_comments = true
52-
ij_java_wrap_long_lines = true
52+
ij_java_wrap_comments = false
53+
ij_java_wrap_long_lines = false
5354
ij_java_enum_constants_wrap = split_into_lines
54-
ij_java_method_call_chain_wrap = split_into_lines
55+
ij_java_method_call_chain_wrap = on_every_item
5556
ij_java_method_parameters_wrap = on_every_item
56-
ij_java_extends_list_wrap = on_every_item
57+
ij_java_extends_list_wrap = normal
5758
ij_java_extends_keyword_wrap = normal
5859
ij_java_binary_operation_wrap = normal
5960
ij_java_binary_operation_sign_on_next_line = true
6061

62+
[*.groovy]
63+
max_line_length = 180
64+
ij_groovy_label_indent_size = 4
65+
ij_groovy_keep_blank_lines_in_code = 1
66+
ij_groovy_keep_blank_lines_in_declarations = 1
67+
ij_groovy_blank_lines_after_class_header = 1
68+
ij_groovy_class_count_to_use_import_on_demand = 999
69+
ij_groovy_names_count_to_use_import_on_demand = 999
70+
ij_groovy_imports_layout = org.apache.dubbo.**, |, javax.**, |, java.**, |, *, |, $*
71+
ij_groovy_space_after_type_cast = false
72+
6173
[*.json]
6274
tab_width = 2
75+
indent_size = 2
6376

6477
[*.{yml,yaml}]
78+
tab_width = 2
6579
indent_size = 2
6680

6781
[*.xml]

.github/workflows/build-and-test-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ jobs:
326326
cd test && bash ./build-test-image.sh
327327
- name: "Run tests"
328328
run: cd test && bash ./run-tests.sh
329-
- name: "merge jacoco resule"
329+
- name: "merge jacoco result"
330330
run: |
331331
cd test/dubbo-test-jacoco-merger && mvn clean compile exec:java -Dexec.mainClass="org.apache.dubbo.test.JacocoMerge" -Dexec.args="${{github.workspace}}"
332332
- name: "Upload jacoco"

dubbo-common/src/main/java/org/apache/dubbo/common/utils/SystemPropertyConfigUtils.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ public class SystemPropertyConfigUtils {
3737
for (Field field : fields) {
3838
try {
3939
assert systemProperties != null;
40-
systemProperties.add((String) field.get(null));
40+
Object value = field.get(null);
41+
if (value instanceof String) {
42+
systemProperties.add((String) value);
43+
}
4144
} catch (IllegalAccessException e) {
4245
throw new IllegalStateException(
4346
String.format("%s does not have field of %s", clazz.getName(), field.getName()));

dubbo-common/src/main/java/org/apache/dubbo/config/nested/AggregationConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
public class AggregationConfig implements Serializable {
2525

26+
private static final long serialVersionUID = 4878693820314125085L;
27+
2628
/**
2729
* Enable aggregation or not.
2830
*/

dubbo-common/src/main/java/org/apache/dubbo/config/nested/BaggageConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727
*/
2828
public class BaggageConfig implements Serializable {
2929

30+
private static final long serialVersionUID = -4750259290735346439L;
31+
3032
/**
3133
* Whether baggage is enabled or not.
3234
*/

dubbo-common/src/main/java/org/apache/dubbo/config/CorsConfig.java renamed to dubbo-common/src/main/java/org/apache/dubbo/config/nested/CorsConfig.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.apache.dubbo.config;
17+
package org.apache.dubbo.config.nested;
1818

1919
import java.io.Serializable;
2020

2121
public class CorsConfig implements Serializable {
22-
private static final long serialVersionUID = 1L;
22+
23+
private static final long serialVersionUID = -7106481576053641726L;
2324

2425
/**
2526
* A list of origins for which cross-origin requests are allowed. Values may be a specific domain, e.g.

dubbo-common/src/main/java/org/apache/dubbo/config/nested/ExporterConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
*/
2929
public class ExporterConfig implements Serializable {
3030

31+
private static final long serialVersionUID = -559392305178067845L;
32+
3133
/**
3234
* Configuration for the Zipkin.
3335
*/

dubbo-common/src/main/java/org/apache/dubbo/config/nested/HistogramConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
*/
2424
public class HistogramConfig implements Serializable {
2525

26+
private static final long serialVersionUID = 8152538916051803031L;
27+
2628
/**
2729
* Whether histograms are enabled or not. Default is not enabled (false).
2830
*/
Lines changed: 250 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* the License. You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package org.apache.dubbo.config.nested;
18+
19+
import java.io.Serializable;
20+
21+
public class Http3Config implements Serializable {
22+
23+
private static final long serialVersionUID = -4443828713331129834L;
24+
25+
/**
26+
* Enable http3 support
27+
* <p>The default value is false.
28+
*/
29+
private Boolean enable;
30+
31+
/**
32+
* See <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_data">set_initial_max_data</a>.
33+
* <p>The default value is 8MiB.
34+
*/
35+
private Integer initialMaxData;
36+
37+
/**
38+
* If configured this will enable <a href="https://tools.ietf.org/html/draft-ietf-quic-datagram-01">Datagram support.</a>
39+
*/
40+
private Integer recvQueueLen;
41+
42+
/**
43+
* If configured this will enable <a href="https://tools.ietf.org/html/draft-ietf-quic-datagram-01">Datagram support.</a>
44+
*/
45+
private Integer sendQueueLen;
46+
47+
/**
48+
* See
49+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_stream_data_bidi_local">set_initial_max_stream_data_bidi_local</a>.
50+
* <p>The default value is 1MiB.
51+
*/
52+
private Integer initialMaxStreamDataBidiLocal;
53+
54+
/**
55+
* See
56+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_stream_data_bidi_remote">set_initial_max_stream_data_bidi_remote</a>.
57+
* <p>The default value is 1MiB.
58+
*/
59+
private Integer initialMaxStreamDataBidiRemote;
60+
61+
/**
62+
* See
63+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_stream_data_uni">set_initial_max_stream_data_uni</a>.
64+
* <p>The default value is 0.
65+
*/
66+
private Integer initialMaxStreamDataUni;
67+
68+
/**
69+
* See
70+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_streams_bidi">set_initial_max_streams_bidi</a>.
71+
* <p>The default value is 1B(2^30).
72+
*/
73+
private Long initialMaxStreamsBidi;
74+
75+
/**
76+
* See
77+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_initial_max_streams_uni">set_initial_max_streams_uni</a>.
78+
* <p>
79+
* <p>The default value is 1B(2^30).
80+
*/
81+
private Long initialMaxStreamsUni;
82+
83+
/**
84+
* See
85+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_ack_delay_exponent">set_ack_delay_exponent</a>.
86+
* <p>The default value is 3.
87+
*/
88+
private Integer maxAckDelayExponent;
89+
90+
/**
91+
* See
92+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_max_ack_delay">set_max_ack_delay</a>.
93+
* <p>The default value is 25 milliseconds.
94+
*/
95+
private Integer maxAckDelay;
96+
97+
/**
98+
* See
99+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.set_disable_active_migration">set_disable_active_migration</a>.
100+
* <p>The default value is {@code false}.
101+
*/
102+
private Boolean disableActiveMigration;
103+
104+
/**
105+
* See
106+
* <a href="https://docs.rs/quiche/0.6.0/quiche/struct.Config.html#method.enable_hystart">enable_hystart</a>.
107+
* <p>The default value is {@code true}.
108+
*/
109+
private Boolean enableHystart;
110+
111+
/**
112+
* Sets the congestion control algorithm to use.
113+
* <p>Supported algorithms are {@code "RENO"} or {@code "CUBIC"} or {@code "BBR"}.
114+
* <p>The default value is {@code "CUBIC"}.
115+
*/
116+
private String ccAlgorithm;
117+
118+
public Boolean getEnable() {
119+
return enable;
120+
}
121+
122+
public void setEnable(Boolean enable) {
123+
this.enable = enable;
124+
}
125+
126+
public Integer getInitialMaxData() {
127+
return initialMaxData;
128+
}
129+
130+
public void setInitialMaxData(Integer initialMaxData) {
131+
this.initialMaxData = initialMaxData;
132+
}
133+
134+
public Integer getRecvQueueLen() {
135+
return recvQueueLen;
136+
}
137+
138+
public void setRecvQueueLen(Integer recvQueueLen) {
139+
this.recvQueueLen = recvQueueLen;
140+
}
141+
142+
public Integer getSendQueueLen() {
143+
return sendQueueLen;
144+
}
145+
146+
public void setSendQueueLen(Integer sendQueueLen) {
147+
this.sendQueueLen = sendQueueLen;
148+
}
149+
150+
public Integer getInitialMaxStreamDataBidiLocal() {
151+
return initialMaxStreamDataBidiLocal;
152+
}
153+
154+
public void setInitialMaxStreamDataBidiLocal(Integer initialMaxStreamDataBidiLocal) {
155+
this.initialMaxStreamDataBidiLocal = initialMaxStreamDataBidiLocal;
156+
}
157+
158+
public Integer getInitialMaxStreamDataBidiRemote() {
159+
return initialMaxStreamDataBidiRemote;
160+
}
161+
162+
public void setInitialMaxStreamDataBidiRemote(Integer initialMaxStreamDataBidiRemote) {
163+
this.initialMaxStreamDataBidiRemote = initialMaxStreamDataBidiRemote;
164+
}
165+
166+
public Integer getInitialMaxStreamDataUni() {
167+
return initialMaxStreamDataUni;
168+
}
169+
170+
public void setInitialMaxStreamDataUni(Integer initialMaxStreamDataUni) {
171+
this.initialMaxStreamDataUni = initialMaxStreamDataUni;
172+
}
173+
174+
public Long getInitialMaxStreamsBidi() {
175+
return initialMaxStreamsBidi;
176+
}
177+
178+
public void setInitialMaxStreamsBidi(Long initialMaxStreamsBidi) {
179+
this.initialMaxStreamsBidi = initialMaxStreamsBidi;
180+
}
181+
182+
public Long getInitialMaxStreamsUni() {
183+
return initialMaxStreamsUni;
184+
}
185+
186+
public void setInitialMaxStreamsUni(Long initialMaxStreamsUni) {
187+
this.initialMaxStreamsUni = initialMaxStreamsUni;
188+
}
189+
190+
public Integer getMaxAckDelayExponent() {
191+
return maxAckDelayExponent;
192+
}
193+
194+
public void setMaxAckDelayExponent(Integer maxAckDelayExponent) {
195+
this.maxAckDelayExponent = maxAckDelayExponent;
196+
}
197+
198+
public Integer getMaxAckDelay() {
199+
return maxAckDelay;
200+
}
201+
202+
public void setMaxAckDelay(Integer maxAckDelay) {
203+
this.maxAckDelay = maxAckDelay;
204+
}
205+
206+
public Boolean getDisableActiveMigration() {
207+
return disableActiveMigration;
208+
}
209+
210+
public void setDisableActiveMigration(Boolean disableActiveMigration) {
211+
this.disableActiveMigration = disableActiveMigration;
212+
}
213+
214+
public Boolean getEnableHystart() {
215+
return enableHystart;
216+
}
217+
218+
public void setEnableHystart(Boolean enableHystart) {
219+
this.enableHystart = enableHystart;
220+
}
221+
222+
public String getCcAlgorithm() {
223+
return ccAlgorithm;
224+
}
225+
226+
public void setCcAlgorithm(String ccAlgorithm) {
227+
this.ccAlgorithm = ccAlgorithm;
228+
}
229+
230+
public void checkDefault() {
231+
if (initialMaxData == null) {
232+
initialMaxData = 1 << 23;
233+
}
234+
if (initialMaxStreamDataBidiLocal == null) {
235+
initialMaxStreamDataBidiLocal = 1 << 20;
236+
}
237+
if (initialMaxStreamDataBidiRemote == null) {
238+
initialMaxStreamDataBidiRemote = 1 << 20;
239+
}
240+
if (initialMaxStreamDataUni == null) {
241+
initialMaxStreamDataUni = 1 << 20;
242+
}
243+
if (initialMaxStreamsBidi == null) {
244+
initialMaxStreamsBidi = (long) 1 << 30;
245+
}
246+
if (initialMaxStreamsUni == null) {
247+
initialMaxStreamsUni = (long) 1 << 30;
248+
}
249+
}
250+
}

0 commit comments

Comments
 (0)