IT improvements by using Java7 try-resources.

no other change (and some reformat)