Use new split()

This commit is contained in:
zzz
2015-11-07 17:45:48 +00:00
parent 83b923151c
commit 1e5a35c7f8
31 changed files with 64 additions and 47 deletions

View File

@ -1131,7 +1131,7 @@ public class EepGet {
private int handleStatus(String line) {
if (_log.shouldLog(Log.DEBUG))
_log.debug("Status line: [" + line.trim() + "]");
String[] toks = line.split(" ", 3);
String[] toks = DataHelper.split(line, " ", 3);
if (toks.length < 2) {
if (_log.shouldLog(Log.WARN))
_log.warn("ERR: status "+ line);

View File

@ -83,6 +83,7 @@ import javax.net.ssl.TrustManagerFactory;
import net.i2p.I2PAppContext;
import net.i2p.crypto.KeyStoreUtil;
import net.i2p.data.DataHelper;
import org.apache.http.conn.ssl.DefaultHostnameVerifier;
import org.apache.http.conn.util.PublicSuffixList;
@ -443,7 +444,7 @@ public class I2PSSLSocketFactory {
try {
if (line.charAt(0) == '#')
continue;
String[] s = line.split(",");
String[] s = DataHelper.split(line, ",");
String lc = s[0].toLowerCase(Locale.US);
tlds.add(lc);
i++;

View File

@ -35,6 +35,7 @@ import freenet.support.CPUInformation.UnknownCPUException;
import net.i2p.I2PAppContext;
import net.i2p.crypto.CryptoConstants;
import net.i2p.data.DataHelper;
/**
* <p>BigInteger that takes advantage of the jbigi library for the modPow operation,
@ -734,7 +735,7 @@ public class NativeBigInteger extends BigInteger {
in = new BufferedReader(new InputStreamReader(new FileInputStream("/proc/cpuinfo"), "ISO-8859-1"), 4096);
String line = null;
while ( (line = in.readLine()) != null) {
String[] parts = line.split(":", 2);
String[] parts = DataHelper.split(line, ":", 2);
if (parts.length < 2)
continue;
String key = parts[0].trim().toLowerCase(Locale.US);