Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,6 @@ public <T> T getProxy(Invoker<T> invoker, boolean generic) throws RpcException {

Class<?> realInterfaceClass = null;
if (generic) {
try {
// find the real interface from url
String realInterface = invoker.getUrl().getParameter(Constants.INTERFACE);
realInterfaceClass = ReflectUtils.forName(classLoader, realInterface);
interfaces.add(realInterfaceClass);
} catch (Throwable e) {
// ignore
}

if (GenericService.class.isAssignableFrom(invoker.getInterface())
&& Dubbo2CompactUtils.isEnabled()
&& Dubbo2CompactUtils.isGenericServiceClassLoaded()) {
Expand All @@ -90,6 +81,15 @@ public <T> T getProxy(Invoker<T> invoker, boolean generic) throws RpcException {
interfaces.add(org.apache.dubbo.rpc.service.GenericService.class);
}
}

try {
// find the real interface from url
String realInterface = invoker.getUrl().getParameter(Constants.INTERFACE);
realInterfaceClass = ReflectUtils.forName(classLoader, realInterface);
interfaces.add(realInterfaceClass);
} catch (Throwable e) {
// ignore
}
}

interfaces.add(invoker.getInterface());
Expand Down
Loading