On Tue, Sep 30, 2014 at 8:10 AM, Emmanuel Bourg <ebo...@apache.org> wrote:

> Le 30/09/2014 14:08, ggreg...@apache.org a écrit :
>
> > Modified:
> commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java
> > URL:
> http://svn.apache.org/viewvc/commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java?rev=1628409&r1=1628408&r2=1628409&view=diff
> >
> ==============================================================================
> > ---
> commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java
> (original)
> > +++
> commons/proper/bcel/trunk/src/main/java/org/apache/bcel/util/ClassLoaderRepository.java
> Tue Sep 30 12:08:10 2014
> > @@ -88,10 +88,14 @@ public class ClassLoaderRepository imple
> >              if (is == null) {
> >                  throw new ClassNotFoundException(className + " not
> found.");
> >              }
> > -            ClassParser parser = new ClassParser(is, className);
> > -            RC = parser.parse();
> > -            storeClass(RC);
> > -            return RC;
> > +            try {
> > +                ClassParser parser = new ClassParser(is, className);
> > +                RC = parser.parse();
> > +                storeClass(RC);
> > +                return RC;
> > +            } finally {
> > +                is.close();
> > +            }
> >          } catch (IOException e) {
> >              throw new ClassNotFoundException(className + " not found: "
> + e, e);
> >          }
> >
> >
>
> This is not necessary, the stream is already closed at the end of the
> parse() method.
>

No it is not.

Gary


>
> Emmanuel Bourg
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
> For additional commands, e-mail: dev-h...@commons.apache.org
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Reply via email to