GROOVY-7186: Close URLConnection getInputStream() after testing for availability
Merge pull request #540 from armsargis/GROOVY-7186

GROOVY-7186: Try to open URLConnection in finally block