Upd Java version 1.6->1.7 try-with-resources