Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] compilation error with generics (possible bug?)

#: Alexandru Popescu changed the world a bit at a time by saying on  11/15/2005 5:09 PM :#
#: Andy Clement changed the world a bit at a time by saying on  11/14/2005 9:38 PM :#
dont worry, i've already fixed it.


Andy do you know if the fix went into aspectj-DEVELOPMENT-20051115132507.jar?

I have this dev build jars replaced in the AJDT and after a clean and rebuild I am still seeing the same errors.

./alex
--
.w( the_mindstorm )p.


The Cross References view was correctly displaying the info, so I thought I should give it a try. But this resulted in

[stack]
java.lang.ClassFormatError: Method getId in class org/noco/generics/LongIdentifiable has illegal modifiers: 0x241
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
[/stack]

./alex
--
.w( the_mindstorm )p.

On 14/11/05, Alexandru Popescu <the.mindstorm.mailinglist@xxxxxxxxx> wrote:
#: Andy Clement changed the world a bit at a time by saying on  11/14/2005 4:04 PM :#
> Although .... I just tried it against HEAD and it doesn't fail like
> you describe, it fails in a different way :)  So i'll still take a bug
> and fix it asap.
>
> Andy.
>

Though not clear who will rais the bug :-).

./alex
--
.w( the_mindstorm )p.

> On 14/11/05, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
>> Looks like a bug to me - please can you raise it?
>>
>> Andy.
>>
>> On 14/11/05, Alexandru Popescu <the.mindstorm.mailinglist@xxxxxxxxx> wrote:
>> > Hi!
>> >
>> > The following code seems correct to me:
>> >
>> > [code]
>> > public interface Identifiable<T> {
>> >    T getId();
>> >
>> >    void setId(T t);
>> > }
>> >
>> > public interface LongIdentifiable extends Identifiable<Long> {
>> > }
>> >
>> > public class Bean implements LongIdentifiable {
>> >
>> >    public Long getId() {
>> >      return null;
>> >    }
>> >
>> >    public void setId(Long t) {
>> >    }
>> >
>> > }
>> > [/code]
>> >
>> > at least it compiles oke with Eclipse 3.1.1.
>> >
>> > Going back to AspectJ and AJDT adding the following aspect:
>> >
>> > [code]
>> > public aspect IdentifiableAspect {
>> >      declare parents: Bean implements LongIdentifiable;
>> >
>> >      private Long LongIdentifiable.m_id;
>> >
>> >      public Long LongIdentifiable.getId() {
>> >          return m_id;
>> >      }
>> >
>> >      public void LongIdentifiable.setId(Long id) {
>> >          m_id= id;
>> >      }
>> > }
>> > [/code]
>> >
>> > results in 3 compilation errors:
>> >
>> > Severity        Description     Resource        In Folder       Location        Creation Time   Id
>> > 2       can't override java.lang.Long org.noco.generics.LongIdentifiable.getId() with java.lang.Object
>> > org.noco.generics.Bean.getId() return types don't match IdentifiableAspect.aj
>> > aj5_examples/src/main/org/noco/generics line 8  November 14, 2005 3:01:43 PM    27085
>> >
>> > Severity        Description     Resource        In Folder       Location        Creation Time   Id
>> > 2       The return type is incompatible with org.noco.generics.Identifiable<java.lang.Long>.getId()
>> > Bean.java       aj5_examples/src/main/org/noco/generics line 1  November 14, 2005 3:01:43 PM    27094
>> >
>> > Severity        Description     Resource        In Folder       Location        Creation Time   Id
>> > 2       can't override java.lang.Long org.noco.generics.LongIdentifiable.getId() with java.lang.Object
>> > org.noco.generics.Bean.getId() return types don't match Bean.java
>> > aj5_examples/src/main/org/noco/generics line 1  November 14, 2005 3:01:43 PM    27095
>> >
>> >
>> > Env:
>> >
>> > Eclipse 3.1.1
>> > AJDT: ajdt_1.3.0.20051108143751_archive.zip
>> >
>> > Am I doing something wrong? Is this a known bug?
>> >
>> > thanks in avdance,
>> >
>> > ./alex
>> > --
>> > .w( the_mindstorm )p.
>> >
>> > _______________________________________________
>> > aspectj-users mailing list
>> > aspectj-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users




!DSPAM:4378e7ed615971035271540!



_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top