Fixed anonymize map call.
This commit is contained in:
parent
d047d174c2
commit
192001bbd4
1 changed files with 4 additions and 4 deletions
|
@ -47,8 +47,8 @@ public final class Anonymizer
|
|||
{
|
||||
private static Logger logger = LoggerFactory.getLogger(Anonymizer.class);
|
||||
|
||||
public static final Pattern IPV4_PATTERN = Pattern.compile("\\d{0,3}\\.\\d{0,3}\\.\\d{0,3}\\.\\d{0,3}");
|
||||
public static final Pattern IPV6_PATTERN = Pattern.compile("([0-9a-f]{1,4}:{1,2}){4,7}([0-9a-f]){1,4}", Pattern.CASE_INSENSITIVE);
|
||||
public static final Pattern IPV4_PATTERN = Pattern.compile("\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}");
|
||||
public static final Pattern IPV6_PATTERN = Pattern.compile("([0-9a-f]){1,4}(:{1,2}[0-9a-f]{0,4}){4,7}", Pattern.CASE_INSENSITIVE);
|
||||
|
||||
private AnonMap map;
|
||||
|
||||
|
@ -206,7 +206,7 @@ public final class Anonymizer
|
|||
String ipv4 = matcher.group();
|
||||
String right = anonLine.substring(matcher.end());
|
||||
|
||||
String anonIpv4 = this.map.get(ipv4);
|
||||
String anonIpv4 = this.map.anonymizeIp(ipv4);
|
||||
anonLine = left + anonIpv4 + right;
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ public final class Anonymizer
|
|||
String ipv6 = matcher.group();
|
||||
String right = anonLine.substring(matcher.end());
|
||||
|
||||
String anonIpv6 = this.map.get(ipv6);
|
||||
String anonIpv6 = this.map.anonymizeIp(ipv6);
|
||||
anonLine = left + anonIpv6 + right;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue