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

@ -188,7 +188,7 @@ public class DraftPanel extends javax.swing.JPanel {
// If we are logging the draft create a file that will contain
// the log.
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
logFilename = "Draft_" + sdf.format(new Date()) + "_" + draftId + ".txt";
logFilename = "Draft_" + sdf.format(new Date()) + '_' + draftId + ".txt";
try {
Files.write(pathToDraftLog(), "".getBytes(), StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
} catch (IOException ex) {
@ -366,12 +366,12 @@ public class DraftPanel extends javax.swing.JPanel {
int second = s - (minute * 60);
String text;
if (minute < 10) {
text = "0" + Integer.toString(minute) + ":";
text = '0' + Integer.toString(minute) + ':';
} else {
text = Integer.toString(minute) + ":";
text = Integer.toString(minute) + ':';
}
if (second < 10) {
text = text + "0" + Integer.toString(second);
text = text + '0' + Integer.toString(second);
} else {
text = text + Integer.toString(second);
}