-
Notifications
You must be signed in to change notification settings - Fork 37
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
Demarshalling doesn't work for collections of generic objects #394
Comments
I'm working on adding better support for parameterized types. I hope to have something in the next week |
@Thomas-TeS how are you annotating the |
Hi @tristantarrant, the class @ProtoAdapter(Pair.class)
public class PairAdapter {
@ProtoFactory
public Pair<?, ?> create(WrappedMessage left, WrappedMessage right) {
return new Pair<>(left.getValue(), right.getValue());
}
@ProtoField(number = 1)
public WrappedMessage getLeft(Pair<?, ?> pair) {
return new WrappedMessage(pair.getLeft());
}
@ProtoField(number = 2)
public WrappedMessage getRight(Pair<?, ?> pair) {
return new WrappedMessage(pair.getRight());
}
} |
tristantarrant
added a commit
to tristantarrant/protostream
that referenced
this issue
Jan 10, 2025
* A temporary workaround for the issue. Full support for generic parameter types will need to be added to type mirroring
ryanemerson
pushed a commit
that referenced
this issue
Jan 13, 2025
* A temporary workaround for the issue. Full support for generic parameter types will need to be added to type mirroring
tristantarrant
added a commit
to tristantarrant/protostream
that referenced
this issue
Jan 13, 2025
* A temporary workaround for the issue. Full support for generic parameter types will need to be added to type mirroring
ryanemerson
pushed a commit
that referenced
this issue
Jan 13, 2025
* A temporary workaround for the issue. Full support for generic parameter types will need to be added to type mirroring
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found a problem with the protostream marshallers. The following class generates a compiler error in its marshaller:
Marshaller method (Version 5.x):
This only seems to pose a problem since Protostream 5.x because in version 4.x it worked because the generated
write
-method did not use a parameterized collection. Instead it contained a loop over all elements of the collection like this:Marshaller method (Version 4.x):
The text was updated successfully, but these errors were encountered: