Various code cleanups (#3709)

* For/while to foreach loop conversions

* Don't instantiate Booleans

* Remove redundant String.toString calls

* Remove redundant String instantiations

* Don't concatenate StringBuilder.append args

* Replace dangling javadoc comments with blocks

* Combine identical catch branches

* Remove redundant catch branch

* Remove unnecessary boxing

* Remove redundant casts

* Remove redundant null checks
This commit is contained in:
Ville Skyttä
2016-09-07 11:41:51 +03:00
committed by wing328
parent 3d1f621f8b
commit b8e8c7cdb5
32 changed files with 96 additions and 108 deletions

View File

@@ -113,12 +113,12 @@ public class AssertFile {
if(!deltas.isEmpty()) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("files diff:\n");
stringBuilder.append("\tfile: '" + expected.toAbsolutePath().toString() + "' \n");
stringBuilder.append("\tfile: '" + actual.toAbsolutePath().toString() + "' \n");
stringBuilder.append("\tfile: '").append(expected.toAbsolutePath().toString()).append("' \n");
stringBuilder.append("\tfile: '").append(actual.toAbsolutePath().toString()).append("' \n");
stringBuilder.append("\tdiffs:\n");
for (Delta delta: deltas) {
stringBuilder.append(delta.toString() + "\n");
stringBuilder.append(delta.toString()).append("\n");
}
fail(stringBuilder.toString());