Skip to content

[P1] Support passing subclasses #79

@DMwangnima

Description

@DMwangnima

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{}.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions