forked from I2P_Developers/i2p.i2p
improve efficiency of addressbook parser
This commit is contained in:
@@ -64,10 +64,11 @@ class ConfigParser {
|
|||||||
if (inputLine.startsWith(";")) {
|
if (inputLine.startsWith(";")) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
if (inputLine.split("#").length > 0) {
|
int hash = inputLine.indexOf('#');
|
||||||
return inputLine.split("#")[0];
|
if (hash >= 0) {
|
||||||
|
return inputLine.substring(0, hash);
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return inputLine;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user