Skip to content
Merged
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
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,5 @@ allow = [
"Verticle",
"verticle",
"VERTICLE",
"Prelease",
]
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public class URLEndPoint {

private final boolean sslEnabled;

private final Map<String, List<String>> querys;
private final Map<String, List<String>> queries;

private final String hostOrIp;

Expand All @@ -49,7 +49,7 @@ public URLEndPoint(String endpoint) {
throw new IllegalArgumentException("port not specified.");
}
port = uri.getPort();
querys = splitQuery(uri);
queries = splitQuery(uri);
if (endpoint.contains(HTTPS_KEY)) {
sslEnabled = true;
} else {
Expand All @@ -68,7 +68,7 @@ public static Map<String, List<String>> splitQuery(URI uri) {
}

public String getFirst(String key) {
List<String> values = querys.get(key);
List<String> values = queries.get(key);
if (values == null) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ public ConfigurableDatetimeAccessItem(String config) {
"wrong format of configuration, \"PATTERN|TIMEZONE|LOCALE\" is expected, but actually is \"" + config + "\"");
}

setConfigruations(configArr);
setConfigurations(configArr);
}

private String[] splitConfig(String config) {
return config.split("\\|{1}?", -1);
}

private void setConfigruations(String[] configArr) {
private void setConfigurations(String[] configArr) {
this.pattern = StringUtils.isEmpty(configArr[0]) ? DEFAULT_DATETIME_PATTERN : configArr[0];
this.timezone = StringUtils.isEmpty(configArr[1]) ? TimeZone.getDefault() : TimeZone.getTimeZone(configArr[1]);
this.locale = StringUtils.isEmpty(configArr[2]) ? DEFAULT_LOCALE : Locale.forLanguageTag(configArr[2]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public class RequestRootSerializer {

private final boolean isWrap;

public RequestRootSerializer(RootSerializer serializer, boolean isWrapp, boolean noTypesInfo) {
public RequestRootSerializer(RootSerializer serializer, boolean isWrap, boolean noTypesInfo) {
this.rootSerializer = serializer;
this.noTypesInfo = noTypesInfo;
this.isWrap = isWrapp;
this.isWrap = isWrap;
}

@SuppressWarnings("unchecked")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public class ResponseRootSerializer {

private final boolean isWrap;

public ResponseRootSerializer(RootSerializer serializer, boolean isWrapp, boolean noTypesInfo) {
public ResponseRootSerializer(RootSerializer serializer, boolean isWrap, boolean noTypesInfo) {
this.rootSerializer = serializer;
this.noTypesInfo = noTypesInfo;
this.isWrap = isWrapp;
this.isWrap = isWrap;
}

public byte[] serialize(Object value) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ private RestConst() {
public static final String BODY_PARAMETER = "servicecomb-body";

//in invocation response
public static final String INVOCATION_HANDLER_RESPONSE = "servicecomb-invocation-hanlder-response";
public static final String INVOCATION_HANDLER_RESPONSE = "servicecomb-invocation-handler-response";

//in invocation response
public static final String INVOCATION_HANDLER_PROCESSOR = "servicecomb-invocation-hanlder-processor";
public static final String INVOCATION_HANDLER_PROCESSOR = "servicecomb-invocation-handler-processor";

//in invocation response
public static final String INVOCATION_HANDLER_REQUESTCLIENT = "servicecomb-invocation-hanlder-requestclient";
public static final String INVOCATION_HANDLER_REQUESTCLIENT = "servicecomb-invocation-handler-requestclient";

public static final String REST_PRODUCER_INVOCATION = "servicecomb-rest-producer-invocation";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
public class TestRestObjectMapper {

@Test
public void testFormateDate() throws Exception {
public void testFormatDate() throws Exception {
RestObjectMapper mapper = new RestObjectMapper();
// must read/write ISO 8061 dates
Date date = mapper.readValue("\"2017-07-21T17:32:28Z\"".getBytes(), Date.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void fastFail(Callable<?> callable, Class<?> eCls) {
long start = System.currentTimeMillis();
try {
Object ret = callable.call();
Assertions.fail("expect failed, but succes to be " + ret);
Assertions.fail("expect failed, but success to be " + ret);
} catch (AssertionError e) {
throw e;
} catch (Throwable e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public class URIEndpointObject extends IpPort {

private boolean websocketEnabled;

private final Map<String, List<String>> querys;
private final Map<String, List<String>> queries;

private final String schema;

Expand All @@ -58,7 +58,7 @@ public URIEndpointObject(String endpoint) {
throw new IllegalArgumentException("port not specified.");
}
setPort(uri.getPort());
querys = splitQuery(uri);
queries = splitQuery(uri);
sslEnabled = Boolean.parseBoolean(getFirst(SSL_ENABLED_KEY));
websocketEnabled = Boolean.parseBoolean(getFirst(WEBSOCKET_ENABLED_KEY));
String httpVersion = getFirst(PROTOCOL_KEY);
Expand Down Expand Up @@ -94,11 +94,11 @@ public String getSchema() {
}

public List<String> getQuery(String key) {
return querys.get(key);
return queries.get(key);
}

public String getFirst(String key) {
List<String> values = querys.get(key);
List<String> values = queries.get(key);
// it's impossible that values is not null and size is 0
if (values == null) {
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ public void testQueryChineseAndSpaceAndEmpty() throws UnsupportedEncodingExcepti
"cse://1.1.1.1:1234/abc?a=1&b=&country=" + URLEncoder.encode("中 国", StandardCharsets.UTF_8.name());
URIEndpointObject ep = new URIEndpointObject(strUri);

Map<String, List<String>> querys = Deencapsulation.getField(ep, "querys");
Assertions.assertEquals(3, querys.size());
Map<String, List<String>> queries = Deencapsulation.getField(ep, "queries");
Assertions.assertEquals(3, queries.size());

Assertions.assertEquals(1, ep.getQuery("a").size());
Assertions.assertEquals("1", ep.getFirst("a"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ public String query(@QueryParam(value = "query") String query) {

@Path(value = "queryComplex")
@GET
public String queryComplex(@QueryParam(value = "querys") List<User> querys) {
return String.format("%s", querys);
public String queryComplex(@QueryParam(value = "queries") List<User> queries) {
return String.format("%s", queries);
}

@Operation(summary = "")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ paths:
get:
operationId: queryComplex
parameters:
- name: querys
- name: queries
in: query
schema:
type: array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public void testClassMethodNoPath() {
}

@Test
public void testClassMethodNoHttpMetod() {
public void testClassMethodNoHttpMethod() {
UnitTestSwaggerUtils
.testSwagger("schemas/requestMappingHttpMethod.yaml", ClassMethodNoHttpMethod.class, "noHttpMethod");
}
Expand Down
Loading