fix indentation
use InetAddressUtils, also handle exceptions more anally
Merge branch '1.12'