It seems BasicURLHanlder.disconnect() does not properly close URL connection to ivy-report.xsl file. In my case URL looks like:
In disconnect() method there is a check for URL connection class:
However in runtime this check does not work because instead of FileURLConnection there is JarURLConnection:
This leads to leaked input streams if Ivy is used programmatically within the same JVM.