You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bcel-dev@jakarta.apache.org by bu...@apache.org on 2003/04/17 19:45:22 UTC

DO NOT REPLY [Bug 19122] New: - Repository ignores classes that have been added to it

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19122>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19122

Repository ignores classes that have been added to it

           Summary: Repository ignores classes that have been added to it
           Product: BCEL
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Main
        AssignedTo: bcel-dev@jakarta.apache.org
        ReportedBy: daveho@cs.umd.edu


I'm using the org.apache.bcel.Repository class to do class hierarchy tests
(finding out if one class is an instance of another, etc.)  My program uses
Repository.addClass() to add all of the classes in an analyzed application to
the repository.  Some of the classes in the analyzed application extend or
implement types in external jar files: for example, java.io.Serializable in the
rt.jar from the JDK.

The problem, as far as I can tell, is that
org.apache.bcel.classfile.JavaClass.getInterfaces() calls loadClass() on its
internal org.apache.bcel.util.Repository object to convert interface references
to the JavaClass objects for those interfaces.  As implemented in
SyntheticRepository, the loadClass() method ignores all currently loaded
classes.  Because the application classes are not part of the runtime CLASSPATH,
they are reported as missing.

I will attach a stack trace showing the problem to this bug report.  Note that
the class reported as missing (edu.umd.cs.pugh.visitclass.Constants2) is in the
repository.

One thing that seems confusing to me is that the org.apache.bcel.util.Repository
class does not have a method which looks in both the internal cache to find a
class, and if that fails tries to load the class from an external source.

---------------------------------------------------------------------
To unsubscribe, e-mail: bcel-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: bcel-dev-help@jakarta.apache.org