Open
Description
In code that has string concatenation wrapped on multiple lines, the formatter should remove any redundant concatenations when unwrapping the line.
See this reformatting change on the gerrit project for example:
The original code:
throw new IllegalStateException(String.format(
"SubmitRuleEvaluator.evaluate for change %s " +
"returned empty list for %s in %s",
cd.getId(),
patchSet.getId(),
cd.change().getProject().get()));
And after reformatting:
throw new IllegalStateException(
String.format(
"SubmitRuleEvaluator.evaluate for change %s " + "returned empty list for %s in %s",
cd.getId(), patchSet.getId(), cd.change().getProject().get()));
The first parameter to String.format
now has a redundant concatenation, and would be better as:
String.format(
"SubmitRuleEvaluator.evaluate for change %s returned empty list for %s in %s",
cd.getId(), patchSet.getId(), cd.change().getProject().get()));