Skip to content

Commit

Permalink
Fixes apache#3570, NoSuchMethodError are thrown when add custorm Filt…
Browse files Browse the repository at this point in the history
…er using dubbo2.6.5 and JDK1.6 and upgrade to dubbo2.7.0
  • Loading branch information
chickenlj committed Mar 8, 2019
1 parent 42646d7 commit 696b321
Showing 1 changed file with 12 additions and 6 deletions.
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

0 comments on commit 696b321

Please sign in to comment.