Bug 387718 - RuntimeException when trying to compile broken code
Summary: RuntimeException when trying to compile broken code
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.7.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 1.7.1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-21 13:30 EDT by Andrew Eisenberg CLA
Modified: 2012-08-22 16:15 EDT (History)
1 user (show)

See Also:


Attachments
Simplified project that reproduces the error (5.19 KB, application/x-zip-compressed)
2012-08-21 13:40 EDT, Andrew Eisenberg CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.