Hey,

Yes, both those bugs are fixed. They both relate to fields created by
AspectJ infrastructure.  The difference with this one is that it is a field
whose access is dictated by the JVM/Javac. It may not be quite as trivial
because removing 'final' from the serialVersionUID (I presume you are
asking AspectJ to add those fields?) creates some code that a compiler
would not create. If you try compiling a serializable object with a
serialVersionUID that is not marked final, you get a warning about the
visibility. Now is that just a javac concern and the code runs fine?
Mayyybeee. I'm just running all the AspectJ tests now with that field
changed to non final.

So it is another manifestation of those issues you linked but for a
slightly more tricky field to deal with. If you have a second, please raise
an issue, I can append what happens with the tests to that.

cheers,
Andy

On Mon, 30 Mar 2020 at 04:57, Mikael Petterson <mikaelpetter...@hotmail.com>
wrote:

> Hi,
>
> We tried to build our project, using
>
> <aspectj.maven.plugin.version>1.12.6</aspectj.maven.plugin.version>
> <aspectj.version>1.9.5</aspectj.version>
>
> But I met unit test errors:
> java.lang.IllegalAccessError: Update to static final field
> com.company.common.rm.Cell.serialVersionUID attempted from a different
> method (ajc$preClinit1) than the initializer method <clinit>
>           at com.company.common.rm.Cell.ajc$preClinit1(Cell.java:1)
>           at com.company.common.rm.Cell.ajc$preClinit(Cell.java:1)
>           at com.company.common.rm.Cell.<clinit>(Cell.java:1)
>           at
> jdk.internal.reflect.GeneratedSerializationConstructorAccessor8.newInstance(Unknown
> Source)
>           at
> java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
>           at
> org.objenesis.instantiator.sun.SunReflectionFactoryInstantiator.newInstance(SunReflectionFactoryInstantiator.java:48)
>           at org.objenesis.ObjenesisBase.newInstance(ObjenesisBase.java:73)
>           at
> org.mockito.internal.creation.instance.ObjenesisInstantiator.newInstance(ObjenesisInstantiator.java:19)
>           at
> org.mockito.internal.creation.bytebuddy.InlineByteBuddyMockMaker.createMock(InlineByteBuddyMockMaker.java:184)
>           at
> org.mockito.internal.util.MockUtil.createMock(MockUtil.java:35)
>           at org.mockito.internal.MockitoCore.mock(MockitoCore.java:63)
>           at org.mockito.Mockito.mock(Mockito.java:1908)
>           at org.mockito.Mockito.mock(Mockito.java:1817)
>           at
> com.company.common.rm.RmPropsimTest.setUp(RmPropsimTest.java:85)
>
> Any ideas?
>
>
> We found the following issues has been resolved:
>
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=516279
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=537825
>
> Are they?
>
> br,
>
> //mike
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to