All 1-character strings converted to primitives

"b" + "r" now changed to 'b' + 'w'.  It's more straight-forward, and may cause perfomance improvements - character primitives allocation is faster and less expensive than string creation.
This commit is contained in:
vraskulin 2017-01-27 15:57:10 +03:00
parent 31589778ca
commit f60ebfbb1f
451 changed files with 989 additions and 978 deletions

View file

@ -69,7 +69,7 @@ public class ClassScanner {
URL resource = resources.nextElement();
String filePath = resource.getFile();
if (filePath.startsWith("file:")) {
filePath = filePath.substring("file:".length(), filePath.lastIndexOf("!"));
filePath = filePath.substring("file:".length(), filePath.lastIndexOf('!'));
jars.add(filePath);
} else {
dirs.put(filePath, packageName);

View file

@ -61,13 +61,13 @@ public class DateFormat {
seconds = seconds % 3600;
long m = seconds / 60;
long s = seconds % 60;
sb.append(h).append(":");
sb.append(h).append(':');
if (m<10) {
sb.append("0");
sb.append('0');
}
sb.append(m).append(":");
sb.append(m).append(':');
if (s<10) {
sb.append("0");
sb.append('0');
}
sb.append(s);
return sb.toString();

View file

@ -468,7 +468,7 @@ public class ManaUtil {
// Combine the cost back as a mana string
StringBuilder sb = new StringBuilder();
for (String s : finalCost) {
sb.append("{" + s + "}");
sb.append('{' + s + '}');
}
// Return the condensed string
return sb.toString();