InetAddress doesn't provide any static method or constructor to get InetAddress with wildcard IP 0.0.0.0 . The only way is InetAddress.getByName("0.0.0.0")
But PMD gives AvoidUsingHardCodedIP if we pass hard coded IP. Is there any way to get InetAddress with wildcard IP but without hard coding the IP?