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
@vogella The reason the conversion does not occur is that the buf is later passed to a method: fetchConvertingProposal2. Removing the StringBuilder makes that impossible. If the methods that take a StringBuilder/StringBuffer were converted to take a String, then the buf.toString() could passed and this would trigger the clean-up to do what you expect.
Hi @jjohnstn
Imho it might be possible to aggregate consecutive lines into a text block without substitution of the Stringbuffer object in this case. Wdyt?
- modify StringConcatToTextBlockFixCore to support the case where the
StringBuilder/StringBuffer is passed as an argument and in that
case do not replace the StringBuilder/StringBuffer but change it
to initialize with a text block
- add new tests to AssistQuickFixTest15 and CleanUpTest15
- fixeseclipse-jdt#1841
/org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/UnnecessaryArrayCreationQuickFixTest.java contains statements like:
I would expect that the Source clean up convert to Text Block would convert this. It currently does not.
cc @jjohnstn
The text was updated successfully, but these errors were encountered: