Why is Eclipse giving a strange \"Resource leak: zin is never closed\" warning for the following code even though I use try-with-resources
:
This appears to be a known bug in Eclipse: [compiler][resource] Bad resource leak problem on return inside while loop (resource passed on in finally block.
I just got bit by this myself, and have added my vote on the tracker.
Update: The above bug has been resolved in 4.5 M7. This will be included in the final release of Eclipse 4.5 ("Mars") - which looks on track to be released 2015-06-24.