Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Bounded type disappearing after weaving

Hi Andy,

I'm trying to come up with a sample project but so far no luck - it's behaving itself so far.  I'll keep trying though.

Like I said it only seems to happen in CentOS at the moment.  I'd be surprised if it had anything to do with the OS itself, but my point is that even if I did come up with a sample do you think you could reproduce the conditions?  Is there anything else I can give you in the meantime (bytecode, source code, etc)>

Thanks,

Tim


On Tue, Jan 26, 2016 at 4:29 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
Hi Tim,

I'm certainly interested in more details. I haven't heard of that problem but I suspect although we have some regression tests for generics we don't have a lot exercising multiple bounds. I'll have a look in the code but as you say, a sample that exhibits the problem will enable me to fix it much quicker (or sort out a temporary workaround - maybe something silly like reordering the bounds in the source code).  Please raise a bug and share any more info there or with me on email.

cheers,
Andy

On 26 January 2016 at 03:26, Tim Webster <tim.webster@xxxxxxxxx> wrote:
Hi,

I'm seeing a problem where a class with multiple bounds is 'losing' one of its bounds after weaving occurs.

Even more strange is that it is only happening on a specific platform.

a brief outline of the problem:

Source class:

public class ExistenceByIdSpecification<D extends AbstractDomainObject & Identifiable> extends ExistenceSpecification<D> implements IExistenceByIdSpecification

What happens is the 'AbstractDomainObject' bound (which is a class) is disappearing, and in the bytecode we end up with something like this:

public class ExistenceByIdSpecification<D extends Identifiable> extends ExistenceSpecification<D> implements IExistenceByIdSpecification, org.springframework.beans.factory.aspectj.ConfigurableObject


this results is a runtime error whenever the constructor is called (I've removed package names - this is from a unit test):


ExistenceByIdSpecification.&lt;init&gt;(L/Identifiable;)V" type="java.lang.NoSuchMethodError"><![CDATA[java.lang.NoSuchMethodError: ExistenceByIdSpecification.<init>(L/Identifiable;)V
        at ExistenceByIdSpecificationTest.<init>(ExistenceByIdSpecificationTest.java:33)



Also, the bytecode for the class is quite a bit larger on the environment where this isn't working properly - it looks like stuff related to @Configurable is repeated.

I'm suspecting AspectJ here because when I compile the code with AspectJ disabled, the bytecode looks correct.

The environments details I've tried are:

works properly:
Windows 7
Manjaro Linux (current version)
Oracle JDK 1.7.0_79
AspectJ 1.8.6

Doesn't work:
CentOS 7
Oracle JDK 1.7.0_79, Oracle JDK 1.8.0_65, OpenJDK 1.7.0
AspectJ 1.8.6, 1.8.8

Unfortunately we want to target CentOS as a build platform, so that's why this is a problem for us!

I've only included basic details here to see if anyone has heard of this problem.  I'm happy to provide more detail if required.  I know that a sample project is ideal, but I may struggle to reproduce that (although I will try).

Thanks,


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top