openrewrite / rewrite-analysis

OpenRewrite recipes for data flow analysis.
Apache License 2.0
8 stars 8 forks source link

`ControlFlow`: Better support for wildcard types #49

Closed knutwannheden closed 5 months ago

knutwannheden commented 5 months ago

In ControlFlow#createFakeIteratorVariableDeclarations() the JavaTemplate code which got produced could end up containing types like Iterator<List<Generic{?>> because that is what JavaType#toString() produces. Fixed by using TypeUtils#toString() instead.

knutwannheden commented 5 months ago

I stumbled across this while going through the results of the nightly OWASP Top 10 recipe run against the Netflix + Spring organization.

With this fix the total number or error markers goes down from 15 to 14 😃 : https://app.moderne.io/results/WOKPsK9UU