This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new bbcb26cae2 Standard code comment format. (#10251)
bbcb26cae2 is described below
commit bbcb26cae2cabb2f5c2c2101eb60ba8ba1f7e454
Author: kefate <[email protected]>
AuthorDate: Fri Jul 1 15:19:53 2022 +0800
Standard code comment format. (#10251)
Co-authored-by: kefate <>
---
.../org/apache/dubbo/common/utils/NetUtils.java | 6 +--
.../apache/dubbo/common/utils/PojoUtilsTest.java | 4 +-
.../java/com/alibaba/dubbo/rpc/RpcContext.java | 2 +-
.../dubbo/qos/command/DefaultCommandExecutor.java | 2 +-
.../registry/integration/DynamicDirectory.java | 2 +-
.../dubbo/registry/dubbo/RegistryProtocolTest.java | 2 +-
.../dubbo/remoting/codec/ExchangeCodecTest.java | 34 ++++++++--------
.../dubbo/remoting/codec/TelnetCodecTest.java | 46 +++++++++++-----------
.../main/java/org/apache/dubbo/rpc/RpcContext.java | 2 +-
.../rpc/protocol/dubbo/CallbackServiceCodec.java | 10 ++---
.../dubbo/ReferenceCountExchangeClient.java | 4 +-
11 files changed, 57 insertions(+), 57 deletions(-)
diff --git
a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/NetUtils.java
b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/NetUtils.java
index 7f1aa86bc1..de2f3f4442 100644
--- a/dubbo-common/src/main/java/org/apache/dubbo/common/utils/NetUtils.java
+++ b/dubbo-common/src/main/java/org/apache/dubbo/common/utils/NetUtils.java
@@ -120,7 +120,7 @@ public class NetUtils {
/**
* Check the port whether is in use in os
- *
+ *
* @param port the port to check if in use
* @return is the given port in use or not
*/
@@ -346,7 +346,7 @@ public class NetUtils {
for(String ignoredInterface: ignoredInterfaces.split(",")){
String trimIgnoredInterface = ignoredInterface.trim();
boolean matched = false;
- try {
+ try {
matched =
networkInterfaceDisplayName.matches(trimIgnoredInterface);
} catch (PatternSyntaxException e) {
// if trimIgnoredInterface is a invalid regular
expression, a PatternSyntaxException will be thrown out
@@ -592,7 +592,7 @@ public class NetUtils {
splitCharacter = SPLIT_IPV6_CHARACTER;
}
String[] mask = pattern.split(splitCharacter);
- //check format of pattern
+ // check format of pattern
checkHostPattern(pattern, mask, isIpv4);
host = inetAddress.getHostAddress();
diff --git
a/dubbo-common/src/test/java/org/apache/dubbo/common/utils/PojoUtilsTest.java
b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/PojoUtilsTest.java
index b093bb2148..ae0f549d2a 100644
---
a/dubbo-common/src/test/java/org/apache/dubbo/common/utils/PojoUtilsTest.java
+++
b/dubbo-common/src/test/java/org/apache/dubbo/common/utils/PojoUtilsTest.java
@@ -707,12 +707,12 @@ public class PojoUtilsTest {
String dateTimeStr = "2018-09-12 10:12:33";
String[] dateFormat = new String[]{"yyyy-MM-dd HH:mm:ss",
"yyyy-MM-dd", "HH:mm:ss"};
- //java.util.Date
+ // java.util.Date
Object date = PojoUtils.realize(dateTimeStr, Date.class, (Type)
Date.class);
assertEquals(Date.class, date.getClass());
assertEquals(dateTimeStr, new
SimpleDateFormat(dateFormat[0]).format(date));
- //java.sql.Time
+ // java.sql.Time
Object time = PojoUtils.realize(dateTimeStr, java.sql.Time.class,
(Type) java.sql.Time.class);
assertEquals(java.sql.Time.class, time.getClass());
assertEquals(timeStr, new
SimpleDateFormat(dateFormat[2]).format(time));
diff --git
a/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
b/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
index 08cc64760a..63f1ef0730 100644
--- a/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
+++ b/dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/RpcContext.java
@@ -314,7 +314,7 @@ public class RpcContext {
try {
setAttachment(Constants.ASYNC_KEY, Boolean.TRUE.toString());
final T o = callable.call();
- //local invoke will return directly
+ // local invoke will return directly
if (o != null) {
FutureTask<T> f = new FutureTask<T>(new Callable<T>() {
@Override
diff --git
a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/DefaultCommandExecutor.java
b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/DefaultCommandExecutor.java
index e499e1364c..456e188dd5 100644
---
a/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/DefaultCommandExecutor.java
+++
b/dubbo-plugin/dubbo-qos/src/main/java/org/apache/dubbo/qos/command/DefaultCommandExecutor.java
@@ -29,7 +29,7 @@ public class DefaultCommandExecutor implements
CommandExecutor {
String extName =
StringUtils.camelToSplitName(commandContext.getCommandName(),
PROPERTIES_CHAR_SEPARATOR);
command =
ExtensionLoader.getExtensionLoader(BaseCommand.class).getExtension(extName);
} catch (Throwable throwable) {
- //can't find command
+ // can't find command
}
if (command == null) {
throw new NoSuchCommandException(commandContext.getCommandName());
diff --git
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/DynamicDirectory.java
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/DynamicDirectory.java
index 8afd608b4f..0fe03d3e55 100644
---
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/DynamicDirectory.java
+++
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/integration/DynamicDirectory.java
@@ -239,7 +239,7 @@ public abstract class DynamicDirectory<T> extends
AbstractDirectory<T> implement
// unsubscribe.
try {
if (getSubscribeConsumerurl() != null && registry != null &&
registry.isAvailable()) {
- //overwrite by child, so need call function
+ // overwrite by child, so need call function
unSubscribe(getSubscribeConsumerurl());
}
} catch (Throwable t) {
diff --git
a/dubbo-registry/dubbo-registry-default/src/test/java/org/apache/dubbo/registry/dubbo/RegistryProtocolTest.java
b/dubbo-registry/dubbo-registry-default/src/test/java/org/apache/dubbo/registry/dubbo/RegistryProtocolTest.java
index 5cbcd8d1ad..329652b233 100644
---
a/dubbo-registry/dubbo-registry-default/src/test/java/org/apache/dubbo/registry/dubbo/RegistryProtocolTest.java
+++
b/dubbo-registry/dubbo-registry-default/src/test/java/org/apache/dubbo/registry/dubbo/RegistryProtocolTest.java
@@ -123,7 +123,7 @@ public class RegistryProtocolTest {
newRegistryUrl, new ExchangeClient[] {new
MockedClient("10.20.20.20", 2222, true)});
Exporter<DemoService> exporter = registryProtocol.export(invoker);
Exporter<DemoService> exporter2 = registryProtocol.export(invoker);
- //The same invoker, exporter that multiple exported are different
+ // The same invoker, exporter that multiple exported are different
Assertions.assertNotSame(exporter, exporter2);
exporter.unexport();
exporter2.unexport();
diff --git
a/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java
b/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java
index d801c649fc..b87147b35f 100644
---
a/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java
+++
b/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/ExchangeCodecTest.java
@@ -74,7 +74,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
private Object decode(byte[] request) throws IOException {
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(request);
AbstractMockChannel channel = getServerSideChannel(url);
- //decode
+ // decode
Object obj = codec.decode(channel, buffer);
return obj;
}
@@ -146,17 +146,17 @@ public class ExchangeCodecTest extends TelnetCodecTest {
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(join(request,
baddata));
Response obj = (Response) codec.decode(channel, buffer);
Assertions.assertEquals(person, obj.getResult());
- //only decode necessary bytes
+ // only decode necessary bytes
Assertions.assertEquals(request.length, buffer.readerIndex());
}
@Test
public void test_Decode_Error_Response_Object() throws IOException {
- //00000010-response/oneway/hearbeat=true |20-stats=ok|id=0|length=0
+ // 00000010-response/oneway/hearbeat=true |20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, 0x02, 20, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0};
Person person = new Person();
byte[] request = getRequestBytes(person, header);
- //bad object
+ // bad object
byte[] badbytes = new byte[]{-1, -2, -3, -4, -3, -4, -3, -4, -3, -4,
-3, -4};
System.arraycopy(badbytes, 0, request, 21, badbytes.length);
@@ -220,13 +220,13 @@ public class ExchangeCodecTest extends TelnetCodecTest {
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(header);
Object obj = codec.decode(channel, buffer);
Assertions.assertEquals(TelnetCodec.DecodeResult.NEED_MORE_INPUT, obj);
- //If the telnet data and request data are in the same data packet, we
should guarantee that the receipt of request data won't be affected by the
factor that telnet does not have an end characters.
+ // If the telnet data and request data are in the same data packet, we
should guarantee that the receipt of request data won't be affected by the
factor that telnet does not have an end characters.
Assertions.assertEquals(2, buffer.readerIndex());
}
@Test
public void test_Decode_Return_Response_Person() throws IOException {
- //00000010-response/oneway/hearbeat=false/hessian
|20-stats=ok|id=0|length=0
+ // 00000010-response/oneway/hearbeat=false/hessian
|20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, 2, 20, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0};
Person person = new Person();
byte[] request = getRequestBytes(person, header);
@@ -249,7 +249,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
@Test
public void test_Decode_Return_Request_Event_Object() throws IOException {
- //|10011111|20-stats=ok|id=0|length=0
+ // |10011111|20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, (byte) 0xe2, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
Person person = new Person();
byte[] request = getRequestBytes(person, header);
@@ -266,7 +266,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
@Test
public void test_Decode_Return_Request_Event_String() throws IOException {
- //|10011111|20-stats=ok|id=0|length=0
+ // |10011111|20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, (byte) 0xe2, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
String event = READONLY_EVENT;
byte[] request = getRequestBytes(event, header);
@@ -281,7 +281,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
@Test
public void test_Decode_Return_Request_Heartbeat_Object() throws
IOException {
- //|10011111|20-stats=ok|id=0|length=0
+ // |10011111|20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, (byte) 0xe2, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
byte[] request = getRequestBytes(null, header);
Request obj = (Request) decode(request);
@@ -294,7 +294,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
@Test
public void test_Decode_Return_Request_Object() throws IOException {
- //|10011111|20-stats=ok|id=0|length=0
+ // |10011111|20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, (byte) 0xc2, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
Person person = new Person();
byte[] request = getRequestBytes(person, header);
@@ -309,11 +309,11 @@ public class ExchangeCodecTest extends TelnetCodecTest {
@Test
public void test_Decode_Error_Request_Object() throws IOException {
- //00000010-response/oneway/hearbeat=true |20-stats=ok|id=0|length=0
+ // 00000010-response/oneway/hearbeat=true |20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, (byte) 0xe2, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
Person person = new Person();
byte[] request = getRequestBytes(person, header);
- //bad object
+ // bad object
byte[] badbytes = new byte[]{-1, -2, -3, -4, -3, -4, -3, -4, -3, -4,
-3, -4};
System.arraycopy(badbytes, 0, request, 21, badbytes.length);
@@ -324,7 +324,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
@Test
public void test_Header_Response_NoSerializationFlag() throws IOException {
- //00000010-response/oneway/hearbeat=false/noset
|20-stats=ok|id=0|length=0
+ // 00000010-response/oneway/hearbeat=false/noset
|20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, (byte) 0x02, 20, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
Person person = new Person();
byte[] request = getRequestBytes(person, header);
@@ -337,7 +337,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
@Test
public void test_Header_Response_Heartbeat() throws IOException {
- //00000010-response/oneway/hearbeat=true |20-stats=ok|id=0|length=0
+ // 00000010-response/oneway/hearbeat=true |20-stats=ok|id=0|length=0
byte[] header = new byte[]{MAGIC_HIGH, MAGIC_LOW, 0x02, 20, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0};
Person person = new Person();
byte[] request = getRequestBytes(person, header);
@@ -358,7 +358,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
codec.encode(channel, encodeBuffer, request);
- //encode resault check need decode
+ // encode resault check need decode
byte[] data = new byte[encodeBuffer.writerIndex()];
encodeBuffer.readBytes(data);
ChannelBuffer decodeBuffer = ChannelBuffers.wrappedBuffer(data);
@@ -385,7 +385,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
byte[] data = new byte[encodeBuffer.writerIndex()];
encodeBuffer.readBytes(data);
- //encode resault check need decode
+ // encode resault check need decode
ChannelBuffer decodeBuffer = ChannelBuffers.wrappedBuffer(data);
Response obj = (Response) codec.decode(channel, decodeBuffer);
@@ -416,7 +416,7 @@ public class ExchangeCodecTest extends TelnetCodecTest {
byte[] data = new byte[encodeBuffer.writerIndex()];
encodeBuffer.readBytes(data);
- //encode resault check need decode
+ // encode result check need decode
ChannelBuffer decodeBuffer = ChannelBuffers.wrappedBuffer(data);
Response obj = (Response) codec.decode(channel, decodeBuffer);
Assertions.assertEquals(response.getId(), obj.getId());
diff --git
a/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java
b/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java
index 8b16c1bfaa..f52521244e 100644
---
a/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java
+++
b/dubbo-remoting/dubbo-remoting-api/src/test/java/org/apache/dubbo/remoting/codec/TelnetCodecTest.java
@@ -81,7 +81,7 @@ public class TelnetCodecTest {
bytes = (byte[]) obj;
} else {
try {
- //object to bytearray
+ // object to bytearray
ByteArrayOutputStream bo = new ByteArrayOutputStream();
ObjectOutputStream oo = new ObjectOutputStream(bo);
oo.writeObject(obj);
@@ -109,19 +109,19 @@ public class TelnetCodecTest {
}
protected void testDecode_assertEquals(byte[] request, Object ret, boolean
isServerside) throws IOException {
- //init channel
+ // init channel
Channel channel = isServerside ? getServerSideChannel(url) :
getCliendSideChannel(url);
- //init request string
+ // init request string
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(request);
- //decode
+ // decode
Object obj = codec.decode(channel, buffer);
Assertions.assertEquals(ret, obj);
}
protected void testEecode_assertEquals(Object request, byte[] ret, boolean
isServerside) throws IOException {
- //init channel
+ // init channel
Channel channel = isServerside ? getServerSideChannel(url) :
getCliendSideChannel(url);
ChannelBuffer buffer = ChannelBuffers.dynamicBuffer(1024);
@@ -147,7 +147,7 @@ public class TelnetCodecTest {
}
private void testDecode_assertEquals(AbstractMockChannel channel, Object
request, Object expectret, Object channelReceive) throws IOException {
- //init channel
+ // init channel
if (channel == null) {
channel = getServerSideChannel(url);
}
@@ -155,21 +155,21 @@ public class TelnetCodecTest {
byte[] buf = objectToByte(request);
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(buf);
- //decode
+ // decode
Object obj = codec.decode(channel, buffer);
Assertions.assertEquals(expectret, obj);
Assertions.assertEquals(channelReceive, channel.getReceivedMessage());
}
private void testDecode_PersonWithEnterByte(byte[] enterbytes, boolean
isNeedmore) throws IOException {
- //init channel
+ // init channel
Channel channel = getServerSideChannel(url);
- //init request string
+ // init request string
Person request = new Person();
byte[] newbuf = join(objectToByte(request), enterbytes);
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(newbuf);
- //decode
+ // decode
Object obj = codec.decode(channel, buffer);
if (isNeedmore) {
Assertions.assertEquals(Codec2.DecodeResult.NEED_MORE_INPUT, obj);
@@ -179,11 +179,11 @@ public class TelnetCodecTest {
}
private void testDecode_WithExitByte(byte[] exitbytes, boolean
isChannelClose) throws IOException {
- //init channel
+ // init channel
Channel channel = getServerSideChannel(url);
ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(exitbytes);
- //decode
+ // decode
codec.decode(channel, buffer);
Assertions.assertEquals(isChannelClose, channel.isClosed());
}
@@ -304,26 +304,26 @@ public class TelnetCodecTest {
public void testEncode_String_ClientSide() throws IOException {
testEecode_assertEquals("aaa", "aaa\r\n".getBytes(), false);
}
-
+
/*@Test()
public void testDecode_History_UP_DOWN_MULTI() throws IOException{
AbstractMockChannel channel = getServerSideChannel(url);
-
- String request1 = "aaa\n";
+
+ String request1 = "aaa\n";
Object expected1 = request1.replace("\n", "");
- //init history
+ //init history
testDecode_assertEquals(channel, request1, expected1, null);
-
- String request2 = "bbb\n";
+
+ String request2 = "bbb\n";
Object expected2 = request2.replace("\n", "");
- //init history
+ //init history
testDecode_assertEquals(channel, request2, expected2, null);
-
- String request3 = "ccc\n";
+
+ String request3 = "ccc\n";
Object expected3= request3.replace("\n", "");
- //init history
+ //init history
testDecode_assertEquals(channel, request3, expected3, null);
-
+
byte[] UP = new byte[] {27, 91, 65};
byte[] DOWN = new byte[] {27, 91, 66};
//history[aaa,bbb,ccc]
diff --git
a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java
b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java
index 8077067378..f6395ed3d6 100644
--- a/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java
+++ b/dubbo-rpc/dubbo-rpc-api/src/main/java/org/apache/dubbo/rpc/RpcContext.java
@@ -727,7 +727,7 @@ public class RpcContext {
try {
setAttachment(ASYNC_KEY, Boolean.TRUE.toString());
final T o = callable.call();
- //local invoke will return directly
+ // local invoke will return directly
if (o != null) {
if (o instanceof CompletableFuture) {
return (CompletableFuture<T>) o;
diff --git
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java
index 3b870682aa..4ec1d9e2dc 100644
---
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java
+++
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/CallbackServiceCodec.java
@@ -114,7 +114,7 @@ class CallbackServiceCodec {
}
}
tmpMap.putAll(params);
-
+
tmpMap.remove(VERSION_KEY);// doesn't need to distinguish version for
callback
tmpMap.remove(Constants.BIND_PORT_KEY); //callback doesn't needs
bind.port
tmpMap.put(INTERFACE_KEY, clazz.getName());
@@ -173,8 +173,8 @@ class CallbackServiceCodec {
channel.setAttribute(invokerCacheKey, invoker);
increaseInstanceCount(channel, countkey);
- //convert error fail fast .
- //ignore concurrent problem.
+ // convert error fail fast .
+ // ignore concurrent problem.
Set<Invoker<?>> callbackInvokers = (Set<Invoker<?>>)
channel.getAttribute(CHANNEL_CALLBACK_KEY);
if (callbackInvokers == null) {
callbackInvokers = new ConcurrentHashSet<>(1);
@@ -229,7 +229,7 @@ class CallbackServiceCodec {
Integer count = (Integer) channel.getAttribute(isServer ?
getServerSideCountKey(channel, interfaceClass) :
getClientSideCountKey(interfaceClass));
int limit = url.getParameter(CALLBACK_INSTANCES_LIMIT_KEY,
DEFAULT_CALLBACK_INSTANCES);
if (count != null && count >= limit) {
- //client side error
+ // client side error
throw new IllegalStateException("interface " + interfaceClass + "
`s callback instances num exceed providers limit :" + limit
+ " ,current num: " + (count + 1) + ". The new callback
service will not work !!! you can cancle the callback service which exported
before. channel :" + channel);
} else {
@@ -239,7 +239,7 @@ class CallbackServiceCodec {
private static void increaseInstanceCount(Channel channel, String
countkey) {
try {
- //ignore concurrent problem?
+ // ignore concurrent problem?
Integer count = (Integer) channel.getAttribute(countkey);
if (count == null) {
count = 1;
diff --git
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClient.java
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClient.java
index 04f1557462..a2bded10bd 100644
---
a/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClient.java
+++
b/dubbo-rpc/dubbo-rpc-dubbo/src/main/java/org/apache/dubbo/rpc/protocol/dubbo/ReferenceCountExchangeClient.java
@@ -208,9 +208,9 @@ final class ReferenceCountExchangeClient implements
ExchangeClient {
if (!(client instanceof LazyConnectExchangeClient)) {
// this is a defensive operation to avoid client is closed by
accident, the initial state of the client is false
URL lazyUrl = url.addParameter(LAZY_CONNECT_INITIAL_STATE_KEY,
Boolean.TRUE)
- //.addParameter(RECONNECT_KEY, Boolean.FALSE)
+ // .addParameter(RECONNECT_KEY, Boolean.FALSE)
.addParameter(SEND_RECONNECT_KEY, Boolean.TRUE.toString());
-
//.addParameter(LazyConnectExchangeClient.REQUEST_WITH_WARNING_KEY, true);
+ //
.addParameter(LazyConnectExchangeClient.REQUEST_WITH_WARNING_KEY, true);
client = new LazyConnectExchangeClient(lazyUrl,
client.getExchangeHandler());
}
}