Minor cleanup

This commit is contained in:
Erik C. Thauvin 2023-04-15 09:27:30 -07:00
parent e2126624f4
commit 73eb6333d2
12 changed files with 338 additions and 61 deletions

View file

@ -29,7 +29,6 @@ public class Performance {
}
}
private boolean checkTrimEmpty(String str) {
for (int i = 0; i < str.length(); i++) {
if (!Character.isWhitespace(str.charAt(i))) {
@ -41,7 +40,7 @@ public class Performance {
void foo() {
StringBuffer sb = new StringBuffer();
sb.append("a"); // avoid this
sb.append("a"); // avoid this
String foo = " ";
StringBuffer buf = new StringBuffer();
@ -51,7 +50,6 @@ public class Performance {
buf.append("Hello").append(" ").append("World");
StringBuffer sbuf = new StringBuffer("tmp = " + System.getProperty("java.io.tmpdir"));
// poor
StringBuffer sbuf = new StringBuffer("tmp = " + System.getProperty("java.io.tmpdir")); // poor
}
}