Bug 198204 - [iajc] AJC should parse the arguments in a more strict way
Summary: [iajc] AJC should parse the arguments in a more strict way
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-29 05:58 EDT by Davy Toch CLA
Modified: 2013-06-24 11:02 EDT (History)
1 user (show)

See Also:


Attachments
ANT build log showing the AJC parsing problem. (9.15 KB, application/octet-stream)
2007-07-29 06:01 EDT, Davy Toch CLA
no flags Details

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