Changeset 84ea533 for apps


Ignore:
Timestamp:
Mar 28, 2019 4:58:34 PM (20 months ago)
Author:
zab2 <zab2@…>
Branches:
master
Children:
c5f9aea5
Parents:
fd2819c
Message:

use DataHelper?.split instead of String.split

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2ptunnel/java/src/net/i2p/i2ptunnel/access/DefinitionParser.java

    rfd2819c r84ea533  
    55
    66import java.io.File;
     7
     8import net.i2p.data.DataHelper;
    79
    810class DefinitionParser {
     
    1315
    1416        for (String line : definition) {
    15             String [] split = line.split(" ");
     17            String [] split = DataHelper.split(line," ");
    1618            split[0] = split[0].toLowerCase();
    1719            if ("default".equals(split[0]))
     
    3234            return Threshold.DENY;
    3335
    34         String [] split = s.split("/");
     36        String [] split = DataHelper.split(s,"/");
    3537        if (split.length != 2)
    3638            throw new InvalidDefinitionException("Invalid threshold " + s);
     
    7880        Threshold threshold = parseThreshold(thresholdString);
    7981        String line2 = line.substring(thresholdString.length()).trim();
    80         String[] split = line2.split(" ");
     82        String[] split = DataHelper.split(line2," ");
    8183        if (split.length < 2)
    8284            throw new InvalidDefinitionException("invalid definition "+line);
Note: See TracChangeset for help on using the changeset viewer.