jakarta-bcel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Hovemeyer <dav...@cs.umd.edu>
Subject SyntheticRepository bug, patch
Date Mon, 04 Aug 2003 17:33:16 GMT
The loadClass(String) method of org.apache.util.SyntheticRepository
has a bug where classes already in the repository but not on the
classpath are ignored.  The problem is that the check to see if
the class is already present in the repository is done in
the private loadClass(InputStream, String) method.  However,
when the ClassPath object is used to generate the InputStream
in loadClass(String), it will throw an IOException (because the class
is not on the classpath), and this will cause ClassNotFoundException to
be thrown.

The solution is to move the check to see if the class is in the repository
into the public loadClass() methods.  I've attached a patch to do this.
If someone could commit this, I'd appreciate it.

Thanks,
Dave

Mime
View raw message