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
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()));
The text was updated successfully, but these errors were encountered:
Reformatting the code with google-java-format tool in change Id5f3c6de9
resulted in wrapped lines being unwrapped to the new 100 columns limit.
In cases where the wrapped line was wrapped on a string concatenation,
the resulting long line now includes redundant concatenations. See the
upstream issue [1] for an example of this.
Squash the redundant concatenations with:
git ls-files | grep java$ | xargs sed -i '' 's/" + "//g'
(note: this also resulted in a couple of unwanted changes; those are
manually undone.)
[1] google/google-java-format#122
Change-Id: I7348413ae460c8c7a0b0c72dab0a1ae7275a2ec3
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:
And after reformatting:
The first parameter to
String.format
now has a redundant concatenation, and would be better as:The text was updated successfully, but these errors were encountered: