Bug 98660 - ClassCastException compiling aspect with cflow && handler
Summary: ClassCastException compiling aspect with cflow && handler
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.0 M3   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-06-07 08:49 EDT by Matthew Webster CLA
Modified: 2005-06-07 09:05 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 Matthew Webster CLA 2005-06-07 08:49:40 EDT
Using Eclipse 3.1M6 and AJDT 1.2.0.20050518111521

java.lang.ClassCastException
	at org.aspectj.weaver.bcel.BcelWeaver.weave(BcelWeaver.java:1006)
	at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.weave
(AjCompilerAdapter.java:265)
	at org.aspectj.ajdt.internal.compiler.AjCompilerAdapter.afterCompiling
(AjCompilerAdapter.java:129)
	at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile
(Compiler.java:385)
	at 
org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation
(AjBuildManager.java:727)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild
(AjBuildManager.java:229)
	at 
org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild
(AjBuildManager.java:147)
	at org.aspectj.ajde.internal.CompilerAdapter.compile
(CompilerAdapter.java:116)
	at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run
(AspectJBuildManager.java:191)

package logging;

public aspect Aspect {
	pointcut loggingSubsystemMethodCalls():
		execution( * logging.*.* (..) );

	pointcut caughtException( Throwable e ):
		args( e ) &&
		handler( Throwable+ );

	pointcut loggableExceptions( Throwable e ):
		caughtException( e ) && 
		!cflow( loggingSubsystemMethodCalls() );
	
	
	before( Throwable e ): loggableExceptions( e )
	{
	}

}
Comment 1 Andrew Clement CLA 2005-06-07 09:05:30 EDT
bug occurs if the project is building with 1.5 compliance *and* cflow is used
*and* advice somewhere is not matching anything.  Can't occur on Eclipse 3.0 as
you can't make it compile with 1.5 compliance level.  Bug is fixed in HEAD, will
be fixed in the next dev build of AJDT for Eclipse 3.1