GROOVY-7186: Close URLConnection getInputStream() after testing for availability