commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emmanuel Bourg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BCEL-23) Repository ignores classes that have been added to it
Date Thu, 24 Apr 2014 09:17:16 GMT

     [ https://issues.apache.org/jira/browse/BCEL-23?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Emmanuel Bourg updated BCEL-23:
-------------------------------

             Priority: Major
          Environment:     (was: Operating System: All
Platform: All)
    Affects Version/s:     (was: unspecified)
        Fix Version/s: 5.2
             Priority:   (was: P3)
             Severity:   (was: normal)

> Repository ignores classes that have been added to it
> -----------------------------------------------------
>
>                 Key: BCEL-23
>                 URL: https://issues.apache.org/jira/browse/BCEL-23
>             Project: Commons BCEL
>          Issue Type: Bug
>          Components: Main
>            Reporter: David Hovemeyer
>            Assignee: Apache Commons Developers
>             Fix For: 5.2
>
>         Attachments: SyntheticRepository.patch, correct-trace.txt, repos-bug.txt
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message