Bug 41974 - verifier raises ....AssertionViolatedException when done against Java5 files with generics/annotations
verifier raises ....AssertionViolatedException when done against Java5 files ...
Status: RESOLVED FIXED
Product: BCEL - Now in Jira
Classification: Unclassified
Component: Main
5.2
Other other
: P2 blocker
: ---
Assigned To: issues@commons.apache.org
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-03-28 11:48 UTC by Erik Bengtson
Modified: 2007-04-01 07:55 UTC (History)
0 users



Attachments
add visitAnnotation and visitLocalVariableTypeTable to StringRepresentation (1.73 KB, patch)
2007-03-28 11:49 UTC, Erik Bengtson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Bengtson 2007-03-28 11:48:11 UTC
Running the verifier against the class:

package org.jpox.samples.jpa.company;

import java.util.Collection;
import java.util.HashSet;

import javax.persistence.Entity;
import javax.persistence.Id;

@Entity
public class GenericsPerson
{
    public String id;
    Collection<Person> persons = new HashSet<Person>();
    
    @Id
    public String getId()
    {
        return id;
    }
    
    public void setId(String id)
    {
        this.id = id;
    }
    
    public void setPersons(Collection<Person> perss)
    {
        this.persons = perss;
    }
    
    public Collection<Person> getPersons()
    {
        return persons;
    }
}


Gives this error output:

JustIce by Enver Haase, (C) 2001-2002.
<http://bcel.sourceforge.net>
<http://jakarta.apache.org/bcel>

Now verifying: org.jpox.samples.jpa.company.GenericsPerson

Pass 1:
VERIFIED_OK
Passed verification.

Exception in thread "main"
org.apache.bcel.verifier.exc.AssertionViolatedException: INTERNAL ERROR: Please
adapt 'class org.apache.bcel.verifier.statics.StringRepresentation' to deal with
objects of class 'class org.apache.bcel.classfile.RuntimeVisibleAnnotations'.
	at
org.apache.bcel.verifier.statics.StringRepresentation.toString(StringRepresentation.java:98)
	at org.apache.bcel.verifier.statics.Pass2Verifier.tostring(Pass2Verifier.java:1442)
	at org.apache.bcel.verifier.statics.Pass2Verifier.access$0(Pass2Verifier.java:1441)
	at
org.apache.bcel.verifier.statics.Pass2Verifier$CPESSC_Visitor.visitJavaClass(Pass2Verifier.java:387)
	at org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:213)
	at
org.apache.bcel.classfile.DescendingVisitor.visitJavaClass(DescendingVisitor.java:94)
	at org.apache.bcel.classfile.JavaClass.accept(JavaClass.java:213)
	at org.apache.bcel.classfile.DescendingVisitor.visit(DescendingVisitor.java:88)
	at
org.apache.bcel.verifier.statics.Pass2Verifier$CPESSC_Visitor.<init>(Pass2Verifier.java:357)
	at
org.apache.bcel.verifier.statics.Pass2Verifier$CPESSC_Visitor.<init>(Pass2Verifier.java:337)
	at
org.apache.bcel.verifier.statics.Pass2Verifier.constant_pool_entries_satisfy_static_constraints(Pass2Verifier.java:298)
	at org.apache.bcel.verifier.statics.Pass2Verifier.do_verify(Pass2Verifier.java:159)
	at org.apache.bcel.verifier.PassVerifier.verify(PassVerifier.java:71)
	at org.apache.bcel.verifier.Verifier.doPass2(Verifier.java:75)
	at org.apache.bcel.verifier.Verifier.main(Verifier.java:217)
Comment 1 Erik Bengtson 2007-03-28 11:49:35 UTC
Created attachment 19835 [details]
add visitAnnotation and visitLocalVariableTypeTable to StringRepresentation
Comment 2 Torsten Curdt 2007-04-01 07:55:41 UTC
Thanks! Applied!