Skip to content

Commit

Permalink
fix typo in dubbo (apache#3937)
Browse files Browse the repository at this point in the history
  • Loading branch information
moriadry authored and vio-lin committed Apr 29, 2019
1 parent ab59888 commit b239402
Show file tree
Hide file tree
Showing 32 changed files with 134 additions and 1,747 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ protected <T> Invoker<T> doSelect(List<Invoker<T>> invokers, URL url, Invocation
leastActive = active;
// Reset the number of least active invokers
leastCount = 1;
// Put the first least active invoker first in leastIndexs
// Put the first least active invoker first in leastIndexes
leastIndexes[0] = i;
// Reset totalWeight
totalWeight = afterWarmup;
Expand All @@ -81,7 +81,7 @@ protected <T> Invoker<T> doSelect(List<Invoker<T>> invokers, URL url, Invocation
sameWeight = true;
// If current invoker's active value equals with leaseActive, then accumulating.
} else if (active == leastActive) {
// Record the index of the least active invoker in leastIndexs order
// Record the index of the least active invoker in leastIndexes order
leastIndexes[leastCount++] = i;
// Accumulate the total weight of the least active invoker
totalWeight += afterWarmup;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void testLeastActiveLoadBalance_select() {
Long count = entry.getValue().get();
// System.out.println(count);
Assertions.assertTrue(
Math.abs(count - runs / (0f + invokers.size())) < runs / (0f + invokers.size()), "abs diff shoud < avg");
Math.abs(count - runs / (0f + invokers.size())) < runs / (0f + invokers.size()), "abs diff should < avg");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void resetInvoker1ToNoException() {
}

@Test
public void testInvokeExceptoin() {
public void testInvokeException() {
Assertions.assertThrows(RpcException.class, () -> {
resetInvoker1ToException();
FailfastClusterInvoker<FailfastClusterInvokerTest> invoker = new FailfastClusterInvoker<FailfastClusterInvokerTest>(dic);
Expand All @@ -90,7 +90,7 @@ public void testInvokeExceptoin() {
}

@Test()
public void testInvokeNoExceptoin() {
public void testInvokeNoException() {

resetInvoker1ToNoException();

Expand Down
4 changes: 0 additions & 4 deletions dubbo-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,5 @@
<groupId>de.ruedigermoeller</groupId>
<artifactId>fst</artifactId>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java-util</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ private String generateMethodContent(Method method) {
code.append(generateExtensionAssignment());

// return statement
code.append(generateReturnAndInovation(method));
code.append(generateReturnAndInvocation(method));
}

return code.toString();
Expand Down Expand Up @@ -292,7 +292,7 @@ private String generateExtensionAssignment() {
/**
* generate method invocation statement and return it if necessary
*/
private String generateReturnAndInovation(Method method) {
private String generateReturnAndInvocation(Method method) {
String returnStatement = method.getReturnType().equals(void.class) ? "" : "return ";

String args = Arrays.stream(method.getParameters()).map(Parameter::getName).collect(Collectors.joining(", "));
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -441,20 +441,20 @@ static void assertEqualsBigPerson(BigPerson person, Object obj) {
assertEqualsPrimitive(person.getInfoProfile().isMale(), infoProfile.getProperty("male"));
}

static void assertEqualsPhone(Phone excpected, Object obj) {
static void assertEqualsPhone(Phone expected, Object obj) {
JavaBeanDescriptor descriptor = (JavaBeanDescriptor) obj;
Assertions.assertTrue(descriptor.isBeanType());
if (excpected.getArea() != null) {
assertEqualsPrimitive(excpected.getArea(), descriptor.getProperty("area"));
if (expected.getArea() != null) {
assertEqualsPrimitive(expected.getArea(), descriptor.getProperty("area"));
}
if (excpected.getCountry() != null) {
assertEqualsPrimitive(excpected.getCountry(), descriptor.getProperty("country"));
if (expected.getCountry() != null) {
assertEqualsPrimitive(expected.getCountry(), descriptor.getProperty("country"));
}
if (excpected.getExtensionNumber() != null) {
assertEqualsPrimitive(excpected.getExtensionNumber(), descriptor.getProperty("extensionNumber"));
if (expected.getExtensionNumber() != null) {
assertEqualsPrimitive(expected.getExtensionNumber(), descriptor.getProperty("extensionNumber"));
}
if (excpected.getNumber() != null) {
assertEqualsPrimitive(excpected.getNumber(), descriptor.getProperty("number"));
if (expected.getNumber() != null) {
assertEqualsPrimitive(expected.getNumber(), descriptor.getProperty("number"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public void testRefreshAll() {

System.setProperty("dubbo.override.address", "system://127.0.0.1:2181");
System.setProperty("dubbo.override.protocol", "system");
// this will not override, use 'key' instread, @Parameter(key="key1", useKeyAsProperty=false)
// this will not override, use 'key' instead, @Parameter(key="key1", useKeyAsProperty=false)
System.setProperty("dubbo.override.key1", "system");
System.setProperty("dubbo.override.key2", "system");

Expand Down
28 changes: 0 additions & 28 deletions dubbo-demo/dubbo-demo-protobuf/dubbo-demo-protobuf-api/pom.xml

This file was deleted.

Loading

0 comments on commit b239402

Please sign in to comment.