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

[P2] Support Java Wrapper Class natively #69

Open
felix021 opened this issue Nov 25, 2023 · 0 comments
Open

[P2] Support Java Wrapper Class natively #69

felix021 opened this issue Nov 25, 2023 · 0 comments

Comments

@felix021
Copy link
Contributor

felix021 commented Nov 25, 2023

As optional keyword is not applicable to function arguments/response, Kitex will always generate non-pointer basic types, which makes it incompatible with Java methods defined with wrapper classes (such as Integer) as its arguments/response.

To improve the compatibility, we can define java wrapper classes in java.thrift and implement them as type aliases to the corresponding basic types in github.com/kitex-contrib/codec-dubbo/tree/main/java, which will be "recogonized" as struct types by Kitex and present in their pointer form in the generated code.

Before implemented, the quickest workaround is to add another method in the java server as an adaptor.

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