in resolver/src/main/java/org/apache/james/jspf/core/IPAddr.java [181:203]
private void stringToInternal(String netAddress) throws PermErrorException {
netAddress = stripDot(netAddress);
try {
byte[] bytes = Inet6Util.createByteArrayFromIPAddressString(netAddress);
if (bytes.length == 4) {
for (int i = 0; i < bytes.length; i++) {
address[i] = bytes[i];
}
} else if (bytes.length == 16) {
setIP6Defaults();
for (int i = 0; i < bytes.length / 2; i++) {
address[i] = unsigned(bytes[i * 2]) * 256
+ unsigned(bytes[i * 2 + 1]);
}
} else {
throw new PermErrorException("Not a valid address: " + netAddress);
}
} catch (NumberFormatException e) {
throw new PermErrorException("Not a valid address: " + netAddress);
}
}