Tim te Beek
Tim te Beek
UnnecessaryThrows still ends up with `Exception 'java.lang.Exception' is never thrown in the method`
Just so we're clear: You're saying we missed out on removing that `throws Exception` ?
UnnecessaryThrows still ends up with `Exception 'java.lang.Exception' is never thrown in the method`
Since that method is `protected` we should not remove the throws declaration as per: - https://github.com/openrewrite/rewrite-static-analysis/pull/553
Thanks for the reports and details @christopherfischer ! For a bit of context, these recipes are new and contributed by @amishra-u from our OSS community. Very helpful that you're providing...
Hi @FieteO ; We have a test cas e that's nearly identical to what you have reported that passes: https://github.com/openrewrite/rewrite-spring/blob/729164fd713cbd0bfce44e582b0d613f4d1965b0/src/test/java/org/openrewrite/java/spring/test/SpringRulesToJUnitExtensionTest.java#L104-L136 Would you mind altering that test to match your case...
Closing as the linked test passes, and we've not heard what's needed to reproduce the issue since.
Ideally we see the changes from https://github.com/openrewrite/rewrite-migrate-java/pull/676 adopted here, or after this is merged.
As discussed, let's move this over to https://github.com/openrewrite/rewrite-joda Thanks again!
hi @punkratz312 ; `CommonStaticAnalysis` is a composite of some six dozen recipes; it would help troubleshooting to know which one made that change here. Do you recall?
`getLast()` should work when a variable is used, but with method calls we hadn't yet covered those out of caution. In theory there might be side effects to that method...
Thanks again for the suggestion @delanym , but I don't really see a good way forward to cover this in a guaranteed safe way for `add/get/removeLast`. Note that we already...