iiop-openjdk/src/main/java/org/wildfly/iiop/openjdk/rmi/marshal/strategy/StubStrategy.java
public Object convertLocalRetval(Object obj) {
        if (retvalRemoteInterface == null)
            return obj;
        else
            return PortableRemoteObject.narrow(obj, retvalRemoteInterface);
    }
public Object convertLocalRetval(Object obj) {
        if (retvalRemoteInterface == null)
            return obj;
        else
            return PortableRemoteObject.narrow(obj, retvalRemoteInterface);
    }
Converts the return value of a local invocation into the expected type.
A conversion is needed if the return value is a remote interface
(in this case <code>PortableRemoteObject.narrow()</code> must be called).

@param obj the return value to be converted
@return the converted value.