Re: Re: Re: Re: A complete list of JDK classes which CheckClassAdapter fails (bug?)
Rémi Forax <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Le 23/08/2010 17:02, [email protected] a écrit : >> Eric, >> Why don't modify CheckClassAdapter to handle join interfaces as suggested >> in the paper you reference ? >> > I could try this, but a simpler solution is to relax the ASM verifier, ie to consider that any class can be assigned to any interface (like the Sun verifier does): > > Index: SimpleVerifier.java > =================================================================== > --- SimpleVerifier.java (revision 1434) > +++ SimpleVerifier.java (working copy) > @@ -267,6 +267,9 @@ > if (getSuperClass(u) == null) { > return false; > } else { > + if (isInterface) { > + return u.getSort() == Type.OBJECT || u.getSort() == Type.ARRAY; > + } > return isAssignableFrom(t, getSuperClass(u)); > } > } > @@ -284,7 +287,11 @@ > } > return false; > } > - return getClass(t).isAssignableFrom(getClass(u)); > + Class tc = getClass(t); > + if (tc.isInterface()) { > + tc = Object.class; > + } > + return tc.isAssignableFrom(getClass(u)); > } > > I checked that, with this patch, all JDK classes are considered valid with the ASM verifier. > > Eric > I agree. This is better. Rémi
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws