WW-4515 Convert try blocks to try-with-resources

This commit is contained in:
Aaron Johnson
2015-06-17 09:24:08 -05:00
parent bf15ad20b1
commit 3fab155b4c
24 changed files with 99 additions and 270 deletions
@@ -438,12 +438,9 @@ public class Java8ClassFinder implements ClassFinder {
try {
URL resource = classLoaderInterface.getResource(className);
if (resource != null) {
InputStream in = resource.openStream();
try {
try (InputStream in = resource.openStream()) {
ClassReader classReader = new ClassReader(in);
classReader.accept(new InfoBuildingClassVisitor(this), ClassReader.SKIP_DEBUG);
} finally {
in.close();
}
} else {
throw new XWorkException("Could not load " + className);