Skip to content

Commit 945f470

Browse files
chore: fix typos (#4608)
1 parent 4ae1f3e commit 945f470

File tree

10 files changed

+28
-28
lines changed

10 files changed

+28
-28
lines changed

core/src/main/java/org/apache/servicecomb/core/provider/producer/ProducerProviderManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ public SchemaMeta registerSchema(String schemaId, Class<?> schemaInterface, Obje
120120
}
121121

122122
// This is special requirement by users: When service deployed in tomcat,user want to use RestTemplate to
123-
// call REST service by the full url. e.g. restTemplate.getForObejct("cse://serviceName/root/prefix/health")
124-
// By default, user's do not need context prefix, e.g. restTemplate.getForObejct("cse://serviceName/health")
123+
// call REST service by the full url. e.g. restTemplate.getForObject("cse://serviceName/root/prefix/health")
124+
// By default, user's do not need context prefix, e.g. restTemplate.getForObject("cse://serviceName/health")
125125
private void registerUrlPrefixToSwagger(OpenAPI swagger) {
126126
String urlPrefix = ClassLoaderScopeContext.getClassLoaderScopeProperty(DefinitionConst.URL_PREFIX);
127127
if (!StringUtils.isEmpty(urlPrefix) && !SwaggerUtils.getBasePath(swagger).startsWith(urlPrefix)

core/src/test/java/org/apache/servicecomb/core/TestException.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,32 @@
2525
public class TestException {
2626
@Test
2727
public void testCseException() {
28-
CseException oExeception = new CseException("500", "InternalServerError");
29-
Assertions.assertEquals("500", oExeception.getCode());
28+
CseException oException = new CseException("500", "InternalServerError");
29+
Assertions.assertEquals("500", oException.getCode());
3030
Assertions.assertEquals("ServiceDefinitionException Code:500, Message:InternalServerError",
31-
oExeception.toString());
31+
oException.toString());
3232

33-
oExeception = new CseException("503", "OwnException", new Throwable());
34-
Assertions.assertEquals("503", oExeception.getCode());
33+
oException = new CseException("503", "OwnException", new Throwable());
34+
Assertions.assertEquals("503", oException.getCode());
3535
}
3636

3737
@Test
3838
public void testExceptionUtils() {
39-
CseException oExeception = ExceptionUtils
39+
CseException oException = ExceptionUtils
4040
.createCseException("servicecomb.handler.ref.not.exist", new String("test"));
41-
Assertions.assertEquals("servicecomb.handler.ref.not.exist", oExeception.getCode());
41+
Assertions.assertEquals("servicecomb.handler.ref.not.exist", oException.getCode());
4242

43-
oExeception =
43+
oException =
4444
ExceptionUtils.createCseException("servicecomb.handler.ref.not.exist", new Throwable(), new String("test"));
45-
Assertions.assertEquals("servicecomb.handler.ref.not.exist", oExeception.getCode());
45+
Assertions.assertEquals("servicecomb.handler.ref.not.exist", oException.getCode());
4646

47-
oExeception = ExceptionUtils.producerOperationNotExist("servicecomb.error", "unit-testing");
48-
Assertions.assertEquals("servicecomb.producer.operation.not.exist", oExeception.getCode());
47+
oException = ExceptionUtils.producerOperationNotExist("servicecomb.error", "unit-testing");
48+
Assertions.assertEquals("servicecomb.producer.operation.not.exist", oException.getCode());
4949

50-
oExeception = ExceptionUtils.handlerRefNotExist("servicecomb.double.error");
51-
Assertions.assertEquals("servicecomb.handler.ref.not.exist", oExeception.getCode());
50+
oException = ExceptionUtils.handlerRefNotExist("servicecomb.double.error");
51+
Assertions.assertEquals("servicecomb.handler.ref.not.exist", oException.getCode());
5252

53-
oExeception = ExceptionUtils.lbAddressNotFound("microServiceName", "my rule my world", "transportChannel");
54-
Assertions.assertEquals("servicecomb.lb.no.available.address", oExeception.getCode());
53+
oException = ExceptionUtils.lbAddressNotFound("microServiceName", "my rule my world", "transportChannel");
54+
Assertions.assertEquals("servicecomb.lb.no.available.address", oException.getCode());
5555
}
5656
}

foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/base/ServiceCombConstants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public interface ServiceCombConstants {
3030

3131
String DEFAULT_TRACING_COLLECTOR_ADDRESS = "http://127.0.0.1:9411";
3232

33-
String CONFIG_KEY_SPLITER = "_";
33+
String CONFIG_KEY_SPLITTER = "_";
3434

3535
String CONFIG_FRAMEWORK_DEFAULT_NAME = "servicecomb-java-chassis";
3636

foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/config/PaaSResourceUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public static List<Resource> getSortedResources(String locationPattern, String s
118118
return resList;
119119
}
120120

121-
public static List<Resource> getSortedPorperties(String locationPattern) {
121+
public static List<Resource> getSortedProperties(String locationPattern) {
122122
return getSortedResources(locationPattern, PROPERTIES_SUFFIX);
123123
}
124124

foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/config/impl/PropertiesLoader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public List<Resource> getFoundResList() {
4040
public <T> T load() throws Exception {
4141
Properties props = new Properties();
4242
for (String locationPattern : locationPatternList) {
43-
List<Resource> resList = PaaSResourceUtils.getSortedPorperties(locationPattern);
43+
List<Resource> resList = PaaSResourceUtils.getSortedProperties(locationPattern);
4444
foundResList.addAll(resList);
4545
PaaSPropertiesLoaderUtils.fillAllProperties(props, resList);
4646
}

foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/net/NetUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public static IpPort parseIpPort(String scheme, String authority) {
262262
/**
263263
* 对于配置为0.0.0.0的地址,let it go
264264
* schema, e.g. http
265-
* adddress, e.g 0.0.0.0:8080
265+
* address, e.g 0.0.0.0:8080
266266
* return 实际监听的地址
267267
*/
268268
public static String getRealListenAddress(String schema, String address) {

foundations/foundation-common/src/test/java/org/apache/servicecomb/foundation/common/utils/TestFileNameTooLong.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ public void assertFileNotTooLong() {
5555
Assertions.assertTrue(names.isEmpty());
5656
}
5757

58-
private static void findLongFileName(File folder, List<String> holder, int baseLenght) {
58+
private static void findLongFileName(File folder, List<String> holder, int baseLength) {
5959
if (folder.isFile()) {
60-
if (folder.getAbsolutePath().length() >= MAN_FILE_SIZE + baseLenght) {
60+
if (folder.getAbsolutePath().length() >= MAN_FILE_SIZE + baseLength) {
6161
holder.add(folder.getAbsolutePath());
6262
}
6363
} else if (folder.isDirectory() && !"target".equals(folder.getName())) {
6464
File[] children = folder.listFiles();
6565
for (File child : children) {
66-
findLongFileName(child, holder, baseLenght);
66+
findLongFileName(child, holder, baseLength);
6767
}
6868
} else {
6969
return;

foundations/foundation-ssl/src/main/java/org/apache/servicecomb/foundation/ssl/SSLManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ public static SSLServerSocket createSSLServerSocket(SSLOption option,
171171
setClientAuth(option, socket);
172172
return socket;
173173
} catch (UnknownHostException e) {
174-
throw new IllegalArgumentException("unkown host");
174+
throw new IllegalArgumentException("unknown host");
175175
} catch (IOException e) {
176176
throw new IllegalArgumentException("unable create socket");
177177
}

foundations/foundation-ssl/src/main/java/org/apache/servicecomb/foundation/ssl/TrustManagerExt.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ private void checkCNHost(X509Certificate[] chain, String ip) throws CertificateE
189189
}
190190
}
191191
} catch (SocketException e) {
192-
throw new CertificateException("Get local adrress fail.");
192+
throw new CertificateException("Get local address fail.");
193193
}
194194
} else if (cnValid(cns, ipTmp)) {
195195
return;

foundations/foundation-ssl/src/test/java/org/apache/servicecomb/foundation/ssl/SSLOptionTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ public void testSSLOptionYamlOption2() throws Exception {
213213
}
214214

215215
@Test
216-
public void testSSLOptionYamlOptionWithProperyFalse() throws Exception {
216+
public void testSSLOptionYamlOptionWithPropertyFalse() throws Exception {
217217
Mockito.when(environment.getProperty("ssl.authPeer")).thenReturn("false");
218218

219219
SSLOption option = SSLOption.build("server", environment);
@@ -225,7 +225,7 @@ public void testSSLOptionYamlOptionWithProperyFalse() throws Exception {
225225
}
226226

227227
@Test
228-
public void testSSLOptionYamlOptionWithProperyTrue() throws Exception {
228+
public void testSSLOptionYamlOptionWithPropertyTrue() throws Exception {
229229
SSLOption option = SSLOption.build("server", environment);
230230

231231
boolean authPeer = option.isAuthPeer();

0 commit comments

Comments
 (0)