Bug 371793

Summary: @javax.annotation.Nonnull on constructor args causes bad class file / bad signature error when javac tries to use a woven class
Product: [Tools] AspectJ Reporter: Matt McHenry <eclipse>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: major    
Priority: P3 CC: stephan.herrmann
Version: unspecified   
Target Milestone: ---   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=388314
Whiteboard:
Attachments:
Description Flags
enum class, SeriesInfo.java
none
swing checking aspect, CheckSwing.aj none

Description Matt McHenry CLA 2012-02-16 12:00:22 EST
Build Identifier: 

We have a simple enum class whose constructor takes the following arguments:

> @Nonnull String n, @Nonnull Color active, @Nonnull Color locked, Image openPoint, Image closedPoint

When woven with our aspect that's used to check various swing calls, further invocations of javac with this class on the classpath produce the following error:

> cannot access cl.ui.settings.SeriesInfo
> bad class file: cl/ui/settings/SeriesInfo.class(cl/ui/settings:SeriesInfo.class)
> bad signature: ?2?
> Please remove or make sure it appears in the correct subdirectory of the classpath.
> import cl.ui.settings.SeriesInfo;
>                      ^

Commenting out the @Nonnull annotations restores it to a working state.  This happens with 1.6.12.

Reproducible: Always
Comment 1 Matt McHenry CLA 2012-02-16 12:01:36 EST
Created attachment 211127 [details]
enum class, SeriesInfo.java
Comment 2 Matt McHenry CLA 2012-02-16 12:02:26 EST
Created attachment 211128 [details]
swing checking aspect, CheckSwing.aj