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

When building a type tree, don't recur infinitely on wildcards #3931

Merged
merged 5 commits into from Nov 25, 2020

Conversation

smillst
Copy link
Member

@smillst smillst commented Nov 24, 2020

Fixes #3929.

* To avoid infinite recursions, record each wildcard that has been converted to a tree. This
* set is cleared each time {@link #buildAnnotatedType(AnnotatedTypeMirror)} is called.
*/
private Set<AnnotatedWildcardType> visitedWildcards = new HashSet<>();
Copy link
Member

Choose a reason for hiding this comment

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

The field could be final.

@mernst mernst merged commit 4da25d0 into typetools:master Nov 25, 2020
@mernst mernst deleted the issue3929 branch November 25, 2020 15:23
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.

Crash report: error: SourceChecker.typeProcess: unexpected Throwable (StackOverflowError).
3 participants