I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit 7ea3c430 authored by zzz's avatar zzz
Browse files

Util: FileLogWriter minor optimization

parent d467dc28
No related branches found
No related tags found
No related merge requests found
......@@ -207,11 +207,12 @@ class FileLogWriter extends LogWriter {
}
private static final String replace(String pattern, int num) {
char c[] = pattern.toCharArray();
StringBuilder buf = new StringBuilder();
for (int i = 0; i < c.length; i++) {
if ( (c[i] != '#') && (c[i] != '@') )
buf.append(c[i]);
int len = pattern.length();
StringBuilder buf = new StringBuilder(len + 1);
for (int i = 0; i < len; i++) {
char c = pattern.charAt(i);
if ( (c != '#') && (c != '@') )
buf.append(c);
else
buf.append(num);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment