geronimo-xbean-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblev...@apache.org
Subject svn commit: r1309601 - /geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
Date Wed, 04 Apr 2012 21:20:07 GMT
Author: dblevins
Date: Wed Apr  4 21:20:07 2012
New Revision: 1309601

URL: http://svn.apache.org/viewvc?rev=1309601&view=rev
Log:
Ensure streams are closed when reading classes

Modified:
    geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java

Modified: geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java?rev=1309601&r1=1309600&r2=1309601&view=diff
==============================================================================
--- geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
(original)
+++ geronimo/xbean/trunk/xbean-finder/src/main/java/org/apache/xbean/finder/AnnotationFinder.java
Wed Apr  4 21:20:07 2012
@@ -933,8 +933,12 @@ public class AnnotationFinder implements
     }
 
     protected void readClassDef(InputStream in) throws IOException {
-        ClassReader classReader = new ClassReader(in);
-        classReader.accept(new InfoBuildingVisitor(), ASM_FLAGS);
+        try {
+            ClassReader classReader = new ClassReader(in);
+            classReader.accept(new InfoBuildingVisitor(), ASM_FLAGS);
+        } finally {
+            in.close();
+        }
     }
 
     protected void readClassDef(Class clazz) {



Mime
View raw message