The difference is that access to that field should be done without reflection. I don't have the jchevm at hand, but I think the problematic code should look like:
interface I { static final int field = 123; } class S implements I { } public static C extends S { public static void main(String[] args) { System.out.println(field); } } I didn't tested wether it fails. I will check it when get home. -- Ivan 2006/6/5, Archie Cobbs <[EMAIL PROTECTED]>:
Ivan Volosyuk wrote: > Btw, I have found problem is classloader in jchevm. > Resolution of field in interface of superclass of some class fails. > Reproducible at eclipse. I have a patch with fix. It's quite simple. I > can send it at evening too. Do you have a simple test case? This one seems to work OK: public class FieldRes { public static interface FieldResInterface { int field = 123; } public static class FieldResSuperclass implements FieldResInterface { } public static class FieldResClass extends FieldResSuperclass { } public static void main(String[] args) throws Exception { FieldResClass obj = new FieldResClass(); System.out.println(obj.getClass().getField("field")); System.out.println(obj.field); } } -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Ivan Intel Middleware Products Division --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]