Community
Participate
Working Groups
After compiling following code by acj from aspectj 1.5.3: public interface Persistable extends Serializable { abstract public int getPersitableId(); } ------------------------------ public aspect PersistableImpl { declare parents: Test1 extends Persistable; final public int Persistable.persistableId = System.identityHashCode(this); public int Persistable.getPersitableId() { return persistableId; } } ------------------------------------------ public class Test1 { public static void main(String[] args) { Test1 obj1 = new Test1(); if ( obj1 instanceof Persistable ) { System.out.println("obj1 is Persistable id="+((Persistab le)obj1).getPersitableId()); } else { System.out.println("Not persistable!"); } } } ------------------------------------- the persistableId field declared as transient within Test1 class: public transient int ajc$interField$test1_PersistableImpl$test1_Persistable$ persistableId; /* synthetic field */ (from decompiled code). Expexted result: public int ajc$interField$test1_PersistableImpl$test1_Persistable$ persistableId; /* synthetic field */ (As in code compiled by acj from aspectj 1.5.0).
Created attachment 55679 [details] Test case files
fix committed - it is not all intertype fields that exhibit this problem, public ones are fine. I turned your code into a test program that actually serialized an object and de-serialized (which causes the problem with it being transient to appear) and I've put the fix in. It is a regression due to the work done under bug 147711.
fix available.