Util: Prevent DataHelper complaining about split() for ipv4

This commit is contained in:
zzz
2021-03-15 08:10:48 -04:00
parent a1340d8796
commit 810c2f912c

View File

@@ -2101,7 +2101,7 @@ public class DataHelper {
Pattern p = patterns.get(regex); Pattern p = patterns.get(regex);
if (p == null) { if (p == null) {
// catches easy mistake, and also swapping the args by mistake // catches easy mistake, and also swapping the args by mistake
if (regex.length() > 1 && !regex.startsWith("[") && !regex.equals("\r\n")) { if (regex.length() > 1 && !regex.startsWith("[") && !regex.equals("\r\n") && !regex.startsWith("\\")) {
//(new Exception("Warning: Split on regex: \"" + regex + "\" should probably be enclosed with []")).printStackTrace(); //(new Exception("Warning: Split on regex: \"" + regex + "\" should probably be enclosed with []")).printStackTrace();
System.out.println("Warning: Split on regex: \"" + regex + "\" should probably be enclosed with []"); System.out.println("Warning: Split on regex: \"" + regex + "\" should probably be enclosed with []");
} }