Community
Participate
Working Groups
When you inline the variable a in the snippet below it would be very good if eclipse remove the concatenation code: ==== INPUT ===== String a = "1"; String n = "b" + a + "c" + a; ================ ==== OUTPUT ==== String n = "b1c1"; ================
I agree that this could be handy sometimes, but we want to keep refactorings targeted to perform a single action (avoid guessing and being too smart, since it's not always clear that the user really wants/needs the additional smartness). A decent compiler already concatenates the resulting "b" + "1" + "c" + "1" into one string, so this is also not a performance concern. What we could do though, is add a quick fix that concatenates sequences of string literals into one, i.e. "b" + "1" + "c" + "1" => "b1c1", see bug 77632.