Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ajdt-dev] Eclipse 3.1M5 and status of AJDT 1.2.0M3

Barry,

The latest AJDT dev build contains the latest AspectJ dev build, which 
should indeed be capable of compiling Java 5 code, assuming of course 
you're using Eclipse 3.1M5, have a 5.0 compliance level set, and 5.0 
system libraries on the build path, which it looks like you do as it's 
getting this far. I suggest you raise an AspectJ bug for this, attaching a 
cut-down project that reproduces the problem if possible. I tried with 
your class below, modifying the bits that depend on other classes, but 
then the problem didn't happen.

Regards,

Matt.

Barry Kaplan <groups1@xxxxxxxxxxx> wrote on 25/02/2005 17:40:32:

> Should the compiler be able to handle classes that use generics? (I 
> couldn't find anything on the website that identifies the 
> capabilties of the current compiler for this build, so maybe I 
> cannot yet use aspectj for my java5 projects?)
> 
> I'm getting a NPE from the compiler for the class below. If I 
> exclude this class from the build, another single file fails with 
> the same error.
> 
> -barry
> 
> ---- exception ----
> Internal compiler error
> java.lang.NullPointerException
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.
> ClassScope.detectHierarchyCycle(ClassScope.java:945)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.ast.
> ParameterizedSingleTypeReference.
> internalResolveType(ParameterizedSingleTypeReference.java:143)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.ast.
> ParameterizedSingleTypeReference.
> resolveType(ParameterizedSingleTypeReference.java:208)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.ast.
> TypeReference.resolveSuperType(TypeReference.java:112)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.
> ClassScope.findSupertype(ClassScope.java:1092)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.
> ClassScope.connectSuperclass(ClassScope.java:747)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.
> ClassScope.connectTypeHierarchy(ClassScope.java:884)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.
> CompilationUnitScope.connectTypeHierarchy(CompilationUnitScope.java:249)
> 
>    at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.
> completeTypeBindings(AjLookupEnvironment.java:91)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.
> beginToCompile(Compiler.java:331)
> 
>    at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.
> compile(Compiler.java:348)
> 
>    at org.aspectj.ajdt.internal.core.builder.AjBuildManager.
> performCompilation(AjBuildManager.java:682)
> 
>    at org.aspectj.ajdt.internal.core.builder.AjBuildManager.
> doBuild(AjBuildManager.java:168)
> 
>    at org.aspectj.ajdt.internal.core.builder.AjBuildManager.
> batchBuild(AjBuildManager.java:102)
> 
>    at org.aspectj.ajde.internal.CompilerAdapter.
> compile(CompilerAdapter.java:122)
> 
>    at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.
> run(AspectJBuildManager.java:165)
> 
> 
> ---- file ----
> package org.opentrader.infra.springframework;
> 
> import java.util.ArrayList;
> import java.util.List;
> 
> import org.opentrader.infra.springframework.FlattenedList;
> import org.opentrader.test.junit.UnitTestCase;
> 
> public class FlattenedListTest extends UnitTestCase {
> 
>     public void testEmptyCollection() {
>         FlattenedList flist = new FlattenedList(new ArrayList());
>         assertEquals(0, flist.size());
>     }
> 
>     public void testCollectionOfObjects() {
>         final Object object_1 = new Object();
>         final Object object_2 = new Object();
>         List<Object> objectsList = new ArrayList<Object>() {{
>             add(object_1);
>             add(object_2);
>         }};
> 
>         FlattenedList flist = new FlattenedList(objectsList);
> 
>         assertEquals(2, flist.size());
>         assertSame(object_1, flist.get(0));
>         assertSame(object_2, flist.get(1));
>     }
> 
>     public void testCollectionOfLists() {
>         final Object object_1 = new Object();
>         final Object object_2 = new Object();
>         final List<Object> objectsList_1 = new ArrayList<Object>() {{
>             add(object_1);
>             add(object_2);
>         }};
>         final Object object_3 = new Object();
>         final Object object_4 = new Object();
>         final List<Object> objectsList_2 = new ArrayList<Object>() {{
>             add(object_3);
>             add(object_4);
>         }};
>         List<Object> lists = new ArrayList<Object>() {{
>             add(objectsList_1);
>             add(objectsList_2);
>         }};
> 
>         FlattenedList flist = new FlattenedList(lists);
> 
>         assertEquals(4, flist.size());
>         assertSame(object_1, flist.get(0));
>         assertSame(object_2, flist.get(1));
>         assertSame(object_3, flist.get(2));
>         assertSame(object_4, flist.get(3));
>     }
> 
>     public void testCollectionOfListsAndObjects() {
>         final Object object_1 = new Object();
>         final Object object_2 = new Object();
>         final List<Object> objectsList_1 = new ArrayList<Object>() {{
>             add(object_1);
>             add(object_2);
>         }};
> 
>         final Object object_3 = new Object();
>         final Object object_4 = new Object();
> 
>         final Object object_5 = new Object();
>         final Object object_6 = new Object();
>         final List<Object> objectsList_2 = new ArrayList<Object>() {{
>             add(object_5);
>             add(object_6);
>         }};
> 
>         List<Object> lists = new ArrayList<Object>() {{
>             add(objectsList_1);
>             add(object_3);
>             add(object_4);
>             add(objectsList_2);
>         }};
> 
>         FlattenedList flist = new FlattenedList(lists);
> 
>         assertEquals(6, flist.size());
>         assertSame(object_1, flist.get(0));
>         assertSame(object_2, flist.get(1));
>         assertSame(object_3, flist.get(2));
>         assertSame(object_4, flist.get(3));
>         assertSame(object_5, flist.get(4));
>         assertSame(object_6, flist.get(5));
>     }
> 
> }
> 
> 
> -- 
> barry kaplan
> groups1@xxxxxxxxxxx



Back to the top