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

[P1] Support passing subclasses #79

Open
DMwangnima opened this issue Jan 26, 2024 · 0 comments
Open

[P1] Support passing subclasses #79

DMwangnima opened this issue Jan 26, 2024 · 0 comments
Assignees

Comments

@DMwangnima
Copy link
Collaborator

DMwangnima commented Jan 26, 2024

codec-dubbo needs to support passing subclasses.
Example:
api.thrift:

list<java.Date> EchoJavaDateList(1: list<java.Date> req)(hessian.argsType="java.util.List")

dubbo-java:

    public List<Date> EchoJavaDateList(List<Date> req) throws Exception {
        List<Date> returnDates = new ArrayList<>();
        for (Date date : req) {
            returnDates.add(new java.sql.Timestamp(date.getTime()));
        }
        return returnDates;
    }

As for dubbo-java <-> dubbo-java, returning subclass works. But for dubbo-go-hessian2, it just decode the returning contents as map[string]interface{}.

@DMwangnima DMwangnima self-assigned this Jan 26, 2024
@DMwangnima DMwangnima changed the title [Proposal] Support passing subclasses [P1] Support passing subclasses Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant