Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Dubbo-3570], repackage compatible enhancement. #3622

Merged
merged 3 commits into from
Mar 11, 2019
Merged
Changes from 1 commit
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
18 changes: 12 additions & 6 deletions dubbo-compatible/src/main/java/com/alibaba/dubbo/rpc/Invoker.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@

package com.alibaba.dubbo.rpc;

import org.apache.dubbo.common.URL;
import com.alibaba.dubbo.common.URL;

@Deprecated
public interface Invoker<T> extends org.apache.dubbo.rpc.Invoker<T> {

@Override
Result invoke(org.apache.dubbo.rpc.Invocation invocation) throws RpcException;
Result invoke(Invocation invocation) throws RpcException;

URL getUrl();

default org.apache.dubbo.rpc.Invoker<T> getOriginal() {
return null;
Expand All @@ -43,13 +44,18 @@ public Class<T> getInterface() {
}

@Override
public Result invoke(org.apache.dubbo.rpc.Invocation invocation) throws RpcException {
return new Result.CompatibleResult(invoker.invoke(((Invocation) invocation).getOriginal()));
public org.apache.dubbo.rpc.Result invoke(org.apache.dubbo.rpc.Invocation invocation) throws org.apache.dubbo.rpc.RpcException {
return invoker.invoke(invocation);
}

@Override
public Result invoke(Invocation invocation) throws RpcException {
return new Result.CompatibleResult(invoker.invoke(invocation.getOriginal()));
}

@Override
public URL getUrl() {
return invoker.getUrl();
return new URL(invoker.getUrl());
}

@Override
Expand Down