Changeset ceab4f1 for apps/addressbook


Ignore:
Timestamp:
Sep 15, 2014 6:28:35 PM (6 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
04483481
Parents:
3781b8db
Message:

improve efficiency of addressbook parser

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/addressbook/java/src/net/i2p/addressbook/ConfigParser.java

    r3781b8db rceab4f1  
    6565            return "";
    6666        }
    67         if (inputLine.split("#").length > 0) {
    68             return inputLine.split("#")[0];
     67        int hash = inputLine.indexOf('#');
     68        if (hash >= 0) {
     69            return inputLine.substring(0, hash);
    6970        } else {
    70             return "";
     71            return inputLine;
    7172        }
    7273    }
Note: See TracChangeset for help on using the changeset viewer.