Bug 387718

Summary: RuntimeException when trying to compile broken code
Product: [Tools] AspectJ Reporter: Andrew Eisenberg <andrew.eisenberg>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aclement
Version: 1.7.0   
Target Milestone: 1.7.1   
Hardware: PC   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Simplified project that reproduces the error none

Description Andrew Eisenberg CLA 2012-08-21 13:30:11 EDT
java.lang.RuntimeException
at org.aspectj.weaver.NameMangler.makeVisibilityName(NameMangler.java:297)
at org.aspectj.weaver.NameMangler.interMethod(NameMangler.java:242)
at org.aspectj.weaver.AjcMemberMaker.interMethod(AjcMemberMaker.java:538)
at org.aspectj.ajdt.internal.compiler.problem.AjProblemReporter.methodMustOverride(AjProblemReporter.java:385)
at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(M ... dJob.java:241)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

Compile error: RuntimeException thrown: protected inter-types not allowed
Comment 1 Andrew Eisenberg CLA 2012-08-21 13:40:38 EDT
Created attachment 220114 [details]
Simplified project that reproduces the error

Thanks for the sample project.  I was able to reproduce the error.  I simplified it and I'm attaching the simplified project.

It looks like the problem is that BasicFilter.getLogMessage() is referenced inside of an advice, but getLogMessage is protected.  If I change from protected to public, the error goes away.

To reproduce, import the attached project into your workspace and do a full build.
Comment 2 Andrew Eisenberg CLA 2012-08-21 13:41:19 EDT
Urrrgh...wrong bug report.  Previous comment should be applied to Bug 386049.
Comment 3 Andrew Clement CLA 2012-08-22 16:15:07 EDT
not quite sure what the broken code was but I've modified somewhere on that stack trace to avoid it going down into the code that throws an exception in what I think are the problem circumstances. Don't plan on doing more than that right now.