Skip to content

Now get Component Type from Array TypeMirror #90

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

Merged
merged 1 commit into from
Sep 29, 2022

Conversation

SentryMan
Copy link
Collaborator

@SentryMan SentryMan commented Sep 28, 2022

Using types.getArrayType(type) seems to convert an array TypeMirror object into a 2D array. e.g. byte[] -> byte[][]. So when the getComponentType() method is called the same base byte[] TypeMirror is returned, causing a loop. Fixes #89

Tested on this Controller, which generates this ControllerClass$Route.java and OpenAPI json

@SentryMan SentryMan changed the title Now get type from array TypeMirror Now get Component Type from Array TypeMirror Sep 28, 2022
@rbygrave rbygrave added this to the 1.18 milestone Sep 29, 2022
@rbygrave rbygrave merged commit b59ac8b into avaje:master Sep 29, 2022
@SentryMan SentryMan deleted the patch-1 branch September 29, 2022 04:30
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.

Infinite recursion when using Byte Arrays
2 participants