Bug 198204

Summary: [iajc] AJC should parse the arguments in a more strict way
Product: [Tools] AspectJ Reporter: Davy Toch <Davy.Toch>
Component: CompilerAssignee: aspectj inbox <aspectj-inbox>
Status: NEW --- QA Contact:
Severity: normal    
Priority: P3 CC: aclement
Version: 1.5.3   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
ANT build log showing the AJC parsing problem. none

Description Davy Toch CLA 2007-07-29 05:58:09 EDT
We're using the AspectJ 1.1 Compiler Adapter class:

  org.aspectj.tools.ant.taskdefs.Ajc11CompilerAdapter

from ANT to call AJC.

We noticed that the AJC command-argument parser doesn't always do a strict checking of the arguments (cf attachment ant-ajc.log), e.g.:
1. if the passed '-source/-target' contain completely invalid values, it will only log a warning which is only shown in verbose mode
2. if the passed '-aspectpath' contains an invalid/corrupt entry, it will only log a warning

The risk is somebody does the build but doesn't notice the warnings in the build log. As a consequence an invalid binary is built in the end.

So I think it would be recommended to :

1. check more strictly the arguments and fail if they are invalid 

or

2. have an option passed to AJC (as a JVM property?), allowing AJC to enable/disable strict argument checking (so fail if one of the arguments is invalid)
Comment 1 Davy Toch CLA 2007-07-29 06:01:41 EDT
Created attachment 74870 [details]
ANT build log showing the AJC parsing problem.
Comment 2 Andrew Clement CLA 2013-06-24 11:02:59 EDT
unsetting the target field which is currently set for something already released