Niklas Gustavsson

Results 22 comments of Niklas Gustavsson

This is rare and we have removed them, so not blocking for us. Sharing here to help improve the parser.

We're running into this with: - org.openrewrite:rewrite-core:8.62.4 - org.openrewrite.recipe:rewrite-static-analysis:2.18.0 Here's a test case: ```java @Test void dontFinalClassWithNestedInheritedClasses() { rewriteRun( spec -> spec.recipe(new FinalClass()), // language=java java( """ public class Foo...

Just verified that we are still seeing this issue, with the above test case. This is with: - org.openrewrite:rewrite-core:8.63.3 - org.openrewrite.recipe:rewrite-static-analysis:2.19.0 Has this not yet made it into a release,...

I did some testing and it comes down to a difference in the tests. In my test above, the subclass is `final`, which still triggers the bug, in your test...

We've also run into this, here's a test case that replicates what we're seeing. * org.openrewrite:rewrite-core:8.48.1 * org.openrewrite.recipe:rewrite-static-analysis:2.4.0 ```java @Test void removeRedundantCast() { rewriteRun( spec -> spec.recipe(new RemoveRedundantTypeCast()), // language=java...

Ah yes, you are right, my example does not concern generic. Let me know if you prefer that I open a separate ticket. I haven't debugged the recipe further.

Sorry for the slow reply, but here's a PR with the failing test case: https://github.com/openrewrite/rewrite-static-analysis/pull/495