This fixes the remaining 34 Eclipse "Resource '...' should be managed by try-with-resource" warnings that were still left after the previous commit. Unlike the fixes in that previous commit, the changes here are *not* plugging potential resource leaks. However, in many cases that is simply because the code before the close() call cannot currently throw exceptions. If exceptions became possible in the future, leaks could result. Using try-with-resource preemptively avoids that. Furthermore, in code that was already dealing with exceptions, the try-with-resource style is usually considerably simpler. |
||
---|---|---|
.. | ||
scandroid |