Skip to content

Conversation

kenfinnigan
Copy link
Member

Fixes #1254


// Register Interface return types for reflection
for (Type returnType : returnTypes) {
reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, returnType.toString()));
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be ReflectiveHeirachyBuildItem, so it will attempt to also register super classes. You will also need to register methods (and probably fields) so that the serializer can actually set the values.

interfaces.put(theInfo.name(), theInfo);

// Find Return types
for (MethodInfo method : theInfo.methods()) {
Copy link
Member

Choose a reason for hiding this comment

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

You should only consider the methods with @GET, @POST..., shouldn't you?

Take a look at the RESTEasy processor, that might help.

Copy link
Member Author

Choose a reason for hiding this comment

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

For what reason?

Copy link
Member

Choose a reason for hiding this comment

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

Because otherwise you will register unnecessary reflection if you have other methods.

Copy link
Member Author

Choose a reason for hiding this comment

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

As these are interfaces, that's a lot less likely to happen than in a regular JAX-RS Resource

@kenfinnigan kenfinnigan added this to the 0.11.0 milestone Mar 6, 2019
@stuartwdouglas stuartwdouglas merged commit f9673b4 into quarkusio:master Mar 6, 2019
@kenfinnigan kenfinnigan deleted the rest-fix branch March 6, 2019 12:36
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

Successfully merging this pull request may close these issues.

3 participants