mirror of
https://github.com/apache/struts.git
synced 2026-08-11 09:36:57 +00:00
WW-4515 Convert try blocks to try-with-resources
This commit is contained in:
+1
-4
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user