Switching to Android Marshmallow API, I was using org.apache.http.conn.util.InetAddressUtils for InetAddressUtils.isIPv4Address(ipAddress) in a cod
org.apache.http.conn.util.InetAddressUtils
InetAddressUtils.isIPv4Address(ipAddress)
Using try catch as logic is horrible practice and should only be done if totally unavoidable..
Use something like this instead:
if (inetAddress instanceof Inet4Address){ //do something }