Skip to content

Commit 88d64d5

Browse files
committed
Delete dubbo1 rpc protocol copatipable logic
1 parent 8aac289 commit 88d64d5

File tree

1 file changed

+2
-4
lines changed
  • dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo

1 file changed

+2
-4
lines changed

dubbo-rpc/dubbo-rpc-default/src/main/java/com/alibaba/dubbo/rpc/protocol/dubbo/DubboProtocol.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ public class DubboProtocol extends AbstractProtocol {
5959

6060
public static final String NAME = "dubbo";
6161

62-
public static final String COMPATIBLE_CODEC_NAME = "dubbo1compatible";
63-
6462
public static final int DEFAULT_PORT = 20880;
6563
private static final String IS_CALLBACK_SERVICE_INVOKE = "_isCallBackServiceInvoke";
6664
private static DubboProtocol INSTANCE;
@@ -271,7 +269,7 @@ private ExchangeServer createServer(URL url) {
271269
if (str != null && str.length() > 0 && !ExtensionLoader.getExtensionLoader(Transporter.class).hasExtension(str))
272270
throw new RpcException("Unsupported server type: " + str + ", url: " + url);
273271

274-
url = url.addParameter(Constants.CODEC_KEY, Version.isCompatibleVersion() ? COMPATIBLE_CODEC_NAME : DubboCodec.NAME);
272+
url = url.addParameter(Constants.CODEC_KEY, DubboCodec.NAME);
275273
ExchangeServer server;
276274
try {
277275
server = Exchangers.bind(url, requestHandler);
@@ -349,7 +347,7 @@ private ExchangeClient initClient(URL url) {
349347

350348
String version = url.getParameter(Constants.DUBBO_VERSION_KEY);
351349
boolean compatible = (version != null && version.startsWith("1.0."));
352-
url = url.addParameter(Constants.CODEC_KEY, Version.isCompatibleVersion() && compatible ? COMPATIBLE_CODEC_NAME : DubboCodec.NAME);
350+
url = url.addParameter(Constants.CODEC_KEY, DubboCodec.NAME);
353351
//默认开启heartbeat
354352
url = url.addParameterIfAbsent(Constants.HEARTBEAT_KEY, String.valueOf(Constants.DEFAULT_HEARTBEAT));
355353

0 commit comments

Comments
 (0)