You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for logging an issue! Indeed hard to say what to do when there's no clear best way to go about it.
We could prevent the IndexOutOfBoundsException with a quick check, and if there's no argument insert a literal {i} just to keep the effect the same. What are your thoughts on that?
Then we can still defer and write a recipe later that cleans that up either before or after conversion, but at least don't blow up on larger migrations where the odds increase of such problems existing in the project.
We could prevent the IndexOutOfBoundsException with a quick check, and if there's no argument insert a literal {i} just to keep the effect the same. What are your thoughts on that?
Make sense.
Though I'd log error just as well to inform user that the statement is wrong.
On the other hand converting it as is and leaving exact number of parameters, which would yield warning in any IDE, would also be convenient to get them squash.
The more I ponder it the more I'm leaning towards the latter :-) The former would mostly just keep hiding the issue.
Followup to: #155 (comment)
What version of OpenRewrite are you using?
I am using
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
Not sure to be honest - this looks like invalid call but it's not sanitised at any point...
Usually with JUL, if parameter is missing then the formatter simply doesn't do anything with positional argument, i.e. above would result in String:
What did you see instead?
Not sure :-)
What is the full stack trace of any errors you encountered?
Are you interested in contributing a fix to OpenRewrite?
The text was updated successfully, but these errors were encountered: