Bug 119352 - AjType.getSupertype breaks for null
Summary: AjType.getSupertype breaks for null
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0RC1   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-05 23:04 EST by Ron Bodkin CLA
Modified: 2012-04-03 16:16 EDT (History)
0 users

See Also:


Attachments
Module patch for aspectj5rt (2.06 KB, patch)
2005-12-05 23:06 EST, Ron Bodkin CLA
aclement: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ron Bodkin CLA 2005-12-05 23:04:42 EST
I ran into this while using reflection proxies with LTW... See attached patches for these test cases and my fix:

	public void testObjectSupertype() {
		AjType<?> objectSuper = AjTypeSystem.getAjType(Object.class).getSupertype();
		assertNull(objectSuper);		
	}

	public void testInterfaceSupertype() {
		AjType<?> serializableSuper = AjTypeSystem.getAjType(Serializable.class).getSupertype();
		assertNull(serializableSuper);		
	}
	
	public AjType<? super T> getSupertype() {
		Class<? super T> superclass = clazz.getSuperclass();
		return superclass==null ? null : (AjType<? super T>) new AjTypeImpl(superclass);
	}
Comment 1 Ron Bodkin CLA 2005-12-05 23:06:15 EST
Created attachment 31169 [details]
Module patch for aspectj5rt
Comment 2 Andrew Clement CLA 2005-12-06 08:04:49 EST
I'll let Adrian take a look.
Comment 3 Adrian Colyer CLA 2005-12-06 10:38:57 EST
patch applied, thanks :)

waiting on build...
Comment 4 Andrew Clement CLA 2005-12-07 06:40:37 EST
fix available.