fix warnings: remove redundant generics (Java 7), add missing @override
and add a few managed try clauses