Skip to content

AVRO-2357: Allow generic types in reflect protos#490

Merged
Fokko merged 1 commit into
apache:masterfrom
ivangreene:ig/generics
Mar 31, 2019
Merged

AVRO-2357: Allow generic types in reflect protos#490
Fokko merged 1 commit into
apache:masterfrom
ivangreene:ig/generics

Conversation

@ivangreene
Copy link
Copy Markdown
Contributor

@ivangreene ivangreene commented Mar 26, 2019

Adds support for generic types in ReflectData for Protocols.

I also took the liberty of cleaning up the iteration over Parameters; the multi-dimensional array style is no longer really necessary with the new methods on Parameter.

https://issues.apache.org/jira/browse/AVRO-2357

@probot-autolabeler probot-autolabeler Bot added the Java Pull Requests for Java binding label Mar 26, 2019
@iemejia
Copy link
Copy Markdown
Member

iemejia commented Mar 26, 2019

We introduced automatic code formatting. For more info see the "How to contribute" page. This probably affected this PR can you please rebase it.

@ivangreene
Copy link
Copy Markdown
Contributor Author

@iemejia thanks for the heads up. I just rebased and applied spotless formatting.

Map<String, Schema> names = new LinkedHashMap<>();
Map<String, Message> messages = protocol.getMessages();
Map<TypeVariable<?>, Type> genericTypeVariableMap = ReflectionUtil.resolveTypeVariables(iface);
for (Method method : iface.getMethods())
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not part of the PR, but can we add brackets here, looks awkward.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Adds support for generic types in ReflectData for
Protocols.
@Fokko Fokko merged commit de48a0a into apache:master Mar 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Java Pull Requests for Java binding

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants