Bug 108454 - Waving crash on a 1.5 java generics?
Summary: Waving crash on a 1.5 java generics?
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0M3   Edit
Hardware: PC Linux
: P3 critical (vote)
Target Milestone: 1.5.0 M4   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 04:16 EDT by Lóránd Somogyi CLA
Modified: 2005-09-05 08:38 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lóránd Somogyi CLA 2005-08-31 04:16:52 EDT
The reported error is:
Message:
BCException thrown: The type @missing@ is not parameterized or raw - it has no
generic type

Stack trace:
org.aspectj.weaver.BCException: The type @missing@ is not parameterized or raw -
it has no generic type
at org.aspectj.weaver.ResolvedType.getGenericType(ResolvedType.java:1500)
at
org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.fromBinding(EclipseFactory.java:236)
at
org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.fromBindings(EclipseFactory.java:332)
at
org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.fromBinding(EclipseFactory.java:254)
at
org.aspectj.ajdt.internal.compiler.lookup.EclipseFactory.addSourceTypeBinding(EclipseFactory.java:745)
at
org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:116)
at
org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:301)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:315)
at
org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:728)
at
org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:206)
at
org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:140)
at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:121)
at
org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)

The isolated problem:
------------------// cut //------------------
public interface ISequence<V> {
	
}

public interface ICounter<T>  {

}

public abstract class ASequence <V, T extends ICounter<V> > implements
ISequence<V> {

}
------------------// cut //------------------

The code compiles with j2se 1.5. (04).

It does work if I change ASequence to:
------------------// cut //------------------
public abstract class ASequence <V, T extends ICounter<V> > implements
ISequence<V> {

}
------------------// cut //------------------
Comment 1 Matt Chapman CLA 2005-08-31 04:18:29 EDT
Passing over to AspectJ
Comment 2 Lóránd Somogyi CLA 2005-08-31 04:19:00 EDT
Sorry, the working code is:

------------------// cut //------------------
public abstract class ASequence <V, T extends ICounter > implements ISequence<V> {

}
------------------// cut //------------------
Comment 3 Adrian Colyer CLA 2005-08-31 04:22:58 EDT
thanks for the clear bug report which will make it much easier to get resolve
this issue. we'll take a look at this as soon as we can and get back to you.
Thanks, A.
Comment 4 Adrian Colyer CLA 2005-08-31 08:14:25 EDT
The bug only occurs when the types are defined in separate files, and passed to
the compiler in an order such that the ASequence type comes ahead of the
interfaces. Under this circumstance when trying to add the ASequence type to the
world we try to perform a validation on the base type of the bound and fail to
find the ICounter type as it hasn't been added to the world itself yet. I've
added some logic to cope with this situation, and the test case now passes.
Comment 5 Adrian Colyer CLA 2005-08-31 08:27:37 EDT
fix committed to tree, will be available in published build later on today.
Comment 6 Lóránd Somogyi CLA 2005-09-05 03:24:55 EDT
Does 1.5.0.20050902173422 version contains the fix? 
Comment 7 Adrian Colyer CLA 2005-09-05 03:55:47 EDT
Yes, any version of *AspectJ* on or after the 1st September should include this
fix. Does it work for you??

*AJDT* does NOT yet include the fix - AJDT only updates AspectJ versions
periodically, it is not automatically updated with every AspectJ development build.
Comment 8 Lóránd Somogyi CLA 2005-09-05 08:38:07 EDT
(In reply to comment #7)

Did not tried with AspectJ (ajc), so You must be right. I tought that todays
AJDT includes the fix You mad in AspectJ, because of the version of the plugin...

Sorry for false alert.

How do I know when it will be available in AJDT?