Add assert to IpAddressUtil.isIPv4LiteralAddress(String)

This commit is contained in:
Florian Schmaus 2017-12-16 12:37:11 +01:00
parent 5147f6e915
commit 517fc6e0f2
1 changed files with 2 additions and 0 deletions

View File

@ -29,6 +29,8 @@ public class IpAddressUtil {
return false; return false;
} }
assert matcher.groupCount() == 4;
for (int i = 1; i <= 4; i++) { for (int i = 1; i <= 4; i++) {
String ipSegment = matcher.group(i); String ipSegment = matcher.group(i);
int ipSegmentInt; int ipSegmentInt;